191 Commits
Author SHA1 Message Date
KPhoenix b8738ab4cf Validation: Validate Item Drop Packets 2023-11-20 06:37:52 +01:00
staphen c4792be763 Remove invalid items after loading heroitem data 2023-11-19 23:48:21 +01:00
staphen 293ad814e6 Restore packed item state when regenerating an item using heroitem data 2023-11-19 23:48:21 +01:00
Gleb Mazovetskiy 99fea0d1c5 Migrate unique monsters to data files 2023-11-10 17:44:45 +00:00
Gleb Mazovetskiy 17d5f05ada Fix some compilation warnings 2023-11-02 00:42:44 +00:00
Eric Robinsonandstaphen dac2e0318e Fix Item Validation (#6723)
Co-authored-by: staphen <[email protected]>
2023-10-19 09:34:09 +02:00
staphen e5f626ccf9 Fix edge cases for packing empty items 2023-09-21 11:40:51 +02:00
ephphatha 6a8f4b12da Get base block bonus from data struct instead of storing a copy 2023-09-20 05:49:54 +02:00
ephphatha 5d50b5520d Add PlayerData lookup helper to avoid manual casts
This lets us remove the PlayersData global, and we can use a helper in the player class for convenience.
2023-09-20 05:49:54 +02:00
staphen 7855dae582 Indicate network validation success or failure in iteminfo 2023-09-19 05:11:51 +02:00
Gleb Mazovetskiy e090c8bf31 Extract some player attributes to data files 2023-09-17 14:49:12 +01:00
staphen a151219b9b Don't validate creation flags on gold 2023-09-03 17:03:25 +02:00
Gleb Mazovetskiy af869ac732 Merge branch 'master' into dev-merged 2023-09-01 20:49:34 +01:00
staphen 4deae11871 Fix PlayerNetPack validation and tests 2023-08-27 21:34:38 +02:00
Eric Robinson 9995c00323 Validate Item Locations (#6427) 2023-08-27 18:22:24 +02:00
Anders Jenbo 15ed246239 Merge branch 'master' of github.com:diasurgical/devilutionX into development 2023-08-26 01:09:03 +02:00
ephphatha e6890cc5cc Move MaxCharacterLevel to playerdat and add helpers for the various uses 2023-08-24 05:46:44 +02:00
ephphatha da76e131e4 Add getter/setter for character levels to ensure _pNextExper stays synced 2023-08-24 05:46:44 +02:00
ephphatha d92d152576 Use unsigned type for character levels 2023-08-24 05:46:44 +02:00
Stephen C. Wills 7b06703842 Add tests for net player validation (#6492) 2023-08-21 00:18:03 +02:00
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
staphen b43a8dc904 Fix empty item slot validation in UnPackNetItem() 2023-07-20 02:38:42 +02:00
Anders Jenbo b01670e1e4 Correct fields being validated 2023-07-17 04:23:22 +02:00
46824261f9 Validate iCreateInfo (#6377)
Co-authored-by: staphen <[email protected]>
Co-authored-by: Anders Jenbo <[email protected]>
Co-authored-by: Stephen C. Wills <[email protected]>
2023-07-17 04:17:26 +02:00
Stephen C. Wills f0f317e685 Log validation errors in UnPackNetPlayer() (#6363) 2023-07-14 20:07:42 +02:00
Anders Jenbo 97ee615a8a Avoid durability overflow when packing items. (#6342) 2023-07-10 23:08:34 +02:00
Anders Jenbo 01d2a46a8d Validate items when unpacking importing 2023-07-10 17:12:34 +02:00
Eric Robinson 2c7704bfe0 Validate Base Life and Mana (#6289) 2023-07-10 02:43:33 +02:00
staphen cc5261fa15 Support for ears in PlayerNetPack 2023-07-06 02:47:29 +02:00
staphen c2814088d2 Add fields to PlayerNetPack for validation 2023-06-28 15:46:54 +02:00
Anders Jenbo 63277a842d Clean up player packing 2023-06-24 04:18:14 +02:00
Anders Jenbo efa51993e3 Split network player sync and hero save file 2023-06-24 04:18:14 +02:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
obligaron 1522dc7031 Multiplayer: Add arena potions 2023-04-13 21:20:53 +02:00
Eric Robinson f75f66d54b Add playerdat (#5763) 2023-02-10 12:56:28 +00:00
Gleb Mazovetskiy cea6a01de7 More item packing fix on big-endian
Refs #5573
2022-12-08 12:08:36 +01:00
Gleb Mazovetskiy ac26f3a23b Item: Optimize to save 16 bytes (312->288) 2022-10-11 10:17:01 +01:00
staphen 73028ec04a Define network struct for ears 2022-09-08 06:11:36 +02:00
obligaron b3aa08589b Don't use MyPlayer in UnPackItem and dependend methods 2022-08-26 18:18:40 +02:00
Mikołaj Piróg dda0b96ea5 Remove #defines in player.h and add constexpr where applicable (#4896)
* Change defines to constexpr int in player.h

* Add const or constexpr to player.h/cpp where applicable

* Update tests with changed names of player constatns

* remove unecessary variable
2022-07-05 17:25:23 +02:00
obligaron d0c14fe92f Introduce Player::setlevel 2022-06-18 17:05:30 +02:00
staphen a2fe3a981e Fix issues with ears due to translation 2022-06-06 07:26:43 +02:00
ephphatha 64a2c41b2c Set clang-tidy config for MethodCase option
Previously this was falling back to FunctionCase, leading to inconsistent casing of class methods throughout the codebase. Applied to Item as an example.
2022-04-20 13:50:57 +02:00
DakkJaniels dad46e1905 Item special effect enum (#4129) 2022-04-19 15:44:46 +02:00
ephphatha 7e7798fd2b Add function to mark an item as empty 2022-04-18 19:25:55 +02:00
qndel 81800e64bb MAXCHARLEVEL cleanup 2022-03-01 21:45:47 +01:00
staphen b85485b8f3 Resolve game crash when syncing Diablo items in Hellfire games 2022-01-17 00:31:27 +01:00
Anders Jenbo af08a99691 Perform item requirement check when entering vendors 2021-12-13 00:56:38 +01:00
Andrew James 4a940b1b07 Remove uses of Items[] as a temporary for other Item variables (#2924) 2021-11-25 09:34:13 +01:00
Anders Jenbo 6e63354cd1 Remove safe guards around strings own the input for 2021-11-22 10:07:31 +01:00