mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-31 03:06:44 +00:00
[Client] Send PlayerInventory packets when trapping souls in soulgems
This commit is contained in:
parent
f853368641
commit
76ac905efc
1 changed files with 14 additions and 0 deletions
|
@ -240,8 +240,22 @@ namespace MWMechanics
|
|||
|
||||
// Set the soul on just one of the gems, not the whole stack
|
||||
gem->getContainerStore()->unstack(*gem, caster);
|
||||
|
||||
/*
|
||||
Start of tes3mp change (minor)
|
||||
|
||||
Send PlayerInventory packets that replace the original gem with the new one
|
||||
*/
|
||||
mwmp::LocalPlayer *localPlayer = mwmp::Main::get().getLocalPlayer();
|
||||
localPlayer->sendItemChange(*gem, 1, mwmp::InventoryChanges::REMOVE);
|
||||
|
||||
gem->getCellRef().setSoul(mCreature.getCellRef().getRefId());
|
||||
|
||||
localPlayer->sendItemChange(*gem, 1, mwmp::InventoryChanges::ADD);
|
||||
/*
|
||||
End of tes3mp change (minor)
|
||||
*/
|
||||
|
||||
// Restack the gem with other gems with the same soul
|
||||
gem->getContainerStore()->restack(*gem);
|
||||
|
||||
|
|
Loading…
Reference in a new issue