[Server] Remove hardcoded sync for VideoPlay and add OnVideoPlay event

0.6.3
David Cernat 7 years ago
parent ae8b5a0709
commit 7f0549fc4f

@ -337,6 +337,7 @@ public:
{"OnObjectLock", Function<void, unsigned short, const char*>()}, {"OnObjectLock", Function<void, unsigned short, const char*>()},
{"OnObjectScale", Function<void, unsigned short, const char*>()}, {"OnObjectScale", Function<void, unsigned short, const char*>()},
{"OnObjectTrap", Function<void, unsigned short, const char*>()}, {"OnObjectTrap", Function<void, unsigned short, const char*>()},
{"OnVideoPlay", Function<void, unsigned short, const char*>()},
{"OnActorList", Function<void, unsigned short, const char*>()}, {"OnActorList", Function<void, unsigned short, const char*>()},
{"OnActorEquipment", Function<void, unsigned short, const char*>()}, {"OnActorEquipment", Function<void, unsigned short, const char*>()},
{"OnActorDeath", Function<void, unsigned short, const char*>()}, {"OnActorDeath", Function<void, unsigned short, const char*>()},

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

Loading…
Cancel
Save