aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraczman <none@none>2009-04-04 23:33:16 +0200
committerraczman <none@none>2009-04-04 23:33:16 +0200
commitc4821eef7accfdb70683887f5b9b67c780516f2f (patch)
treee7f2915bee846c735e6e0f53a0a607e840476e6f /src
parent85df8e05823b8d19de0fcc75daf0b464d244f8a4 (diff)
parent96f2363b04e599558a19295a008e048f3b7ac446 (diff)
Merge.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Creature.cpp5
-rw-r--r--src/game/Map.cpp2
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;