From 86bd3bfb422a299d6e0aac0f196ba4fea9affbc4 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 4 Apr 2009 15:04:24 -0600 Subject: *Do not check formation for pet and summoned creatures. --HG-- branch : trunk --- src/game/Creature.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 19d23162873..471934f4f80 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -199,9 +199,12 @@ void Creature::RemoveFromWorld() void Creature::SearchFormation() { + if(isPet()) + return; + uint32 lowguid = GetDBTableGUIDLow(); - if(CreatureGroupMap.find(lowguid) != CreatureGroupMap.end()) + if(lowguid && CreatureGroupMap.find(lowguid) != CreatureGroupMap.end()) { m_formationID = CreatureGroupMap[lowguid]->leaderGUID; formation_mgr.UpdateCreatureGroup(m_formationID, this); -- cgit v1.2.3 From 96f2363b04e599558a19295a008e048f3b7ac446 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 4 Apr 2009 15:14:19 -0600 Subject: *Add a missing part of visibility patch. --HG-- branch : trunk --- src/game/Map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 5feea0db084..20e5dd70ebc 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -625,7 +625,7 @@ void Map::RelocationNotify() for(std::vector::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter) { Unit *unit = *iter; - if(!unit->IsInWorld() || unit->GetMapId() != GetId()) + if(unit->m_Notified || !unit->IsInWorld() || unit->GetMapId() != GetId()) continue; unit->m_IsInNotifyList = false; -- cgit v1.2.3