forked from teamnwah/openmw-tes3coop
[Client] Send ID_PLAYER_INVENTORY from two more locations
This commit is contained in:
parent
c0d67f67fb
commit
cdd796aba1
2 changed files with 13 additions and 0 deletions
|
@ -291,6 +291,8 @@ namespace MWGui
|
||||||
WorldItemModel drop (mouseX, mouseY);
|
WorldItemModel drop (mouseX, mouseY);
|
||||||
mDragAndDrop->drop(&drop, NULL);
|
mDragAndDrop->drop(&drop, NULL);
|
||||||
|
|
||||||
|
// Added by tes3mp
|
||||||
|
//
|
||||||
// LocalPlayer's inventory has changed, so send a packet with it
|
// LocalPlayer's inventory has changed, so send a packet with it
|
||||||
mwmp::Main::get().getLocalPlayer()->sendInventory();
|
mwmp::Main::get().getLocalPlayer()->sendInventory();
|
||||||
|
|
||||||
|
@ -326,6 +328,9 @@ namespace MWGui
|
||||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->Send(event);
|
mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->Send(event);
|
||||||
delete event;
|
delete event;
|
||||||
event = nullptr;
|
event = nullptr;
|
||||||
|
|
||||||
|
// LocalPlayer's inventory has changed, so send a packet with it
|
||||||
|
mwmp::Main::get().getLocalPlayer()->sendInventory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
#include <MyGUI_LanguageManager.h>
|
#include <MyGUI_LanguageManager.h>
|
||||||
|
|
||||||
|
#include "../mwmp/Main.hpp"
|
||||||
|
#include "../mwmp/LocalPlayer.hpp"
|
||||||
|
|
||||||
#include <components/compiler/extensions.hpp>
|
#include <components/compiler/extensions.hpp>
|
||||||
#include <components/compiler/opcodes.hpp>
|
#include <components/compiler/opcodes.hpp>
|
||||||
|
|
||||||
|
@ -67,6 +70,11 @@ namespace MWScript
|
||||||
// Spawn a messagebox (only for items added to player's inventory and if player is talking to someone)
|
// Spawn a messagebox (only for items added to player's inventory and if player is talking to someone)
|
||||||
if (ptr == MWBase::Environment::get().getWorld ()->getPlayerPtr() )
|
if (ptr == MWBase::Environment::get().getWorld ()->getPlayerPtr() )
|
||||||
{
|
{
|
||||||
|
// Added by tes3mp
|
||||||
|
//
|
||||||
|
// LocalPlayer's inventory has changed, so send a packet with it
|
||||||
|
mwmp::Main::get().getLocalPlayer()->sendInventory();
|
||||||
|
|
||||||
// The two GMST entries below expand to strings informing the player of what, and how many of it has been added to their inventory
|
// The two GMST entries below expand to strings informing the player of what, and how many of it has been added to their inventory
|
||||||
std::string msgBox;
|
std::string msgBox;
|
||||||
std::string itemName = itemPtr.getClass().getName(itemPtr);
|
std::string itemName = itemPtr.getClass().getName(itemPtr);
|
||||||
|
|
Loading…
Reference in a new issue