mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
[Client] Send ID_PLAYER_INVENTORY from two more locations
This commit is contained in:
parent
c0d67f67fb
commit
cdd796aba1
@ -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…
x
Reference in New Issue
Block a user