Sunwell: Fix save issue in KalecgosAI. Thanks to Amit86 and ogeraisi.

--HG--
branch : trunk
This commit is contained in:
maanuel
2009-12-18 22:26:18 -03:00
parent e6efa10efd
commit 7a3e524df2

View File

@@ -364,7 +364,20 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
return;
me->SetVisibility(VISIBILITY_OFF);
if (isFriendly)
{
me->setDeathState(JUST_DIED);
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.isEmpty())
{
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* pPlayer = itr->getSource();
if (pPlayer)
((InstanceMap*)me->GetMap())->PermBindAllPlayers(pPlayer);
}
}
}
else
{
me->GetMotionMaster()->MoveTargetedHome();