[Server] Store data from ActorPosition in the ActorLists of Cells

0.6.1
David Cernat 8 years ago
parent 1a699329e5
commit fafed96bf4

@ -81,8 +81,15 @@ void Cell::readActorList(unsigned char packetID, const mwmp::BaseActorList *newA
switch (packetID)
{
case ID_ACTOR_POSITION:
cellActor->hasPositionData = true;
cellActor->position = newActor.position;
break;
case ID_ACTOR_STATS_DYNAMIC:
cellActor->hasStatsDynamicData = true;
cellActor->creatureStats.mDynamic[0] = newActor.creatureStats.mDynamic[0];
cellActor->creatureStats.mDynamic[1] = newActor.creatureStats.mDynamic[1];
cellActor->creatureStats.mDynamic[2] = newActor.creatureStats.mDynamic[2];

@ -19,9 +19,10 @@ namespace mwmp
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
if (serverCell != nullptr)
{
serverCell->readActorList(packetID, &actorList);
serverCell->sendToLoaded(&packet, &actorList);
//Script::Call<Script::CallbackIdentity("OnActorPosition")>(player.getId(), actorList.cell.getDescription().c_str());
}
}
};
}

Loading…
Cancel
Save