[Server] Add SendActorList() script function

This commit is contained in:
David Cernat 2017-04-05 04:44:47 +03:00
parent 8c2469bf6d
commit c65e94587c
2 changed files with 8 additions and 0 deletions

View file

@ -271,6 +271,12 @@ void WorldFunctions::AddContainerItem() noexcept
tempWorldObject.containerChanges.items.push_back(containerItem); tempWorldObject.containerChanges.items.push_back(containerItem);
} }
void WorldFunctions::SendActorList() noexcept
{
mwmp::Networking::get().getWorldController()->GetPacket(ID_ACTOR_LIST)->setEvent(&scriptEvent);
mwmp::Networking::get().getWorldController()->GetPacket(ID_ACTOR_LIST)->Send(scriptEvent.guid);
}
void WorldFunctions::SendObjectDelete() noexcept void WorldFunctions::SendObjectDelete() noexcept
{ {
mwmp::Networking::get().getWorldController()->GetPacket(ID_OBJECT_DELETE)->setEvent(&scriptEvent); mwmp::Networking::get().getWorldController()->GetPacket(ID_OBJECT_DELETE)->setEvent(&scriptEvent);

View file

@ -51,6 +51,7 @@
{"AddWorldObject", WorldFunctions::AddWorldObject},\ {"AddWorldObject", WorldFunctions::AddWorldObject},\
{"AddContainerItem", WorldFunctions::AddContainerItem},\ {"AddContainerItem", WorldFunctions::AddContainerItem},\
\ \
{"SendActorList", WorldFunctions::SendActorList},\
{"SendObjectDelete", WorldFunctions::SendObjectDelete},\ {"SendObjectDelete", WorldFunctions::SendObjectDelete},\
{"SendObjectPlace", WorldFunctions::SendObjectPlace},\ {"SendObjectPlace", WorldFunctions::SendObjectPlace},\
{"SendObjectScale", WorldFunctions::SendObjectScale},\ {"SendObjectScale", WorldFunctions::SendObjectScale},\
@ -116,6 +117,7 @@ public:
static void AddWorldObject() noexcept; static void AddWorldObject() noexcept;
static void AddContainerItem() noexcept; static void AddContainerItem() noexcept;
static void SendActorList() noexcept;
static void SendObjectDelete() noexcept; static void SendObjectDelete() noexcept;
static void SendObjectPlace() noexcept; static void SendObjectPlace() noexcept;
static void SendObjectScale() noexcept; static void SendObjectScale() noexcept;