mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-07 07:51:35 +00:00
[Server] Add OnContainer script callback
This commit is contained in:
parent
5300bcd711
commit
1198caddf6
2 changed files with 16 additions and 11 deletions
|
@ -537,17 +537,6 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ID_CONTAINER:
|
|
||||||
{
|
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER from %s",
|
|
||||||
player->npc.mName.c_str());
|
|
||||||
|
|
||||||
myPacket->Read(baseEvent);
|
|
||||||
myPacket->Send(baseEvent, true);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_OBJECT_HEALTH:
|
case ID_OBJECT_HEALTH:
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_HEALTH from %s",
|
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_HEALTH from %s",
|
||||||
|
@ -574,6 +563,21 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ID_CONTAINER:
|
||||||
|
{
|
||||||
|
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::CallbackIdentity("OnContainer")>(
|
||||||
|
player->getId(),
|
||||||
|
baseEvent->cell.getDescription().c_str());
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case ID_SCRIPT_LOCAL_SHORT:
|
case ID_SCRIPT_LOCAL_SHORT:
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_SCRIPT_LOCAL_SHORT from %s",
|
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_SCRIPT_LOCAL_SHORT from %s",
|
||||||
|
|
|
@ -123,6 +123,7 @@ public:
|
||||||
{"OnObjectLock", Function<void, unsigned short, const char*>()},
|
{"OnObjectLock", Function<void, unsigned short, const char*>()},
|
||||||
{"OnObjectUnlock", Function<void, unsigned short, const char*>()},
|
{"OnObjectUnlock", Function<void, unsigned short, const char*>()},
|
||||||
{"OnDoorState", Function<void, unsigned short, const char*>()},
|
{"OnDoorState", Function<void, unsigned short, const char*>()},
|
||||||
|
{"OnContainer", Function<void, unsigned short, const char*>()},
|
||||||
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
|
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
|
||||||
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
|
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
|
||||||
{"OnGUIAction", Function<void, unsigned short, int, const char*>()}
|
{"OnGUIAction", Function<void, unsigned short, int, const char*>()}
|
||||||
|
|
Loading…
Reference in a new issue