Core/Creatures: Moved autoattack handling from scripts to game
This commit is contained in:
@@ -434,9 +434,7 @@ struct boss_garothi_worldbreaker : public BossAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->GetVictim() && me->GetVictim()->IsWithinMeleeRange(me))
|
||||
DoMeleeAttackIfReady();
|
||||
else
|
||||
if (!me->GetVictim() || !me->GetVictim()->IsWithinMeleeRange(me))
|
||||
DoSpellAttackIfReady(SPELL_CARNAGE);
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -291,8 +291,6 @@ struct boss_guarm : public BossAI
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
|
||||
|
||||
@@ -620,8 +620,6 @@ struct npc_illidari_fighting_invasion_begins : public ScriptedAI
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1110,8 +1108,6 @@ struct npc_inquisitor_baleful_molten_shore : public ScriptedAI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -205,8 +205,6 @@ struct boss_leymor : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -284,8 +282,6 @@ struct npc_arcane_tender : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
EventMap _events;
|
||||
|
||||
@@ -227,7 +227,6 @@ struct boss_telash_greywing : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
|
||||
@@ -124,8 +124,6 @@ struct npc_av_marshal_or_warmaster : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -169,8 +169,6 @@ struct boss_balinda : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -125,8 +125,6 @@ struct boss_drekthar : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -126,8 +126,6 @@ struct boss_galvangar : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -85,10 +85,7 @@ struct boss_vanndar : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -245,8 +245,6 @@ class boss_alizabal : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -140,8 +140,6 @@ class boss_occuthar : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -111,8 +111,6 @@ class boss_pit_lord_argaloth : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-11
@@ -202,8 +202,6 @@ public: npc_twilight_flame_caller() : CreatureScript("npc_twilight_flame_caller"
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -313,8 +311,6 @@ class npc_twilight_torturer : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -414,8 +410,6 @@ class npc_twilight_sadist : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -489,7 +483,6 @@ class npc_mad_prisoner : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -559,8 +552,6 @@ class npc_crazed_mage : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -653,8 +644,6 @@ class npc_raz_the_crazed : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
-2
@@ -95,8 +95,6 @@ class boss_ascendant_lord_obsidius : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -102,8 +102,6 @@ class boss_beauty : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -109,8 +109,6 @@ class boss_corla : public CreatureScript
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
-2
@@ -97,8 +97,6 @@ class boss_karsh_steelbender : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -122,8 +122,6 @@ class boss_romogg_bonecrusher : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -425,8 +425,6 @@ public:
|
||||
DoCastVictim(SPELL_MIGHTYBLOW);
|
||||
MightyBlow_Timer = 10000;
|
||||
} else MightyBlow_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
-2
@@ -76,8 +76,6 @@ class boss_ambassador_flamelash : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-6
@@ -279,8 +279,6 @@ struct boss_coren_direbrew : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -326,10 +324,7 @@ struct npc_coren_direbrew_sisters : public ScriptedAI
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
-2
@@ -105,8 +105,6 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -117,8 +117,6 @@ class boss_general_angerforge : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -86,8 +86,6 @@ class boss_high_interrogator_gerstahn : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -86,8 +86,6 @@ class boss_magmus : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
|
||||
-2
@@ -225,8 +225,6 @@ class boss_doomrel : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
|
||||
-1
@@ -93,7 +93,6 @@ struct boss_drakkisath : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ struct boss_gizrul_the_slavener : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -168,7 +168,6 @@ struct boss_gyth : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ struct boss_halycon : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
bool Summoned;
|
||||
|
||||
-1
@@ -81,7 +81,6 @@ struct boss_highlord_omokk : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -124,8 +124,6 @@ struct boss_lord_valthalak : public BossAI
|
||||
frenzy15 = true;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
bool frenzy40;
|
||||
|
||||
-1
@@ -86,7 +86,6 @@ struct boss_mother_smolderweb : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-1
@@ -126,7 +126,6 @@ struct boss_overlord_wyrmthalak : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-3
@@ -273,7 +273,6 @@ struct boss_pyroguard_emberseer : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -344,8 +343,6 @@ struct npc_blackhand_incarcerator : public ScriptedAI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
-1
@@ -81,7 +81,6 @@ struct quartermaster_zigris : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-1
@@ -438,7 +438,6 @@ struct boss_rend_blackhand : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
-1
@@ -88,7 +88,6 @@ struct boss_shadow_hunter_voshgajin : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
-1
@@ -90,7 +90,6 @@ struct boss_urok_doomhowl : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-1
@@ -107,7 +107,6 @@ struct boss_warmaster_voone : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -119,8 +119,6 @@ struct boss_broodlord : public BossAI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-5
@@ -171,9 +171,7 @@ struct boss_chromaggus : public BossAI
|
||||
Breath1_Spell = SPELL_FROSTBURN;
|
||||
Breath2_Spell = SPELL_IGNITEFLESH;
|
||||
break;
|
||||
};
|
||||
|
||||
EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -275,8 +273,6 @@ struct boss_chromaggus : public BossAI
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
Enraged = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -77,8 +77,6 @@ struct boss_ebonroc : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -79,8 +79,6 @@ struct boss_firemaw : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -85,8 +85,6 @@ struct boss_flamegor : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -568,8 +568,6 @@ struct boss_nefarian : public BossAI
|
||||
Phase3 = true;
|
||||
Talk(SAY_RAISE_SKELETONS);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -152,7 +152,6 @@ struct boss_razorgore : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
-2
@@ -213,8 +213,6 @@ struct boss_vaelastrasz : public BossAI
|
||||
Talk(SAY_HALFLIFE);
|
||||
HasYelled = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
|
||||
@@ -107,8 +107,6 @@ struct boss_baron_geddon : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -85,8 +85,6 @@ struct boss_garr : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -145,10 +143,7 @@ struct npc_firesworn : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -89,8 +89,6 @@ struct boss_gehennas : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -107,8 +107,6 @@ struct boss_golemagg : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -154,10 +152,7 @@ struct npc_core_rager : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -87,8 +87,6 @@ struct boss_lucifron : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -101,8 +101,6 @@ struct boss_magmadar : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-2
@@ -145,8 +145,6 @@ struct boss_majordomo : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -292,8 +292,6 @@ struct boss_ragnaros : public BossAI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,14 +315,6 @@ struct npc_son_of_flame : public ScriptedAI //didnt work correctly in EAI for me
|
||||
instance->SetData(DATA_RAGNAROS_ADDS, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
@@ -104,8 +104,6 @@ struct boss_shazzrah : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-4
@@ -119,8 +119,6 @@ struct boss_sulfuron : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -184,8 +182,6 @@ struct npc_flamewaker_priest : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -488,10 +488,7 @@ public:
|
||||
} else uiTimer -= uiDiff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
UpdateVictim();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
@@ -530,14 +527,6 @@ public:
|
||||
creature->AI()->SetData(2, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (!me->IsSummon())
|
||||
|
||||
@@ -116,8 +116,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -219,10 +219,7 @@ public:
|
||||
if (!UpdateVictim() && _phase != PHASE_NONE)
|
||||
return;
|
||||
|
||||
scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
scheduler.Update(diff);
|
||||
}
|
||||
|
||||
void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
|
||||
@@ -370,10 +367,7 @@ public:
|
||||
if (!UpdateVictim() || _phase == PHASE_MOUNTED)
|
||||
return;
|
||||
|
||||
scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -287,6 +287,7 @@ public:
|
||||
if (Vanish_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_VANISH);
|
||||
me->SetCanMelee(false);
|
||||
InVanish = true;
|
||||
Vanish_Timer = 30000;
|
||||
Wait_Timer = 5000;
|
||||
@@ -316,11 +317,9 @@ public:
|
||||
target->CastSpell(target, SPELL_GARROTE, true);
|
||||
|
||||
InVanish = false;
|
||||
me->SetCanMelee(true);
|
||||
} else Wait_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!InVanish)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -371,8 +370,6 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
{
|
||||
if (instance->GetBossState(DATA_MOROES) != IN_PROGRESS)
|
||||
EnterEvadeMode();
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -345,8 +345,6 @@ public:
|
||||
}
|
||||
} else PhaseTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -370,8 +370,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -550,8 +550,6 @@ public:
|
||||
EnfeebleResetTimer = 9000;
|
||||
} else EnfeebleTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void Cleanup(Creature* infernal, InfernalPoint *point)
|
||||
|
||||
@@ -173,6 +173,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->SetCanMelee(true);
|
||||
|
||||
// Not in progress
|
||||
instance->SetBossState(DATA_ARAN, NOT_STARTED);
|
||||
@@ -488,8 +489,7 @@ public:
|
||||
} else FlameWreathCheckTime -= diff;
|
||||
}
|
||||
|
||||
if (ArcaneCooldown && FireCooldown && FrostCooldown)
|
||||
DoMeleeAttackIfReady();
|
||||
me->SetCanMelee(ArcaneCooldown && FireCooldown && FrostCooldown);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*pAttacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
|
||||
|
||||
@@ -185,10 +185,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -303,10 +300,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -229,8 +229,6 @@ public:
|
||||
SummonTito();
|
||||
else SummonTitoTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -291,8 +289,6 @@ public:
|
||||
DoCastVictim(SPELL_YIPPING);
|
||||
YipTimer = 10000;
|
||||
} else YipTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -423,8 +419,6 @@ public:
|
||||
DoCast(target, SPELL_BRAIN_WIPE);
|
||||
BrainWipeTimer = 20000;
|
||||
} else BrainWipeTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -538,8 +532,6 @@ public:
|
||||
RustTimer = 6000;
|
||||
} else RustTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -652,8 +644,6 @@ public:
|
||||
DoCastVictim(SPELL_FRIGHTENED_SCREAM);
|
||||
ScreamTimer = urand(20000, 30000);
|
||||
} else ScreamTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -737,8 +727,6 @@ public:
|
||||
DoCastVictim(SPELL_CHAIN_LIGHTNING);
|
||||
ChainLightningTimer = 15000;
|
||||
} else ChainLightningTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -914,8 +902,6 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
if (ChaseTimer <= diff)
|
||||
{
|
||||
if (!IsChasing)
|
||||
@@ -1358,8 +1344,6 @@ public:
|
||||
DoCastVictim(SPELL_POISON_THRUST);
|
||||
PoisonThrustTimer = urand(10000, 20000);
|
||||
} else PoisonThrustTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1480,8 +1464,6 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
|
||||
|
||||
EternalAffectionTimer = urand(45000, 60000);
|
||||
} else EternalAffectionTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/)
|
||||
|
||||
@@ -474,8 +474,6 @@ struct npc_felblood_kaelthas_phoenix : public ScriptedAI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
|
||||
@@ -334,8 +334,6 @@ public:
|
||||
|
||||
SWPainTimer = 10000;
|
||||
} else SWPainTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -508,6 +506,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
me->SetVisible(true);
|
||||
me->SetCanMelee(true);
|
||||
|
||||
boss_priestess_lackey_commonAI::Reset();
|
||||
}
|
||||
@@ -531,6 +530,7 @@ public:
|
||||
AddThreat(unit, 1000.0f);
|
||||
|
||||
InVanish = true;
|
||||
me->SetCanMelee(false);
|
||||
Vanish_Timer = 30000;
|
||||
Wait_Timer = 10000;
|
||||
} else Vanish_Timer -= diff;
|
||||
@@ -543,6 +543,7 @@ public:
|
||||
DoCastVictim(SPELL_KIDNEY_SHOT, true);
|
||||
me->SetVisible(true); // ...? Hacklike
|
||||
InVanish = false;
|
||||
me->SetCanMelee(true);
|
||||
} else Wait_Timer -= diff;
|
||||
}
|
||||
|
||||
@@ -563,9 +564,6 @@ public:
|
||||
DoCastVictim(SPELL_EVISCERATE);
|
||||
Eviscerate_Timer = 4000;
|
||||
} else Eviscerate_Timer -= diff;
|
||||
|
||||
if (!InVanish)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -668,8 +666,6 @@ public:
|
||||
|
||||
Fear_Timer = 10000;
|
||||
} else Fear_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -732,8 +728,6 @@ public:
|
||||
DoCastVictim(SPELL_SNAP_KICK);
|
||||
Snap_Kick_Timer = 4500;
|
||||
} else Snap_Kick_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -865,8 +859,6 @@ public:
|
||||
|
||||
Blink_Timer = 8000;
|
||||
} else Blink_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -987,8 +979,6 @@ public:
|
||||
DoCastVictim(SPELL_FRIGHTENING_SHOUT);
|
||||
Frightening_Shout_Timer = 18000;
|
||||
} else Frightening_Shout_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1088,8 +1078,6 @@ public:
|
||||
Freezing_Trap_Timer = 15000;
|
||||
}
|
||||
} else Freezing_Trap_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1202,8 +1190,6 @@ public:
|
||||
DoCast(me, SPELL_LESSER_HEALING_WAVE);
|
||||
Healing_Wave_Timer = 5000;
|
||||
} else Healing_Wave_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1304,8 +1290,6 @@ public:
|
||||
DoCast(me, SPELL_HIGH_EXPLOSIVE_SHEEP);
|
||||
High_Explosive_Sheep_Timer = 65000;
|
||||
} else High_Explosive_Sheep_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -239,8 +239,6 @@ class boss_selin_fireheart : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_DRAIN_CRYSTAL, 20s, 25s, 0, PHASE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -167,8 +167,6 @@ class boss_vexallus : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -282,8 +282,6 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1069,31 +1067,22 @@ struct npc_scarlet_ghoul : public ScriptedAI
|
||||
Player* plrOwner = owner->ToPlayer();
|
||||
if (plrOwner && plrOwner->IsInCombat())
|
||||
{
|
||||
if (plrOwner->getAttackerForHelper() && plrOwner->getAttackerForHelper()->GetEntry() == NPC_GHOSTS)
|
||||
AttackStart(plrOwner->getAttackerForHelper());
|
||||
Unit* newTarget = plrOwner->getAttackerForHelper();
|
||||
if (newTarget && newTarget->GetEntry() == NPC_GHOSTS)
|
||||
AttackStart(newTarget);
|
||||
else
|
||||
FindMinions(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
}
|
||||
|
||||
//ScriptedAI::UpdateAI(diff);
|
||||
//Check if we have a current target
|
||||
if (me->EnsureVictim()->GetEntry() == NPC_GHOSTS)
|
||||
{
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
//If we are within range melee the target
|
||||
if (me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
me->AttackerStateUpdate(me->GetVictim());
|
||||
me->resetAttackTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
return target->GetEntry() == NPC_GHOSTS;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1259,8 +1248,6 @@ struct npc_hearthglen_crusader : public ScriptedAI
|
||||
|
||||
if (!me->IsWithinCombatRange(me->GetVictim(), _minimumRange))
|
||||
DoSpellAttackIfReady(me->m_spells[0]);
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
|
||||
|
||||
@@ -416,8 +416,6 @@ public:
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1465,8 +1465,6 @@ public:
|
||||
SetHoldState(false);
|
||||
|
||||
} else uiFight_duration -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,8 +107,6 @@ struct boss_arcanist_doan : public BossAI
|
||||
DoCastSelf(SPELL_ARCANE_BUBBLE);
|
||||
DoCastAOE(SPELL_DETONATION);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -96,8 +96,6 @@ struct boss_azshir_the_sleepless : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -605,8 +605,6 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -663,8 +661,6 @@ struct npc_pulsing_pumpkin : public ScriptedAI
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -120,8 +120,6 @@ struct boss_high_inquisitor_fairbanks : public BossAI
|
||||
|
||||
if (!_healTimer.Passed())
|
||||
_healTimer.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
|
||||
@@ -228,8 +228,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -343,9 +341,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->HasReactState(REACT_AGGRESSIVE))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
|
||||
|
||||
@@ -131,7 +131,6 @@ class boss_darkmaster_gandling : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -95,8 +95,6 @@ class boss_doctor_theolen_krastinov : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -97,8 +97,6 @@ class boss_illucia_barov : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -141,8 +141,6 @@ class boss_instructor_malicia : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -102,8 +102,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -252,8 +252,6 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -119,8 +119,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -91,8 +91,6 @@ class boss_lord_alexei_barov : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -96,8 +96,6 @@ class boss_lorekeeper_polkelt : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -110,8 +110,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -96,8 +96,6 @@ class boss_the_ravenian : public CreatureScript
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -111,8 +111,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId, uint32 pathId) override
|
||||
|
||||
@@ -256,8 +256,6 @@ struct boss_apothecary_hummel : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
|
||||
@@ -354,8 +352,6 @@ struct npc_apothecary_baxter : public npc_apothecary_genericAI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -122,7 +122,6 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -127,8 +127,6 @@ struct boss_baroness_anastari : public BossAI
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -224,8 +224,6 @@ public:
|
||||
//30 seconds until we should cast this again
|
||||
SummonRifleman_Timer = 30000;
|
||||
} else SummonRifleman_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -216,8 +216,6 @@ public:
|
||||
m_uiMindControl_Timer = 15000;
|
||||
} else m_uiMindControl_Timer -= uiDiff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -127,8 +127,6 @@ public:
|
||||
DoCastVictim(SPELL_MIGHTYBLOW);
|
||||
MightyBlow_Timer = 20000;
|
||||
} else MightyBlow_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user