*More cleanup of scripts.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-04 17:49:51 -05:00
parent cd632749d6
commit 17591b40c1
5 changed files with 4 additions and 9 deletions

View File

@@ -70,7 +70,7 @@ void SummonList::DespawnAll()
{
erase(begin());
summon->SetVisibility(VISIBILITY_OFF);
if(summon->HasSummonMask(SUMMON_MASK_SUMMON) && !summon->isPet())
if(summon->isSummon() && !summon->isPet())
((TempSummon*)summon)->UnSummon();
else
summon->setDeathState(JUST_DIED);

View File

@@ -322,8 +322,6 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
m_creature->InterruptNonMeleeSpells(true);
m_creature->CastSpell(m_creature,SPELL_ETHEREAL_APPRENTICE,true);
if( m_creature->isPet() )
((Pet*)m_creature)->SetDuration(0);
KillSelf();
return;
}else Apprentice_Timer -= diff;

View File

@@ -163,7 +163,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
void EnterCombat(Unit *who)
{
PlayerList = &((InstanceMap*)m_creature->GetMap())->GetPlayers();
PlayerList = &m_creature->GetMap()->GetPlayers();
Playercount = PlayerList->getSize();
StartEvent();
}

View File

@@ -606,7 +606,7 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
if(map->IsDungeon())
{
InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();
InstanceMap::PlayerList const &PlayerList = map->GetPlayers();
for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if(i->getSource()->isAlive())

View File

@@ -311,10 +311,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
void DeleteLegs()
{
InstanceMap::PlayerList const &playerliste = ((InstanceMap*)m_creature->GetMap())->GetPlayers();
InstanceMap::PlayerList::const_iterator it;
Map::PlayerList const &PlayerList = ((InstanceMap*)m_creature->GetMap())->GetPlayers();
Map::PlayerList const &PlayerList = m_creature->GetMap()->GetPlayers();
for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
Player* i_pl = i->getSource();