[svn] Fix a crash caused by gruul script.
Change in EffectSummonWild and DoZoneInCombat. --HG-- branch : trunk
This commit is contained in:
1 parent
67f95a5281
commit
0a3057972c
4 files changed
+34
-16
No files matched your search
@@ -458,18 +458,17 @@ void ScriptedAI::DoZoneInCombat(Unit* pUnit)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pUnit->CanHaveThreatList() || pUnit->getThreatManager().isThreatListEmpty())
|
||||
/*if (!pUnit->CanHaveThreatList() || pUnit->getThreatManager().isThreatListEmpty())
|
||||
{
|
||||
error_log("SD2: DoZoneInCombat called for creature that either cannot have threat list or has empty threat list (pUnit entry = %d)", pUnit->GetTypeId() == TYPEID_UNIT ? ((Creature*)pUnit)->GetEntry() : 0);
|
||||
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();
|
||||
InstanceMap::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if(!(*i)->isGameMaster())
|
||||
if((*i)->isAlive())
|
||||
pUnit->AddThreat(*i, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user