mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap()
This commit is contained in:
parent
c37cfd0c2f
commit
ac00eee418
23 changed files with 105 additions and 105 deletions
|
|
@ -1644,7 +1644,7 @@ void World::ScriptsProcess()
|
|||
break;
|
||||
}
|
||||
((Unit *)source)->SendMonsterMoveWithSpeed(step.script->x, step.script->y, step.script->z, ((Unit *)source)->GetUnitMovementFlags(), step.script->datalong2 );
|
||||
MapManager::Instance().GetMap(((Unit *)source)->GetMapId(), ((Unit *)source))->CreatureRelocation(((Creature *)source), step.script->x, step.script->y, step.script->z, 0);
|
||||
((Unit *)source)->GetMap()->CreatureRelocation(((Creature *)source), step.script->x, step.script->y, step.script->z, 0);
|
||||
break;
|
||||
case SCRIPT_COMMAND_FLAG_SET:
|
||||
if(!source)
|
||||
|
|
@ -1770,7 +1770,7 @@ void World::ScriptsProcess()
|
|||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(summoner->GetMapId(), summoner));
|
||||
cell_lock->Visit(cell_lock, object_checker, *summoner->GetMap());
|
||||
|
||||
if ( !go )
|
||||
{
|
||||
|
|
@ -1794,7 +1794,7 @@ void World::ScriptsProcess()
|
|||
go->SetLootState(GO_READY);
|
||||
go->SetRespawnTime(time_to_despawn); //despawn object in ? seconds
|
||||
|
||||
MapManager::Instance().GetMap(go->GetMapId(), go)->Add(go);
|
||||
go->GetMap()->Add(go);
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_OPEN_DOOR:
|
||||
|
|
@ -1831,7 +1831,7 @@ void World::ScriptsProcess()
|
|||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(caster->GetMapId(), (Unit*)source));
|
||||
cell_lock->Visit(cell_lock, object_checker, *caster->GetMap());
|
||||
|
||||
if ( !door )
|
||||
{
|
||||
|
|
@ -1887,7 +1887,7 @@ void World::ScriptsProcess()
|
|||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(caster->GetMapId(), (Unit*)source));
|
||||
cell_lock->Visit(cell_lock, object_checker, *caster->GetMap());
|
||||
|
||||
if ( !door )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue