1
0
Fork 1
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:
David Cernat 2018-12-26 12:25:00 +02:00
parent f853368641
commit 76ac905efc

View file

@ -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);