Rename Map::Add to Map::AddToMap, Map::Remove to Map::RemoveFromMap for better management.

This commit is contained in:
megamage
2011-10-10 17:39:34 -04:00
parent d156e066cf
commit 3ba22d0d06
24 changed files with 85 additions and 84 deletions
@@ -1454,7 +1454,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
data.go_state = 1;
*/
// Add to world, so it can be later looked up from HashMapHolder
map->Add(go);
map->AddToMap(go);
m_BgObjects[type] = go->GetGUID();
return true;
}
@@ -1521,7 +1521,7 @@ void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
// Change state from GO_JUST_DEACTIVATED to GO_READY in case battleground is starting again
obj->SetLootState(GO_READY);
obj->SetRespawnTime(respawntime);
map->Add(obj);
map->AddToMap(obj);
}
}
@@ -1557,7 +1557,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
creature->SetSpeed(MOVE_WALK, cinfo->speed_walk);
creature->SetSpeed(MOVE_RUN, cinfo->speed_run);
map->Add(creature);
map->AddToMap(creature);
m_BgCreatures[type] = creature->GetGUID();
if (respawntime)
+1 -1
View File
@@ -895,7 +895,7 @@ bool ChatHandler::HandleCreatePetCommand(const char* /*args*/)
pet->InitPetCreateSpells();
pet->SetFullHealth();
pet->GetMap()->Add(pet->ToCreature());
pet->GetMap()->AddToMap(pet->ToCreature());
// visual effect for levelup
pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel());
@@ -382,7 +382,7 @@ void GameObject::Update(uint32 diff)
if (poolid)
sPoolMgr->UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
GetMap()->Add(this);
GetMap()->AddToMap(this);
break;
}
}
@@ -595,7 +595,7 @@ void GameObject::Refresh()
return;
if (isSpawned())
GetMap()->Add(this);
GetMap()->AddToMap(this);
}
void GameObject::AddUniqueUse(Player* player)
+3 -3
View File
@@ -2199,7 +2199,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
summon->SetHomePosition(pos);
summon->InitStats(duration);
Add(summon->ToCreature());
AddToMap(summon->ToCreature());
summon->InitSummon();
//ObjectAccessor::UpdateObjectVisibility(summon);
@@ -2307,7 +2307,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
break;
}
map->Add(pet->ToCreature());
map->AddToMap(pet->ToCreature());
switch (petType)
{
@@ -2368,7 +2368,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
((Unit*)this)->AddGameObject(go);
else
go->SetSpawnedByDefault(false);
map->Add(go);
map->AddToMap(go);
return go;
}
+2 -2
View File
@@ -185,7 +185,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
CreatureTemplate const* cinfo = GetCreatureInfo();
if (cinfo->type == CREATURE_TYPE_CRITTER)
{
map->Add(this->ToCreature());
map->AddToMap(this->ToCreature());
return true;
}
@@ -279,7 +279,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
}
owner->SetMinion(this, true);
map->Add(this->ToCreature());
map->AddToMap(this->ToCreature());
InitTalentForLevel(); // set original talents points before spell loading
+2 -2
View File
@@ -2278,7 +2278,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// remove from old map now
if (oldmap)
oldmap->Remove(this, false);
oldmap->RemoveFromMap(this, false);
// new final coordinates
float final_x = x;
@@ -5044,7 +5044,7 @@ void Player::BuildPlayerRepop()
sLog->outError("Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow());
return;
}
GetMap()->Add(corpse);
GetMap()->AddToMap(corpse);
// convert player body to ghost
SetHealth(1);
@@ -673,7 +673,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
return 0;
}
map->Add(creature);
map->AddToMap(creature);
m_NPCPassengerSet.insert(creature);
if (tguid == 0)
+2 -2
View File
@@ -1179,7 +1179,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!creature->LoadFromDB(*itr, map))
delete creature;
else
map->Add(creature);
map->AddToMap(creature);
}
}
}
@@ -1210,7 +1210,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
else
{
if (pGameobject->isSpawnedByDefault())
map->Add(pGameobject);
map->AddToMap(pGameobject);
}
}
}
+3 -3
View File
@@ -199,10 +199,10 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse)
{
ASSERT(corpse && corpse->GetType() != CORPSE_BONES);
if (corpse->FindMap())
if (Map* map = corpse->FindMap())
{
corpse->DestroyForNearbyPlayers();
corpse->FindMap()->Remove(corpse, false);
map->RemoveFromMap(corpse, false);
}
else
corpse->RemoveFromWorld();
@@ -317,7 +317,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia
}
// add bones in grid store if grid loaded where corpse placed
map->Add(bones);
map->AddToMap(bones);
}
// all references to the corpse should be removed at this point
+3 -3
View File
@@ -1636,7 +1636,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
delete go;
return 0;
}
map->Add(go);
map->AddToMap(go);
}
sLog->outDebug(LOG_FILTER_MAPS, "AddGOData: dbguid %u entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o);
@@ -1672,7 +1672,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
delete creature;
return false;
}
map->Add(creature);
map->AddToMap(creature);
}
}
return true;
@@ -1725,7 +1725,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
delete creature;
return 0;
}
map->Add(creature);
map->AddToMap(creature);
}
}
+24 -24
View File
@@ -404,7 +404,7 @@ void Map::LoadGrid(float x, float y)
EnsureGridLoaded(cell);
}
bool Map::Add(Player* player)
bool Map::AddToMap(Player* player)
{
// Check if we are adding to correct map
ASSERT (player->GetMap() == this);
@@ -448,7 +448,7 @@ void Map::InitializeObject(Creature* obj)
template<class T>
void
Map::Add(T *obj)
Map::AddToMap(T *obj)
{
CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
@@ -682,7 +682,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
}
}
void Map::Remove(Player* player, bool remove)
void Map::RemoveFromMap(Player* player, bool remove)
{
player->RemoveFromWorld();
SendRemoveTransports(player);
@@ -714,7 +714,7 @@ void Map::Remove(Player* player, bool remove)
template<class T>
void
Map::Remove(T *obj, bool remove)
Map::RemoveFromMap(T *obj, bool remove)
{
obj->RemoveFromWorld();
if (obj->isActiveObject())
@@ -2089,20 +2089,20 @@ void Map::RemoveAllObjectsInRemoveList()
if (!corpse)
sLog->outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
else
Remove(corpse, true);
RemoveFromMap(corpse, true);
break;
}
case TYPEID_DYNAMICOBJECT:
Remove((DynamicObject*)obj, true);
RemoveFromMap((DynamicObject*)obj, true);
break;
case TYPEID_GAMEOBJECT:
Remove((GameObject*)obj, true);
RemoveFromMap((GameObject*)obj, true);
break;
case TYPEID_UNIT:
// in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call
// make sure that like sources auras/etc removed before destructor start
obj->ToCreature()->CleanupsBeforeDelete();
Remove(obj->ToCreature(), true);
RemoveFromMap(obj->ToCreature(), true);
break;
default:
sLog->outError("Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
@@ -2212,15 +2212,15 @@ void Map::RemoveFromActive(Creature* c)
}
}
template void Map::Add(Corpse*);
template void Map::Add(Creature*);
template void Map::Add(GameObject*);
template void Map::Add(DynamicObject*);
template void Map::AddToMap(Corpse*);
template void Map::AddToMap(Creature*);
template void Map::AddToMap(GameObject*);
template void Map::AddToMap(DynamicObject*);
template void Map::Remove(Corpse*, bool);
template void Map::Remove(Creature*, bool);
template void Map::Remove(GameObject*, bool);
template void Map::Remove(DynamicObject*, bool);
template void Map::RemoveFromMap(Corpse*, bool);
template void Map::RemoveFromMap(Creature*, bool);
template void Map::RemoveFromMap(GameObject*, bool);
template void Map::RemoveFromMap(DynamicObject*, bool);
/* ******* Dungeon Instance Maps ******* */
@@ -2315,7 +2315,7 @@ bool InstanceMap::CanEnter(Player* player)
/*
Do map specific checks and add the player to the map if successful.
*/
bool InstanceMap::Add(Player* player)
bool InstanceMap::AddToMap(Player* player)
{
// TODO: Not sure about checking player level: already done in HandleAreaTriggerOpcode
// GMs still can teleport player in instance.
@@ -2425,7 +2425,7 @@ bool InstanceMap::Add(Player* player)
}
// this will acquire the same mutex so it cannot be in the previous block
Map::Add(player);
Map::AddToMap(player);
if (i_data)
i_data->OnPlayerEnter(player);
@@ -2441,13 +2441,13 @@ void InstanceMap::Update(const uint32 t_diff)
i_data->Update(t_diff);
}
void InstanceMap::Remove(Player* player, bool remove)
void InstanceMap::RemoveFromMap(Player* player, bool remove)
{
sLog->outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
//if last player set unload timer
if (!m_unloadTimer && m_mapRefManager.getSize() == 1)
m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
Map::Remove(player, remove);
Map::RemoveFromMap(player, remove);
// for normal instances schedule the reset after all players have left
SetResetSchedule(true);
}
@@ -2661,7 +2661,7 @@ bool BattlegroundMap::CanEnter(Player* player)
return Map::CanEnter(player);
}
bool BattlegroundMap::Add(Player* player)
bool BattlegroundMap::AddToMap(Player* player)
{
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
@@ -2671,13 +2671,13 @@ bool BattlegroundMap::Add(Player* player)
// reset instance validity, battleground maps do not homebind
player->m_InstanceValid = true;
}
return Map::Add(player);
return Map::AddToMap(player);
}
void BattlegroundMap::Remove(Player* player, bool remove)
void BattlegroundMap::RemoveFromMap(Player* player, bool remove)
{
sLog->outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
Map::Remove(player, remove);
Map::RemoveFromMap(player, remove);
}
void BattlegroundMap::SetUnload()
+8 -8
View File
@@ -244,10 +244,10 @@ class Map : public GridRefManager<NGridType>
return false;
}
virtual bool Add(Player*);
virtual void Remove(Player*, bool);
template<class T> void Add(T *);
template<class T> void Remove(T *, bool);
virtual bool AddToMap(Player*);
virtual void RemoveFromMap(Player*, bool);
template<class T> void AddToMap(T *);
template<class T> void RemoveFromMap(T *, bool);
void VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::ObjectUpdater, GridTypeMapContainer> &gridVisitor, TypeContainerVisitor<Trinity::ObjectUpdater, WorldTypeMapContainer> &worldVisitor);
virtual void Update(const uint32);
@@ -571,8 +571,8 @@ class InstanceMap : public Map
public:
InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent);
~InstanceMap();
bool Add(Player*);
void Remove(Player*, bool);
bool AddToMap(Player*);
void RemoveFromMap(Player*, bool);
void Update(const uint32);
void CreateInstanceData(bool load);
bool Reset(uint8 method);
@@ -601,8 +601,8 @@ class BattlegroundMap : public Map
BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode);
~BattlegroundMap();
bool Add(Player*);
void Remove(Player*, bool);
bool AddToMap(Player*);
void RemoveFromMap(Player*, bool);
bool CanEnter(Player* player);
void SetUnload();
//void UnloadAll(bool pForce);
+4 -4
View File
@@ -371,7 +371,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
return;
}
else
map->Add(creature);
map->AddToMap(creature);
}
}
}
@@ -399,7 +399,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
else
{
if (pGameobject->isSpawnedByDefault())
map->Add(pGameobject);
map->AddToMap(pGameobject);
}
}
}
@@ -507,7 +507,7 @@ void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
{
if (CreatureData const* data = sObjectMgr->GetCreatureData(obj->guid))
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
creature->GetMap()->Add(creature);
creature->GetMap()->AddToMap(creature);
}
// Method that does the respawn job on the specified gameobject
@@ -516,7 +516,7 @@ void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
{
if (GameObjectData const* data = sObjectMgr->GetGOData(obj->guid))
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->GetMap()->Add(pGameobject);
pGameobject->GetMap()->AddToMap(pGameobject);
}
// Nothing to do for a child Pool
+1 -1
View File
@@ -628,7 +628,7 @@ void Map::ScriptsProcess()
pGO->SetLootState(GO_READY);
pGO->SetRespawnTime(nTimeToDespawn);
pGO->GetMap()->Add(pGO);
pGO->GetMap()->AddToMap(pGO);
}
}
break;
@@ -920,7 +920,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
}
}
if (!pCurrChar->GetMap()->Add(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
if (!pCurrChar->GetMap()->AddToMap(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
{
AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId());
if (at)
@@ -68,7 +68,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
if (GetPlayer()->IsInWorld())
{
sLog->outCrash("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId());
oldMap->Remove(GetPlayer(), false);
oldMap->RemoveFromMap(GetPlayer(), false);
}
// relocate the player to the teleport destination
@@ -88,7 +88,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->SetMap(newMap);
GetPlayer()->SendInitialPacketsBeforeAddToMap();
if (!GetPlayer()->GetMap()->Add(GetPlayer()))
if (!GetPlayer()->GetMap()->AddToMap(GetPlayer()))
{
sLog->outError("WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.GetMapId());
GetPlayer()->ResetMap();
+1 -1
View File
@@ -494,7 +494,7 @@ void WorldSession::LogoutPlayer(bool Save)
_player->CleanupsBeforeDelete();
sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow());
Map* _map = _player->GetMap();
_map->Remove(_player, true);
_map->RemoveFromMap(_player, true);
SetPlayer(NULL); // deleted in Remove call
///- Send the 'logout complete' packet to the client
+10 -10
View File
@@ -2575,7 +2575,7 @@ void Spell::EffectPersistentAA(SpellEffIndex effIndex)
return;
}
dynObj->GetMap()->Add(dynObj);
dynObj->GetMap()->AddToMap(dynObj);
if (Aura* aura = Aura::TryCreate(m_spellInfo, MAX_EFFECT_MASK, dynObj, caster, &m_spellValue->EffectBasePoints[0]))
{
@@ -3422,7 +3422,7 @@ void Spell::EffectAddFarsight(SpellEffIndex effIndex)
dynObj->SetDuration(duration);
dynObj->setActive(true); //must before add to map to be put in world container
dynObj->GetMap()->Add(dynObj); //grid will also be loaded
dynObj->GetMap()->AddToMap(dynObj); //grid will also be loaded
dynObj->SetCasterViewpoint();
}
@@ -3812,7 +3812,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
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);
@@ -4378,7 +4378,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
// Wild object not have owner and check clickable by players
map->Add(pGameObj);
map->AddToMap(pGameObj);
if (pGameObj->GetGoType() == GAMEOBJECT_TYPE_FLAGDROP && m_caster->GetTypeId() == TYPEID_PLAYER)
{
@@ -4423,7 +4423,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, linkedGO);
// Wild object not have owner and check clickable by players
map->Add(linkedGO);
map->AddToMap(linkedGO);
}
else
{
@@ -5583,7 +5583,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
m_caster->AddGameObject(pGameObj);
map->Add(pGameObj);
map->AddToMap(pGameObj);
//END
// Send request
@@ -5934,7 +5934,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
map->Add(pGameObj);
map->AddToMap(pGameObj);
m_caster->m_ObjectSlot[slot] = pGameObj->GetGUID();
}
@@ -6630,7 +6630,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
//m_caster->AddGameObject(pGameObj);
//m_ObjToDel.push_back(pGameObj);
cMap->Add(pGameObj);
cMap->AddToMap(pGameObj);
if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
{
@@ -6645,7 +6645,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, linkedGO);
linkedGO->GetMap()->Add(linkedGO);
linkedGO->GetMap()->AddToMap(linkedGO);
}
else
{
@@ -6968,7 +6968,7 @@ void Spell::EffectCreateTamedPet(SpellEffIndex effIndex)
return;
// add to world
pet->GetMap()->Add(pet->ToCreature());
pet->GetMap()->AddToMap(pet->ToCreature());
// unitTarget has pet now
unitTarget->SetMinion(pet, true);
+1 -1
View File
@@ -925,7 +925,7 @@ public:
return false;
}
map->Add(v->ToCreature());
map->AddToMap(v->ToCreature());
return true;
}
+1 -1
View File
@@ -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));
+2 -2
View File
@@ -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);
+4 -4
View File
@@ -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);
}
}
}