You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwmechanics
David Cernat f481c85e07 [Client] Use ADD before REMOVE for PlayerInventory in repair/recharge
Previously, when recharging or repairing an item, the client sent a PlayerInventory packet to the server with the old version of the item that was supposed to be removed and then it sent a PlayerInventory packet with the new version of the item that was supposed to be added.

Unfortunately, the current CoreScripts make it so custom items using generated IDs have their records deleted when they are completely removed from the world, however briefly, even if they are added back immediately afterwards. In practice, this meant that – before this commit – recharging or repairing a custom item led to its removal from the player inventory stored on the server, followed by the deletion of its record, followed by its readdition to the inventory (but with the record staying deleted). Logging out and logging back in immediately prevented the player from receiving the item anymore because of its now non-existent record.
6 years ago
..
activespells.cpp [Client] Return 0 if effect not found 7 years ago
activespells.hpp [General] Send summon duration to server in ObjectSpawn packets 7 years ago
actor.cpp Refactor AiTemporaryStorage usage 7 years ago
actor.hpp Refactor AiTemporaryStorage usage 7 years ago
actors.cpp [Client] Set actor killer correctly for spells that do damage over time 6 years ago
actors.hpp Merge pull request #457 from OpenMW/master while resolving conflicts 7 years ago
actorutil.cpp Added MWMechanics::isPlayerInCombat() 9 years ago
actorutil.hpp actorutil.hpp includes mwworld/ptr.hpp 9 years ago
aiactivate.cpp [Client] Set packetOrigin for all ObjectList packets sent 7 years ago
aiactivate.hpp [Client] Allow AiActivate to be used with specific Ptrs, not just refIds 7 years ago
aiavoiddoor.cpp Cleanup of #include statements 9 years ago
aiavoiddoor.hpp Cleanup of #include statements 9 years ago
aibreathe.cpp Added AiBreathe package (feature #1374) 8 years ago
aibreathe.hpp Added AiBreathe package (feature #1374) 8 years ago
aicast.cpp Rework manual spellcasting (e.g. via scripts) 7 years ago
aicast.hpp Rework manual spellcasting (e.g. via scripts) 7 years ago
aicombat.cpp [Client] Fix backwards logic when setting type for AI attacks 6 years ago
aicombat.hpp Refactor AiTemporaryStorage usage 7 years ago
aicombataction.cpp Revert addition change 7 years ago
aicombataction.hpp Combat AI: use WhenUsed enchantments 8 years ago
aiescort.cpp Store integer actor ID in AI packages (bug #4036) 7 years ago
aiescort.hpp Store integer actor ID in AI packages (bug #4036) 7 years ago
aiface.cpp Implement Face instruction (Feature #1424) 9 years ago
aiface.hpp Implement Face instruction (Feature #1424) 9 years ago
aifollow.cpp Merge pull request #457 from OpenMW/master while resolving conflicts 7 years ago
aifollow.hpp Merge pull request #457 from OpenMW/master while resolving conflicts 7 years ago
aipackage.cpp AI: try to open doors every AI_REACTION_TIME seconds (bug #4454) 7 years ago
aipackage.hpp Rework manual spellcasting (e.g. via scripts) 7 years ago
aipursue.cpp Merge pull request #456 from OpenMW/master while resolving conflicts 7 years ago
aipursue.hpp Store integer actor ID in AI packages (bug #4036) 7 years ago
aisequence.cpp Rework manual spellcasting (e.g. via scripts) 7 years ago
aisequence.hpp Refactor AiTemporaryStorage usage 7 years ago
aistate.hpp
aitravel.cpp Finish AiTarget package, if destination is blocked by other actor 7 years ago
aitravel.hpp Add mHidden field to AiTravel 7 years ago
aiwander.cpp Refactor AiTemporaryStorage usage 7 years ago
aiwander.hpp Refactor AiTemporaryStorage usage 7 years ago
alchemy.cpp [General] Implement RecordDynamic packet, part 1 7 years ago
alchemy.hpp Don't reveal unknown potion effects in alchemy window (Fixes #3146) 9 years ago
autocalcspell.cpp Move spell magicka cost calculation to standalone function 8 years ago
autocalcspell.hpp Show starting abilities, powers and spells in stat-review window (Fixes #2410) 8 years ago
character.cpp Merge pull request #469 from davidcernat/master while resolving conflicts 6 years ago
character.hpp Give jumping animations higher priority than movement ones 6 years ago
combat.cpp [General] Always use correct ranged weapon & ammo for ranged attack sync 6 years ago
combat.hpp Fix some style issues flagged by cppcheck 7 years ago
coordinateconverter.cpp Fixed errors pointed out by Zini. 9 years ago
coordinateconverter.hpp Fixed errors pointed out by Zini. 9 years ago
creaturestats.cpp Merge pull request #460 from OpenMW/master 7 years ago
creaturestats.hpp [General] Synchronize summoned creatures 8 years ago
difficultyscaling.cpp Merge pull request #469 from davidcernat/master while resolving conflicts 6 years ago
difficultyscaling.hpp
disease.hpp Cleanup of #include statements 9 years ago
drawstate.hpp
enchanting.cpp [General] Reduce inventory-sending hooks to just 2 in ContainerStore 6 years ago
enchanting.hpp Pass parameters by const reference 8 years ago
levelledlist.hpp Cleanup of #include statements 9 years ago
magiceffects.cpp
magiceffects.hpp
mechanicsmanagerimp.cpp [Client] Make it possible to check if an item ID belongs to a bound item 6 years ago
mechanicsmanagerimp.hpp [Client] Make it possible to check if an item ID belongs to a bound item 6 years ago
movement.hpp
npcstats.cpp [Client] Compare crimeTime and deathTime when NPCs forgive player crimes 7 years ago
npcstats.hpp [Client] Compare crimeTime and deathTime when NPCs forgive player crimes 7 years ago
objects.cpp More consistent wording of errors/warnings 8 years ago
objects.hpp Save scripted animation state (Fixes #1931, #2150, #3393) 9 years ago
obstacle.cpp AI: try to open doors every AI_REACTION_TIME seconds (bug #4454) 7 years ago
obstacle.hpp AI: try to open doors every AI_REACTION_TIME seconds (bug #4454) 7 years ago
pathfinding.cpp Prevent NPC from chosing farther pathgrid node 7 years ago
pathfinding.hpp Move PathgridGraph out of CellStore 7 years ago
pathgrid.cpp http to https for supported urls (#1625) 7 years ago
pathgrid.hpp Move PathgridGraph out of CellStore 7 years ago
pickpocket.cpp
pickpocket.hpp
repair.cpp [Client] Use ADD before REMOVE for PlayerInventory in repair/recharge 6 years ago
repair.hpp
security.cpp [Client] Set packetOrigin for all ObjectList packets sent 7 years ago
security.hpp
spellcasting.cpp [Client] Set actor killer correctly for spells that do damage over time 6 years ago
spellcasting.hpp Rename mIsScripted variable because its name is ambiguous 6 years ago
spellpriority.cpp Avoid fall-through in spell selection 7 years ago
spellpriority.hpp Split weapons and spells rating code from combat actions 8 years ago
spells.cpp Cache magic effects in MWMechanics::Spells 9 years ago
spells.hpp Cache magic effects in MWMechanics::Spells 9 years ago
stat.cpp Change bounds behavior of stat script commands 8 years ago
stat.hpp Fix magicka and fatigue calculations from fortifying attributes 9 years ago
steering.cpp Fixed bug in smoothTurn() 9 years ago
steering.hpp Fixes for building with unity build 9 years ago
summoning.cpp [Client] Set packetOrigin for all ObjectList packets sent 7 years ago
summoning.hpp Added a delay before summoned creature corpse despawning 7 years ago
trading.cpp Use relative stat difference for haggling 7 years ago
trading.hpp Moved mechanics code from MWGui::TradeWindow to MWMechanics::Trading 9 years ago
weaponpriority.cpp Don't adjust weapon rating according to weapon condition twice 6 years ago
weaponpriority.hpp implement rateAmmo() function 7 years ago