*Update Naxx scripts. Now only Kelthuzad is incompleted

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-20 11:44:38 -05:00
parent d1d194b4c7
commit 6473e94358
26 changed files with 855 additions and 917 deletions
+2 -26
View File
@@ -134,23 +134,6 @@ void ScriptedAI::DoStopAttack()
}
}
void ScriptedAI::DoCast(Unit* victim, uint32 spellId, bool triggered)
{
if (!victim || m_creature->hasUnitState(UNIT_STAT_CASTING) && !triggered)
return;
//m_creature->StopMoving();
m_creature->CastSpell(victim, spellId, triggered);
}
void ScriptedAI::DoCastAOE(uint32 spellId, bool triggered)
{
if(!triggered && m_creature->hasUnitState(UNIT_STAT_CASTING))
return;
m_creature->CastSpell((Unit*)NULL, spellId, triggered);
}
void ScriptedAI::DoCastSpell(Unit* who,SpellEntry const *spellInfo, bool triggered)
{
if (!who || m_creature->IsNonMeleeSpellCasted(false))
@@ -370,15 +353,6 @@ bool ScriptedAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered)
return true;
}
float GetSpellMaxRangeForHostile(uint32 id)
{
SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(id);
if(!spellInfo) return 0;
SpellRangeEntry const *range = GetSpellRangeStore()->LookupEntry(spellInfo->rangeIndex);
if(!range) return 0;
return range->maxRangeHostile;
}
void FillSpellSummary()
{
SpellSummary = new TSpellSummary[GetSpellStore()->GetNumRows()];
@@ -647,6 +621,7 @@ BossAI::BossAI(Creature *c, uint32 id) : ScriptedAI(c)
void BossAI::_Reset()
{
me->setActive(false);
events.Reset();
summons.DespawnAll();
if(instance)
@@ -663,6 +638,7 @@ void BossAI::_JustDied()
void BossAI::_EnterCombat()
{
me->setActive(true);
DoZoneInCombat();
if(instance)
instance->SetBossState(bossId, IN_PROGRESS);
@@ -29,7 +29,6 @@ class SummonList : private std::list<uint64>
Creature *m_creature;
};
float GetSpellMaxRangeForHostile(uint32 id);
//Get a single creature of given entry
Unit* FindCreature(uint32 entry, float range, Unit* Finder);
@@ -123,10 +122,6 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
//Stop attack of current victim
void DoStopAttack();
//Cast spell by Id
void DoCast(Unit* victim, uint32 spellId, bool triggered = false);
void DoCastAOE(uint32 spellId, bool triggered = false);
//Cast spell by spell info
void DoCastSpell(Unit* who,SpellEntry const *spellInfo, bool triggered = false);