staphen
e28a8065e9
Sync more item data with TCmdChItem
4 years ago
staphen
73028ec04a
Define network struct for ears
4 years ago
Anders Jenbo
872456ae5d
Use size_t for a select few pnum variables
4 years ago
Stephen C. Wills
a06dd25d17
Synchronize player inventories ( #5217 )
...
* Synchronize item placement in player's backpack
* Synchronize item remove from player's backpack
* Synchronize item placement and removal from player's belt
* Set up loopback network provider for failing tests
4 years ago
obligaron
439a9926e5
Clean up spell usage function names
...
Rename UseMana -> ConsumeSpell
Rename RemoveCurrentSpellScroll -> ConsumeScroll and remove unused return value
Rename UseStaffCharge -> ConsumeStaffCharge
Rename UseScroll -> CanUseScroll
4 years ago
obligaron
6804221199
Store scroll/rune location in SpellCastInfo.spellFrom and remove the scroll/rune only after the spell is casted
4 years ago
obligaron
279e92e69c
Checks conditions for spell again, cause initial check was done when spell was queued
4 years ago
obligaron
1cfd1ca99d
Fix double casting bug - use separated info for casted and queued spells
4 years ago
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings ( #4904 )
4 years ago
Anders Jenbo
d82f2ebc9e
Pass players by reference instead of an index
4 years ago
Anders Jenbo
72656b3011
Move path and palette to the engine folder
4 years ago
ephphatha
3af11ad355
Use the same function when checking and actually dropping an item
4 years ago
Gleb Mazovetskiy
9b72565bb0
Fix `RemoveBeltItemById`
4 years ago
Gleb Mazovetskiy
c45170d20e
Rename `inv_iterators` methods to `camelCase`
...
Per clang-tidy config
4 years ago
Gleb Mazovetskiy
628406a44c
Refactor inventory/belt item presence and removal
...
Introduces new functions to check for presence of and remove player items.
These functions do not rely on or expose item indices.
They're implemented as free functions instead of Player methods due to
complicated include dependencies between `player.h`, `inv.h`, and
`inv_iterators.h`. We should probably look into cleaning this up at some
point.
4 years ago
ephphatha
0cfd0e194a
Refactor TryDropItem to reduce use of globals
...
The way TryInvPut and DropItemBeforeTrig interacted was fragile, don't think this would've worked as expected at the best of times. Looks like it was added as part of controller support so guessing this isn't vanilla behaviour anyway.
4 years ago
ephphatha
ad7ad46ce9
Explicitly clear HoldItem when putting an item into the Inventory/Stash
...
Previously this also relied on NewCursor modifying MyPlayer->HoldItem when setting the cursor to a non-item cursor to avoid item duplication, seems more appropriate to make this explicit in the caller.
4 years ago
ephphatha
28b6eaf7de
Only use HoldItem in InvGetItem if necessary
...
When auto-placing gold in the inventory there's no need to trample HoldItem.
4 years ago
staphen
d16c2f0086
Avoid recreating items in PutItem locally
4 years ago
staphen
cf41911417
Use appropriate spell ID when quick casting from scroll or staff
4 years ago
staphen
33338115f6
Don't use HoldItem in CMD_PUTITEM handler
4 years ago
staphen
6a30cd3950
Add gamepad support for stash
4 years ago
staphen
822a0cd22a
Fix auto-equip network messages
4 years ago
Anders Jenbo
1ba817ca53
Unify gold handling (withdraw any amount from stash)
4 years ago
Andrew James
4ff83431d2
Remove the use of HoldItem in AutoGetItem ( #4178 )
4 years ago
obligaron
05658de4e9
Make GetInventorySize public
4 years ago
Anders Jenbo
a48f89007d
Implement stash
4 years ago
ephphatha
f5da32a21c
Don't assume holdItem when auto-placing gold
4 years ago
ephphatha
eeb9ac3303
Sync dropped items if another player triggers an action on the current level
4 years ago
ephphatha
c4c664c6be
Add class to allow iterating over all points in a rectangle
...
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
ephphatha
baa1cd65c5
Make FindGetItem return an index into ActiveItems
...
This allows the calling code in DeltaLoadLevel to behave the same as every other use of DeleteItem, making it possible to remove the duplicate argument and ensure that the ActiveItems/AvailableItems arrays are treated appropriately.
4 years ago
ephphatha
1d560601f2
Remove duplicated argument to InvGetItem
...
This was obscuring efforts to track how ActiveItems and Items are referenced, hopefully can switch back to the Item& soon.
4 years ago
Bernd Stellwag
f1a0aa3b49
Replace broken link with @see annotation to text representation of the linked image
5 years ago
Anders Jenbo
31ba8e2bc6
Validate additional network messages
5 years ago
Yuri Pourre
b8450dc792
Assign ctrl to drop items
5 years ago
BC Ko
51f50570da
documentation cleanup : inv
5 years ago
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
5 years ago
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
5 years ago
Anders Jenbo
4044fadeb5
Clean up some players references
5 years ago
Gleb Mazovetskiy
032eaf7491
External iterators for player items
...
Implements external iterators for player items.
5 years ago
Robin
62a33c61d9
objects: deduplicate logic in OperateShrineGloomy using ForEachItem function
5 years ago
Anders Jenbo
8df8b940c4
Handle some clang-tidy issues
5 years ago
Anders Jenbo
a19e7b2a3b
Remove some more use of miniwin
5 years ago
Anders Jenbo
4eabc6024b
Apply various cleanups via Android Studio
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
qndel
fd3893190f
inv cleanup
5 years ago
Anders Jenbo
ee7b32d8f6
Player by reference part 3
5 years ago
Anders Jenbo
e670faac99
🔥 Remove unused code DrawInvMsg
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago