mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
9a0de445b8
commit
e3f3f3410a
19 changed files with 88 additions and 406 deletions
|
|
@ -5471,17 +5471,9 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::RespawnDo u_do;
|
||||
MaNGOS::WorldObjectWorker<MaNGOS::RespawnDo> worker(pl,u_do);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
|
||||
cell.Visit(p, obj_worker, *pl->GetMap());
|
||||
|
||||
Cell::VisitGridObjects(pl, worker, pl->GetMap()->GetVisibilityDistance());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue