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
|
|
@ -288,7 +288,7 @@ bool ChatHandler::HandleGPSCommand(const char* args)
|
|||
|
||||
Map2ZoneCoordinates(zone_x,zone_y,zone_id);
|
||||
|
||||
Map const *map = MapManager::Instance().GetMap(obj->GetMapId(), obj);
|
||||
Map const *map = obj->GetMap();
|
||||
float ground_z = map->GetHeight(obj->GetPositionX(), obj->GetPositionY(), MAX_HEIGHT);
|
||||
float floor_z = map->GetHeight(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ());
|
||||
|
||||
|
|
@ -349,11 +349,11 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
Map* pMap = MapManager::Instance().GetMap(m_session->GetPlayer()->GetMapId(),m_session->GetPlayer());
|
||||
Map* pMap = m_session->GetPlayer()->GetMap();
|
||||
|
||||
if(pMap->Instanceable())
|
||||
{
|
||||
Map* cMap = MapManager::Instance().GetMap(chr->GetMapId(),chr);
|
||||
Map* cMap = chr->GetMap();
|
||||
if( cMap->Instanceable() && cMap->GetInstanceId() != pMap->GetInstanceId() )
|
||||
{
|
||||
// cannot summon from instance to instance
|
||||
|
|
@ -435,7 +435,7 @@ bool ChatHandler::HandleGonameCommand(const char* args)
|
|||
Player *chr = objmgr.GetPlayer(name.c_str());
|
||||
if (chr)
|
||||
{
|
||||
Map* cMap = MapManager::Instance().GetMap(chr->GetMapId(),chr);
|
||||
Map* cMap = chr->GetMap();
|
||||
if(cMap->Instanceable())
|
||||
{
|
||||
// we have to go to instance, and can go to player only if:
|
||||
|
|
@ -2058,7 +2058,7 @@ bool ChatHandler::HandleGroupgoCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
Map* gmMap = MapManager::Instance().GetMap(m_session->GetPlayer()->GetMapId(),m_session->GetPlayer());
|
||||
Map* gmMap = m_session->GetPlayer()->GetMap();
|
||||
bool to_instance = gmMap->Instanceable();
|
||||
|
||||
// we are in instance, and can summon only player in our group with us as lead
|
||||
|
|
@ -2088,7 +2088,7 @@ bool ChatHandler::HandleGroupgoCommand(const char* args)
|
|||
|
||||
if (to_instance)
|
||||
{
|
||||
Map* plMap = MapManager::Instance().GetMap(pl->GetMapId(),pl);
|
||||
Map* plMap = pl->GetMap();
|
||||
|
||||
if ( plMap->Instanceable() && plMap->GetInstanceId() != gmMap->GetInstanceId() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue