--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-08 17:34:01 -05:00
7 changed files with 74 additions and 13 deletions
+1 -1
View File
@@ -1376,7 +1376,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
go->AddToWorld();
map->Add(go);
m_BgObjects[type] = go->GetGUID();
return true;
}
+2 -2
View File
@@ -477,7 +477,7 @@ bool Map::Add(Player *player)
SendInitTransports(player);
player->m_clientGUIDs.clear();
AddNotifier(player);
//AddNotifier(player);
return true;
}
@@ -517,7 +517,7 @@ Map::Add(T *obj)
//if(obj->GetTypeId() != TYPEID_UNIT)
UpdateObjectVisibility(obj,cell,p);
AddNotifier(obj);
//AddNotifier(obj);
}
void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self, bool to_possessor)
+3 -1
View File
@@ -1674,7 +1674,9 @@ Map const* WorldObject::GetBaseMap() const
void WorldObject::AddObjectToRemoveList()
{
Map* map = MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
assert(m_uint32Values);
Map* map = FindMap();
if(!map)
{
sLog.outError("Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).",GetTypeId(),GetEntry(),GetGUIDLow(),GetMapId());
+10
View File
@@ -11007,6 +11007,16 @@ uint32 Unit::GetCreatePowers( Powers power ) const
return 0;
}
void Unit::AddToWorld()
{
if(!IsInWorld())
{
m_Notified = false;
m_IsInNotifyList = false;
SetToNotify();
}
}
void Unit::RemoveFromWorld()
{
// cleanup