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
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
Anders Jenbo
799f1763af
Performce UTF8 aware limited string copies
2021-11-22 03:28:51 +01:00
Anders Jenbo
b4f699f0a3
Validate item network messages
2021-10-12 04:56:30 +02:00
Anders Jenbo
a56452eec3
Validate player sync
2021-10-12 04:56:30 +02:00
Anders Jenbo
0c5bdf5dbf
🐛 Reject items that would cause an OOB to
2021-09-23 10:20:54 +02:00
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
2021-09-13 00:25:49 +02:00
Sid672
a12a7511a9
Functional documentation moved
2021-09-12 19:50:36 +02:00
ephphatha
8ab229e7e8
LoadItemData by reference
2021-09-07 01:09:51 +02:00
Juliano Leal Goncalves
7841c4731e
🚚 Rename 'PkItemStruct' to 'ItemPack'
2021-08-30 13:40:08 +02:00
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
2021-08-30 13:40:08 +02:00
Juliano Leal Goncalves
28134d099c
🚚 Rename 'PkPlayerStruct' to 'PlayerPack'
2021-08-30 08:01:53 +02:00
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
2021-08-30 06:44:18 +02:00
Anders Jenbo
4044fadeb5
Clean up some players references
2021-08-30 03:26:17 +02:00
BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
2021-08-26 08:06:48 +02:00
qndel
3dbc120320
optimized packing/unpacking inventory items ( #2610 )
2021-08-18 20:56:07 +02:00
Anders Jenbo
f0a7a5c989
🎨 Apply code style
2021-07-19 05:44:20 +02:00
Anders Jenbo
069249f318
🚚 Move local function to anonymous namespace i-p
2021-07-19 05:44:20 +02:00
Anders Jenbo
96bf75b502
Rename player globals
2021-07-08 02:01:14 -07:00