diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index bf7c3888d..917eac56c 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -537,9 +537,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) break; } - case ID_CONTAINER: + case ID_OBJECT_HEALTH: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_HEALTH from %s", player->npc.mName.c_str()); myPacket->Read(baseEvent); @@ -548,26 +548,30 @@ void Networking::processWorldPacket(RakNet::Packet *packet) break; } - case ID_OBJECT_HEALTH: + case ID_DOOR_STATE: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_HEALTH from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_STATE from %s", player->npc.mName.c_str()); myPacket->Read(baseEvent); myPacket->Send(baseEvent, true); + Script::Call( + player->getId(), + baseEvent->cell.getDescription().c_str()); + break; } - case ID_DOOR_STATE: + case ID_CONTAINER: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_STATE from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER from %s", player->npc.mName.c_str()); myPacket->Read(baseEvent); myPacket->Send(baseEvent, true); - Script::Call( + Script::Call( player->getId(), baseEvent->cell.getDescription().c_str()); diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index 3960c7971..2233f6c99 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -123,6 +123,7 @@ public: {"OnObjectLock", Function()}, {"OnObjectUnlock", Function()}, {"OnDoorState", Function()}, + {"OnContainer", Function()}, {"OnPlayerSendMessage", Function()}, {"OnPlayerEndCharGen", Function()}, {"OnGUIAction", Function()}