[Server] Add OnScriptGlobalShort event

pull/541/head
David Cernat 5 years ago
parent e424bd9bc3
commit afa704ce95

@ -208,6 +208,7 @@ public:
{"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<>()}
}; };

@ -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());
}
}; };
} }

Loading…
Cancel
Save