Rename Map::Add to Map::AddToMap, Map::Remove to Map::RemoveFromMap for better management.
This commit is contained in:
@@ -925,7 +925,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
map->Add(v->ToCreature());
|
||||
map->AddToMap(v->ToCreature());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
map->Add(object);
|
||||
map->AddToMap(object);
|
||||
|
||||
// TODO: is it really necessary to add both the real and DB table guid here ?
|
||||
sObjectMgr->AddGameobjectToGrid(guidLow, sObjectMgr->GetGOData(guidLow));
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
creature->LoadFromDB(db_guid, map);
|
||||
|
||||
map->Add(creature);
|
||||
map->AddToMap(creature);
|
||||
sObjectMgr->AddCreatureToGrid(db_guid, sObjectMgr->GetCreatureData(db_guid));
|
||||
return true;
|
||||
}
|
||||
@@ -1142,7 +1142,7 @@ public:
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
|
||||
|
||||
// add to world
|
||||
pet->GetMap()->Add(pet->ToCreature());
|
||||
pet->GetMap()->AddToMap(pet->ToCreature());
|
||||
|
||||
// visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level);
|
||||
|
||||
@@ -591,7 +591,7 @@ public:
|
||||
wpCreature2->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature2->LoadFromDB(wpCreature2->GetDBTableGUIDLow(), map);
|
||||
map->Add(wpCreature2);
|
||||
map->AddToMap(wpCreature2);
|
||||
//sMapMgr->GetMap(npcCreature->GetMapId())->Add(wpCreature2);
|
||||
}
|
||||
|
||||
@@ -790,7 +790,7 @@ public:
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(), map);
|
||||
map->Add(wpCreature);
|
||||
map->AddToMap(wpCreature);
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -837,7 +837,7 @@ public:
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
creature->LoadFromDB(creature->GetDBTableGUIDLow(), map);
|
||||
map->Add(creature);
|
||||
map->AddToMap(creature);
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -885,7 +885,7 @@ public:
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
creature->LoadFromDB(creature->GetDBTableGUIDLow(), map);
|
||||
map->Add(creature);
|
||||
map->AddToMap(creature);
|
||||
|
||||
if (target)
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//TODO: this should be handled in map, maybe add a summon function in map
|
||||
// There is no other way afaik...
|
||||
void SpawnGameObject(uint32 entry, Position& pos)
|
||||
{
|
||||
@@ -98,7 +99,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
instance->Add(go);
|
||||
instance->AddToMap(go);
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
|
||||
@@ -170,7 +170,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
else
|
||||
{
|
||||
go->SetRespawnTime(0);
|
||||
map->Add(go);
|
||||
map->AddToMap(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
else
|
||||
{
|
||||
go->SetRespawnTime(0);
|
||||
map->Add(go);
|
||||
map->AddToMap(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user