diff options
| author | megamage <none@none> | 2009-05-20 11:44:38 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-20 11:44:38 -0500 |
| commit | 6473e943581439f57918abfa91a4d5a29e2f343c (patch) | |
| tree | 01b7419dcc1ac0444375d11b22cd55d72897854a /src/bindings/scripts/include | |
| parent | d1d194b4c78aec34d65a15ea68acff5c3a48687c (diff) | |
*Update Naxx scripts. Now only Kelthuzad is incompleted
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts/include')
| -rw-r--r-- | src/bindings/scripts/include/sc_creature.cpp | 28 | ||||
| -rw-r--r-- | src/bindings/scripts/include/sc_creature.h | 5 |
2 files changed, 2 insertions, 31 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index e22157cd28c..3e7a1a39878 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -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); diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index 7ce9e7e18ff..95bcadaceeb 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -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); |
