1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

[Server] Add OnScriptGlobalShort event

This commit is contained in:
David Cernat 2019-09-14 13:09:01 +03:00
parent e424bd9bc3
commit afa704ce95
2 changed files with 9 additions and 1 deletions

View file

@ -207,7 +207,8 @@ public:
{"OnGUIAction", Callback<unsigned short, int, const char*>()}, {"OnGUIAction", Callback<unsigned short, int, const char*>()},
{"OnWorldKillCount", Callback<unsigned short>()}, {"OnWorldKillCount", Callback<unsigned short>()},
{"OnWorldMap", Callback<unsigned short>()}, {"OnWorldMap", Callback<unsigned short>()},
{"OnWorldWeather", Callback<unsigned short>() }, {"OnWorldWeather", Callback<unsigned short>()},
{"OnScriptGlobalShort", Callback<unsigned short>()},
{"OnMpNumIncrement", Callback<int>()}, {"OnMpNumIncrement", Callback<int>()},
{"OnRequestDataFileList", Callback<>()} {"OnRequestDataFileList", Callback<>()}
}; };

View file

@ -12,6 +12,13 @@ namespace mwmp
{ {
BPP_INIT(ID_SCRIPT_GLOBAL_SHORT) BPP_INIT(ID_SCRIPT_GLOBAL_SHORT)
} }
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
{
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
Script::Call<Script::CallbackIdentity("OnScriptGlobalShort")>(player.getId());
}
}; };
} }