[Client] Send PlayerInventory packet after buying skill training

This commit is contained in:
David Cernat 2017-12-13 05:46:48 +02:00
parent 0ad9c99cf4
commit ebf88d12a3

View file

@ -2,6 +2,17 @@
#include <MyGUI_Gui.h>
/*
Start of tes3mp addition
Include additional headers for multiplayer purposes
*/
#include "../mwmp/Main.hpp"
#include "../mwmp/LocalPlayer.hpp"
/*
End of tes3mp addition
*/
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
@ -168,6 +179,16 @@ namespace MWGui
// remove gold
player.getClass().getContainerStore(player).remove(MWWorld::ContainerStore::sGoldId, price, player);
/*
Start of tes3mp addition
Send an ID_PLAYER_INVENTORY packet every time a player buys training
*/
mwmp::Main::get().getLocalPlayer()->sendInventory();
/*
End of tes3mp addition
*/
// add gold to NPC trading gold pool
npcStats.setGoldPool(npcStats.getGoldPool() + price);