diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 9fd6d3ed2..9d6c548d7 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -1,5 +1,12 @@ #include "hud.hpp" +#include +#include +#include +#include +#include +#include + /* Start of tes3mp addition @@ -14,13 +21,6 @@ End of tes3mp addition */ -#include -#include -#include -#include -#include -#include - #include #include diff --git a/apps/openmw/mwgui/tradewindow.cpp b/apps/openmw/mwgui/tradewindow.cpp index ca0bb48e8..34b1dc473 100644 --- a/apps/openmw/mwgui/tradewindow.cpp +++ b/apps/openmw/mwgui/tradewindow.cpp @@ -6,6 +6,17 @@ #include #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ +#include "../mwmp/Main.hpp" +#include "../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ + #include #include "../mwbase/environment.hpp" @@ -350,6 +361,16 @@ namespace MWGui mPtr.getClass().getCreatureStats(mPtr).getGoldPool() - mCurrentBalance ); } + /* + Start of tes3mp addition + + Send an ID_PLAYER_INVENTORY packet every time a player completes a trade + */ + mwmp::Main::get().getLocalPlayer()->sendInventory(); + /* + End of tes3mp addition + */ + MWBase::Environment::get().getWindowManager()->getDialogueWindow()->addResponse( MWBase::Environment::get().getWorld()->getStore().get().find("sBarterDialog5")->getString());