diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.cpp | 5 | ||||
-rw-r--r-- | src/game/Map.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
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); 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<Unit*>::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; |