fix(Core/Misc): Change const to be after type name (#10591)

This commit is contained in:
Kitzunu 2022-02-14 20:05:45 +01:00 committed by GitHub
parent 9b83abca39
commit 455899dc75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
168 changed files with 438 additions and 438 deletions

View file

@ -71,7 +71,7 @@ struct boss_quartermaster_zigris : public BossAI
_JustDied();
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_STUNBOMB || spellInfo->Id == SPELL_HOOKEDNET)
{

View file

@ -196,7 +196,7 @@ public:
}
}
bool CanAIAttack(const Unit* /*target*/) const override { return me->IsVisible(); }
bool CanAIAttack(Unit const* /*target*/) const override { return me->IsVisible(); }
void JustReachedHome() override
{

View file

@ -237,7 +237,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Mechanic == MECHANIC_DISARM && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
@ -250,7 +250,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_MOUNT_TARGET_MIDNIGHT)
{
@ -355,7 +355,7 @@ public:
Talk(SAY_ATTUMEN2_DEATH);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Mechanic == MECHANIC_DISARM && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{

View file

@ -139,7 +139,7 @@ public:
creature->AI()->KilledUnit(who);
}
void SpellHit(Unit* /*who*/, const SpellInfo* spell) override
void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_INFERNAL_RELAY)
{
@ -247,7 +247,7 @@ public:
void EnfeebleHealthEffect()
{
const SpellInfo* info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT);
SpellInfo const* info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT);
if (!info)
return;

View file

@ -526,7 +526,7 @@ public:
DrinkInturrupted = true;
}
void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell) override
void SpellHit(Unit* /*pAttacker*/, SpellInfo const* Spell) override
{
//We only care about interrupt effects and only if they are durring a spell currently being cast
if ((Spell->Effects[0].Effect != SPELL_EFFECT_INTERRUPT_CAST &&

View file

@ -368,7 +368,7 @@ public:
me->DespawnOrUnsummon();
}
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* Spell) override
{
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand() % 10)))
{
@ -1127,7 +1127,7 @@ public:
me->DespawnOrUnsummon();
}
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* Spell) override
{
if (Spell->Id == SPELL_DRINK_POISON)
{

View file

@ -74,7 +74,7 @@ public:
SummonList summons;
ObjectGuid CrystalGUID;
bool CanAIAttack(const Unit* who) const override
bool CanAIAttack(Unit const* who) const override
{
return who->GetPositionX() > 216.0f;
}

View file

@ -258,7 +258,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING);
}
void SpellHit(Unit* caster, const SpellInfo* pSpell) override
void SpellHit(Unit* caster, SpellInfo const* pSpell) override
{
if (!_duelInProgress && pSpell->Id == SPELL_DUEL)
{

View file

@ -75,7 +75,7 @@ public:
Talk(SAY_AGGRO);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->IsAlive() && !speechCounter)
{

View file

@ -431,7 +431,7 @@ public:
Talk(SAY_MO_KILL);
}
void SpellHit(Unit* /*who*/, const SpellInfo* spell) override
void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
{
//When hit with resurrection say text
if (spell->Id == SPELL_SCARLET_RESURRECTION)

View file

@ -293,7 +293,7 @@ public:
}
// used for shadow portal
void SpellHitTarget(Unit* target, const SpellInfo* spellinfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellinfo) override
{
uint32 room = 0;
if (spellinfo && spellinfo->Id == SPELL_SHADOW_PORTAL && target && me->GetVictim())

View file

@ -448,7 +448,7 @@ public:
me->CastSpell(me, SPELL_DEMONIC_VAPOR_TRAIL_PERIODIC, true);
}
void SpellHitTarget(Unit*, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_DEMONIC_VAPOR)
me->CastSpell(me, SPELL_SUMMON_BLAZING_DEAD, true);

View file

@ -127,7 +127,7 @@ public:
damage = 0;
}
void SpellHit(Unit*, const SpellInfo* spell) override
void SpellHit(Unit*, SpellInfo const* spell) override
{
if (spell->Id == SPELL_TRANSFORM_SPLIT2)
EnterPhase(PHASE_HUMAN);

View file

@ -447,7 +447,7 @@ public:
void Reset() override { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_FIRE_BOMB_THROW)
DoCast(me, SPELL_FIRE_BOMB_DUMMY, true);
@ -668,7 +668,7 @@ public:
void UpdateAI(uint32 /*diff*/) override { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_HATCH_EGG)
{

View file

@ -582,7 +582,7 @@ public:
void EnterCombat(Unit* /*target*/) override { }
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ZAP_INFORM)
DoCast(caster, SPELL_ZAP_DAMAGE, true);

View file

@ -633,7 +633,7 @@ public:
}
}
void SpellHit(Unit*, const SpellInfo* spell) override
void SpellHit(Unit*, SpellInfo const* spell) override
{
if (spell->Id == SPELL_COSMETIC_SPEAR_THROW)
{

View file

@ -264,7 +264,7 @@ public:
uint32 timer;
ObjectGuid _targetGUID;
void SpellHit(Unit*, const SpellInfo* spellInfo) override
void SpellHit(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SHOOT && roll_chance_i(7))
me->CastSpell(me, SPELL_DEATHS_DOOR, true);

View file

@ -61,7 +61,7 @@ public:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (bReset || spell->Id != 3607)
return;

View file

@ -70,7 +70,7 @@ struct npc_brewfest_keg_thrower : public ScriptedAI
}
}
bool CanBeSeen(const Player* player) override
bool CanBeSeen(Player const* player) override
{
if (player->GetMountID() == RAM_DISPLAY_ID)
return true;
@ -343,7 +343,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterCombat(Unit*) override {}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_REPORT_DEATH)
{
@ -733,7 +733,7 @@ struct npc_dark_iron_guzzler : public ScriptedAI
who->CastSpell(who, SPELL_REPORT_DEATH, true);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (me->IsAlive() && spellInfo->Id == SPELL_PLAYER_MUG)
{

View file

@ -494,7 +494,7 @@ struct npc_soh_fire_trigger : public NullCreatureAI
me->SetDisableGravity(true);
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_START_FIRE)
{
@ -882,7 +882,7 @@ struct npc_hallows_end_train_fire : public NullCreatureAI
me->CastSpell(me, SPELL_FIRE_AURA_BASE, true);
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_WATER_SPLASH && caster->ToPlayer())
{
@ -998,7 +998,7 @@ struct boss_headless_horseman : public ScriptedAI
health = param;
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUMMONING_RHYME_TARGET)
{
@ -1007,7 +1007,7 @@ struct boss_headless_horseman : public ScriptedAI
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_THROW_HEAD_BACK)
{
@ -1228,7 +1228,7 @@ struct boss_headless_horseman_head : public ScriptedAI
uint32 timer;
bool handled;
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_THROW_HEAD_BACK)
{
@ -1239,7 +1239,7 @@ struct boss_headless_horseman_head : public ScriptedAI
}
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
switch (spellInfo->Id)
{
@ -1356,7 +1356,7 @@ struct boss_headless_horseman_pumpkin : public ScriptedAI
me->CastSpell(me, SPELL_PUMPKIN_VISUAL, true);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SPROUTING)
{

View file

@ -201,7 +201,7 @@ struct npc_pilgrims_bounty_chair : public VehicleAI
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
Unit* charm = target->GetCharm();
if (!charm || !charm->ToCreature())
@ -210,7 +210,7 @@ struct npc_pilgrims_bounty_chair : public VehicleAI
charm->ToCreature()->AI()->DoAction(spellInfo->Id);
}
void SpellHit(Unit* /*target*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*target*/, SpellInfo const* spellInfo) override
{
switch (spellInfo->Id)
{
@ -281,7 +281,7 @@ struct npc_pilgrims_bounty_plate : public NullCreatureAI
{
npc_pilgrims_bounty_plate(Creature* creature) : NullCreatureAI(creature) { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
switch (spellInfo->Id)
{

View file

@ -319,7 +319,7 @@ public:
void DoCastProtection()
{
// lets get spell info
const SpellInfo* info = sSpellMgr->GetSpellInfo(SPELL_PROTECTION_OF_ELUNE);
SpellInfo const* info = sSpellMgr->GetSpellInfo(SPELL_PROTECTION_OF_ELUNE);
if (!info)
return;

View file

@ -85,7 +85,7 @@ public:
events.ScheduleEvent(EVENT_SPELL_TIME_STOP, 20000);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TIME_STEP_H || spellInfo->Id == SPELL_TIME_STEP_N)
{

View file

@ -1568,7 +1568,7 @@ public:
changeTimer = time;
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_ARTHAS_CRUSADER_STRIKE)
{

View file

@ -510,7 +510,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target->IsPlayer() && spell->DurationEntry && spell->DurationEntry->ID == 328 && spell->Effects[EFFECT_1].TargetA.GetTarget() == 1 && (spell->Effects[EFFECT_1].Amplitude == 50 || spell->Effects[EFFECT_1].Amplitude == 215)) // Deep Breath
{

View file

@ -157,7 +157,7 @@ struct boss_twinemperorsAI : public ScriptedAI
}
}
void SpellHit(Unit* caster, const SpellInfo* entry) override
void SpellHit(Unit* caster, SpellInfo const* entry) override
{
if (caster == me)
return;

View file

@ -69,7 +69,7 @@ public:
void EnterCombat(Unit* /*who*/) override { }
void SpellHit(Unit* unit, const SpellInfo* spell) override
void SpellHit(Unit* unit, SpellInfo const* spell) override
{
if (spellhit)
return;

View file

@ -101,7 +101,7 @@ public:
}
}
void SpellHit(Unit* Caster, const SpellInfo* Spell) override
void SpellHit(Unit* Caster, SpellInfo const* Spell) override
{
if (Spell->SpellFamilyFlags[2] & 0x080000000)
{

View file

@ -218,7 +218,7 @@ public:
}
}
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) override
void SpellHit(Unit* /*pCaster*/, SpellInfo const* pSpell) override
{
if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN)
ClearSleeping();

View file

@ -615,7 +615,7 @@ public:
DoCast(SPELL_OMEN_SUMMON_SPOTLIGHT);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ELUNE_CANDLE)
{

View file

@ -188,7 +188,7 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY)
{

View file

@ -230,7 +230,7 @@ public:
}
}
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) override
void SpellHit(Unit* /*pCaster*/, SpellInfo const* pSpell) override
{
if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO)
ClearFaint();

View file

@ -144,7 +144,7 @@ class boss_anub_arak : public CreatureScript
void SummonHelpers(float x, float y, float z, uint32 spellId)
{
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
me->SummonCreature(spellInfo->Effects[EFFECT_0].MiscValue, x, y, z);
}

View file

@ -328,7 +328,7 @@ struct boss_taldaram : public BossAI
me->InterruptNonMeleeSpells(true);
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo *spellInfo) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_CONJURE_FLAME_SPHERE)
{

View file

@ -257,7 +257,7 @@ public:
}
}
bool CanAIAttack(const Unit* who) const override
bool CanAIAttack(Unit const* who) const override
{
return me->GetHomePosition().GetExactDist2d(who) < 52.0f;
}

View file

@ -137,7 +137,7 @@ public:
pInstance->SetData(BOSS_ARGENT_CHALLENGE, IN_PROGRESS);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == 66905 && me->GetHealth() == 1) // hammer throw back damage (15k)
me->CastSpell(me, 68197, true);

View file

@ -187,7 +187,7 @@ public:
}
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
switch( spell->Id )
{
@ -410,7 +410,7 @@ public:
events.RescheduleEvent(2, urand(3000, 4000)); // claw
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_BK_GHOUL_EXPLODE)
{
@ -419,7 +419,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
switch(spell->Id)
{

View file

@ -642,7 +642,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
switch( spell->Id )
{

View file

@ -416,7 +416,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target->GetEntry() != NPC_FROST_SPHERE;
}
@ -505,7 +505,7 @@ public:
me->m_Events.AddEvent(new HideNpcEvent(*me), me->m_Events.CalculateTime(5000));
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target->GetEntry() != NPC_FROST_SPHERE && !me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
@ -569,7 +569,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SPIKE_FAIL )
{
@ -640,7 +640,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if( !target || !spell )
return;
@ -713,7 +713,7 @@ public:
me->m_Events.AddEvent(new HideNpcEvent(*me), me->m_Events.CalculateTime(5000));
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target->GetEntry() != NPC_FROST_SPHERE;
}

View file

@ -145,7 +145,7 @@ public:
pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
switch( spell->Id )
{
@ -392,7 +392,7 @@ public:
events.RescheduleEvent(EVENT_SPELL_MISTRESS_KISS, urand(10000, 15000));
}
void SpellHit(Unit* /*caster*/, const SpellInfo* /*spell*/) override
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) override
{
//if (caster && spell && spell->Id == 66287 /*control vehicle*/)
// caster->ClearUnitState(UNIT_STATE_ONVEHICLE);

View file

@ -747,7 +747,7 @@ public:
if( !count || !GetOwner() )
return;
if( const SpellInfo* se = GetAura()->GetSpellInfo() )
if( SpellInfo const* se = GetAura()->GetSpellInfo() )
if( Unit* owner = GetOwner()->ToUnit() )
{
uint32 auraId = 0;

View file

@ -107,7 +107,7 @@ public:
}
}
bool IsValidDedicatedInsanityItem(const ItemTemplate* item)
bool IsValidDedicatedInsanityItem(ItemTemplate const* item)
{
if (!item) // should not happen, but checked in GetAverageItemLevel()
return true;

View file

@ -118,7 +118,7 @@ public:
}
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_TELEPORT)
{

View file

@ -144,7 +144,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (spell->Id == SPELL_PHANTOM_BLAST_H)
bAchiev = false;
@ -165,7 +165,7 @@ public:
}
}
bool CanAIAttack(const Unit* target) const override { return target->GetPositionZ() > 706.5f; }
bool CanAIAttack(Unit const* target) const override { return target->GetPositionZ() > 706.5f; }
void UpdateAI(uint32 diff) override
{

View file

@ -1460,7 +1460,7 @@ public:
summons.Despawn(s);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && target->IsAlive() && spell->Id == SPELL_LICH_KING_ZAP_PLAYER)
Unit::DealDamage(me, target, 10000);

View file

@ -169,7 +169,7 @@ public:
}
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
if (spell->Id == uint32(SPELL_SARONITE_TRIGGERED))
{

View file

@ -93,7 +93,7 @@ public:
pInstance->SetData(DATA_ICK, NOT_STARTED);
}
bool CanAIAttack(const Unit* /*who*/) const override
bool CanAIAttack(Unit const* /*who*/) const override
{
return pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) >= INSTANCE_PROGRESS_FINISHED_INTRO;
}
@ -113,7 +113,7 @@ public:
pInstance->SetData(DATA_ICK, IN_PROGRESS);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (!target || !spell)
return;

View file

@ -214,7 +214,7 @@ public:
Talk(RAND(SAY_SLAY_1, SAY_SLAY_2));
}
bool CanAIAttack(const Unit* who) const override
bool CanAIAttack(Unit const* who) const override
{
switch (who->GetEntry())
{

View file

@ -877,7 +877,7 @@ public:
uint16 timer1;
uint16 timer2;
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == 70827 && pInstance)
pInstance->SetData(DATA_ACHIEV_DONT_LOOK_UP, 0);
@ -1112,7 +1112,7 @@ public:
me->ApplySpellImmune(0, IMMUNITY_ID, 70827, true);
}
bool CanAIAttack(const Unit* who) const override
bool CanAIAttack(Unit const* who) const override
{
return who->GetEntry() == NPC_FALLEN_WARRIOR;
}
@ -1181,7 +1181,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if ((spell->Id == SPELL_TELEPORT_JAINA || spell->Id == SPELL_TELEPORT_SYLVANAS) && target && target->GetTypeId() == TYPEID_PLAYER)
{

View file

@ -93,7 +93,7 @@ public:
events.ScheduleEvent(EVENT_TRANSFORMATION, 12000);
}
void SpellHitTarget(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TRANSFORMATION)
{

View file

@ -573,7 +573,7 @@ public:
BossAI::EnterEvadeMode();
}
bool CanAIAttack(const Unit* /*target*/) const override
bool CanAIAttack(Unit const* /*target*/) const override
{
return me->IsVisible();
}

View file

@ -316,7 +316,7 @@ public:
creature->AI()->DoAction(ACTION_START_OUTRO);
}
bool CanAIAttack(const Unit* /*target*/) const override
bool CanAIAttack(Unit const* /*target*/) const override
{
return _introDone;
}

View file

@ -1047,7 +1047,7 @@ public:
}
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
return false;
@ -1386,7 +1386,7 @@ public:
}
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
return false;
@ -1445,7 +1445,7 @@ public:
{
npc_igb_ship_crewAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) {}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return _instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS && target->GetTransport() == me->GetTransport() && target->GetPositionZ() < 478.0f && (me->GetEntry() == NPC_SKYBREAKER_DECKHAND ? (target->GetPositionY() > 2042.0f) : (target->GetPositionY() < 2431.0f));
}
@ -1627,7 +1627,7 @@ struct npc_gunship_boarding_addAI : public ScriptedAI
checkTimer -= diff;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS && target->GetTransport() && target->GetTransport() != me->GetTransport() && target->GetPositionZ() < 478.0f && (me->GetEntry() == NPC_SKYBREAKER_SERGEANT || me->GetEntry() == NPC_SKYBREAKER_MARINE ? (target->GetPositionY() < 2431.0f) : (target->GetPositionY() > 2042.0f));
}
@ -1806,7 +1806,7 @@ public:
gunship_npc_AI::UpdateAI(diff);
}
bool CanAIAttack(const Unit* /*target*/) const override
bool CanAIAttack(Unit const* /*target*/) const override
{
return Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS;
}
@ -1880,7 +1880,7 @@ public:
DoSpellAttackIfReady(me->GetEntry() == NPC_SKYBREAKER_RIFLEMAN ? SPELL_SHOOT : SPELL_HURL_AXE);
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS && target->GetTransport() && target->GetTransport() != me->GetTransport();
}
@ -1935,7 +1935,7 @@ public:
me->_AddCreatureSpellCooldown(spellId, 0, 9000);
}
bool CanAIAttack(const Unit* /*target*/) const override
bool CanAIAttack(Unit const* /*target*/) const override
{
return Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS;
}
@ -2426,7 +2426,7 @@ public:
void CalculateDamage(SpellEffIndex /*effIndex*/)
{
PreventHitEffect(EFFECT_0);
const SpellInfo* si = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[0].TriggerSpell);
SpellInfo const* si = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[0].TriggerSpell);
if (!si)
return;
SpellCastTargets targets;

View file

@ -135,7 +135,7 @@ public:
instance->SetBossState(DATA_LORD_MARROWGAR, IN_PROGRESS);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && (spell->Id == 69055 || spell->Id == 70814)) // Bone Slice (Saber Lash)
for (uint8 i = 0; i < 3; ++i)

View file

@ -217,7 +217,7 @@ public:
return me->IsValidAttackTarget(target);
}
private:
const Unit* me;
Unit const* me;
};
class boss_professor_putricide : public CreatureScript
@ -283,7 +283,7 @@ public:
BossAI::AttackStart(who);
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return me->IsVisible() && target->GetPositionZ() > 388.0f && target->GetPositionZ() < 410.0f && target->GetPositionY() > 3157.1f && target->GetExactDist2dSq(4356.0f, 3211.0f) < 80.0f * 80.0f;
}
@ -895,8 +895,8 @@ public:
// big hax to unlock Abomination Eat Ooze ability, requires caster aura spell from difficulty X, but unlocks clientside when got base aura
void HandleScript(SpellEffIndex /*effIndex*/)
{
const SpellInfo* s1 = sSpellMgr->GetSpellInfo(70346);
const SpellInfo* s2 = sSpellMgr->GetSpellInfo(72456);
SpellInfo const* s1 = sSpellMgr->GetSpellInfo(70346);
SpellInfo const* s2 = sSpellMgr->GetSpellInfo(72456);
if (s1 && s2)
if (Unit* target = GetHitUnit())
{

View file

@ -354,7 +354,7 @@ public:
Talk(SAY_AGGRO);
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return me->IsVisible() && target->GetEntry() != NPC_CROK_SCOURGEBANE;
}
@ -947,7 +947,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo)
{
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo)
return false;

View file

@ -1766,7 +1766,7 @@ public:
DoMeleeAttackIfReady();
}
void SpellHitTarget(Unit* c, const SpellInfo* spell) override
void SpellHitTarget(Unit* c, SpellInfo const* spell) override
{
if (spell->Id == 71306 && c->GetTypeId() == TYPEID_UNIT) // Twisted Winds
{
@ -2856,7 +2856,7 @@ public:
return target->GetExactDist(4357.0f, 2769.0f, 356.0f) < 170.0f;
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (spell->Id == 71906 || spell->Id == 71942)
{

View file

@ -251,7 +251,7 @@ public:
SpellAreaForAreaMapBounds saBounds = sSpellMgr->GetSpellAreaForAreaMapBounds(4812);
for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if ((itr->second->raceMask & plr->getRaceMask()) && !creature->HasAura(itr->second->spellId))
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(itr->second->spellId))
if (SpellInfo const* si = sSpellMgr->GetSpellInfo(itr->second->spellId))
if (si->HasAura(SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT))
creature->AddAura(itr->second->spellId, creature);
}

View file

@ -226,7 +226,7 @@ public:
DoMeleeAttackIfReady();
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == RAID_MODE(SPELL_WIDOWS_EMBRACE, SPELL_MINION_WIDOWS_EMBRACE))
{

View file

@ -178,7 +178,7 @@ struct NotOnSameSide
public:
explicit NotOnSameSide(Unit* pSource) : m_inLiveSide(IN_LIVE_SIDE(pSource)) { }
bool operator() (const Unit* pTarget)
bool operator() (Unit const* pTarget)
{
return (m_inLiveSide != IN_LIVE_SIDE(pTarget));
}
@ -384,7 +384,7 @@ public:
return false;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
uint8 pos = urand(0, 4);
switch (spellInfo->Id)

View file

@ -107,7 +107,7 @@ public:
events.ScheduleEvent(EVENT_BERSERK, RAID_MODE(720000, 540000));
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25) && target->GetTypeId() == TYPEID_PLAYER)
{

View file

@ -194,7 +194,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_ICEBOLT_CAST)
{

View file

@ -310,7 +310,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_POWER_SPARK_MALYGOS_BUFF)
{

View file

@ -149,7 +149,7 @@ public:
summon->SetInCombatWithZone();
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id >= SPELL_FIRE_MAGUS_DEATH && spellInfo->Id <= SPELL_ARCANE_MAGUS_DEATH && caster->ToCreature())
{

View file

@ -232,7 +232,7 @@ public:
Talk(SAY_PLAYER_KILL);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
switch( spell->Id )
{

View file

@ -141,7 +141,7 @@ public:
Talk(SAY_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_DISPERSE)
Split();

View file

@ -246,7 +246,7 @@ public:
events.ScheduleEvent(EVENT_MOVE_TO_ANVIL, 0, 0, 2);
}
void SpellHitTarget(Unit* /*who*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*who*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TEMPER)
{

View file

@ -283,7 +283,7 @@ public:
bool _fedOnTears;
bool _heraldOfTheTitans;
bool IsValidHeraldItem(const ItemTemplate* item)
bool IsValidHeraldItem(ItemTemplate const* item)
{
if (!item) // should not happen, but checked in GetAverageItemLevel()
return true;

View file

@ -322,7 +322,7 @@ public:
me->CastSpell(me, SPELL_ELECTRICAL_CHARGE, true);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUPERCHARGE)
UpdatePhase();
@ -491,7 +491,7 @@ public:
Talk(SAY_MOLGEIM_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUPERCHARGE)
UpdatePhase();
@ -711,13 +711,13 @@ public:
Talk(SAY_BRUNDIR_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUPERCHARGE)
UpdatePhase();
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_CHAIN_LIGHTNING || spellInfo->Id == uint32(RAID_MODE(61916, 63482))) // Lightning Whirl triggered
_stunnedAchievement = false;

View file

@ -240,7 +240,7 @@ public:
}
void SummonedCreatureDespawn(Creature* cr) override { summons.Despawn(cr); }
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override;
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override;
void JustDied(Unit*) override;
void KilledUnit(Unit* who) override;
void SpellHitTarget(Unit* target, SpellInfo const* spell) override;
@ -608,7 +608,7 @@ void boss_flame_leviathan::boss_flame_leviathanAI::ScheduleEvents()
events.RescheduleEvent(EVENT_PURSUE, 0);
}
void boss_flame_leviathan::boss_flame_leviathanAI::SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo)
void boss_flame_leviathan::boss_flame_leviathanAI::SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo)
{
if (spellInfo->Id == SPELL_SYSTEMS_SHUTDOWN)
{
@ -1183,7 +1183,7 @@ public:
damage = 0;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE))
me->CastSpell(me, SPELL_BLAZE, true);

View file

@ -560,7 +560,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (spell->Id == SPELL_NATURE_BOMB_FLIGHT)
me->SummonCreature(NPC_NATURE_BOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());

View file

@ -200,7 +200,7 @@ public:
return 0;
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
bAchievShadowdodger = false;

View file

@ -314,7 +314,7 @@ public:
me->RemoveAura(SPELL_ICICLE_BOSS_AURA);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
switch( spell->Id )
{
@ -552,7 +552,7 @@ public:
summons.Despawn(s);
}
bool CanAIAttack(const Unit* t) const override
bool CanAIAttack(Unit const* t) const override
{
if (t->GetTypeId() == TYPEID_PLAYER)
return !t->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER);
@ -730,7 +730,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
switch( spell->Id )
{
@ -777,7 +777,7 @@ public:
events.ScheduleEvent(EVENT_PRIEST_SMITE, 2100);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@ -829,7 +829,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{
@ -873,7 +873,7 @@ public:
events.ScheduleEvent(EVENT_DRUID_STARLIGHT, 10000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@ -926,7 +926,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{
@ -970,7 +970,7 @@ public:
events.ScheduleEvent(EVENT_SHAMAN_STORM_CLOUD, 10000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@ -979,7 +979,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell->Id == SPELL_SHAMAN_STORM_CLOUD)
if (Aura* a = target->GetAura(SPELL_SHAMAN_STORM_CLOUD, me->GetGUID()))
@ -1026,7 +1026,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{
@ -1071,7 +1071,7 @@ public:
events.ScheduleEvent(EVENT_MAGE_MELT_ICE, 1000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@ -1141,7 +1141,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{

View file

@ -121,7 +121,7 @@ public:
me->CastSpell(me, 38757, true);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ACTIVATE_CONSTRUCT)
{
@ -325,7 +325,7 @@ public:
Unit::Kill(*itr, *itr);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (caster && spell->Id == SPELL_GRAB_CONTROL_2)
{

View file

@ -1255,7 +1255,7 @@ public:
return 0;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SELF_REPAIR )
{
@ -1597,7 +1597,7 @@ public:
p->ToCreature()->DespawnOrUnsummon(8000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SELF_REPAIR )
{
@ -1926,7 +1926,7 @@ public:
summons.Despawn(s);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SELF_REPAIR )
{
@ -1962,9 +1962,9 @@ public:
void AttackStart(Unit* /*who*/) override {}
void MoveInLineOfSight(Unit* /*who*/) override {}
bool CanAIAttack(const Unit* /*target*/) const override { return false; }
bool CanAIAttack(Unit const* /*target*/) const override { return false; }
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_MINE_EXPLOSION)
if (InstanceScript* pInstance = me->GetInstanceScript())
@ -2404,7 +2404,7 @@ public:
{
npc_ulduar_flames_spreadAI(Creature* pCreature) : NullCreatureAI(pCreature) {}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
switch( spell->Id )
{
@ -2503,7 +2503,7 @@ public:
{
npc_ulduar_rocket_strike_triggerAI(Creature* pCreature) : NullCreatureAI(pCreature) {}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (!target || !spell)
return;

View file

@ -213,7 +213,7 @@ public:
pInstance->SetData(TYPE_RAZORSCALE, DONE);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (!caster || !pInstance)
return;
@ -973,7 +973,7 @@ public:
timer2 = 6000;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target && target->GetEntry() != NPC_RAZORSCALE;
}
@ -1022,7 +1022,7 @@ public:
timer2 = 2000;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target && target->GetEntry() != NPC_RAZORSCALE;
}
@ -1078,7 +1078,7 @@ public:
timer2 = 6000;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target && target->GetEntry() != NPC_RAZORSCALE;
}

View file

@ -622,7 +622,7 @@ public:
}
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_LIGHTNING_ORB_CHARGER)
{
@ -633,7 +633,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_LIGHTNING_CHARGE_DAMAGE && target->GetTypeId() == TYPEID_PLAYER)
_hitByLightning = true;
@ -1093,7 +1093,7 @@ public:
me->SetDisableGravity(true);
}
void SpellHit(Unit*, const SpellInfo* spellInfo) override
void SpellHit(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_CHARGE_ORB)
me->CastSpell(me, SPELL_LIGHTNING_PILLAR_P1, true);
@ -1432,7 +1432,7 @@ public:
_checkTarget = true;
}
void SpellHit(Unit*, const SpellInfo* spellInfo) override
void SpellHit(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_RUNIC_SMASH_LEFT || spellInfo->Id == SPELL_RUNIC_SMASH_RIGHT)
{
@ -1645,7 +1645,7 @@ public:
}
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target->GetPositionX() < 2180 && target->GetPositionZ() < 425;
}

View file

@ -498,7 +498,7 @@ public:
me->CastSpell(pile, SPELL_ENERGY_ORB, true);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
// spawn not-so-random robots
if (spellInfo->Id == SPELL_ENERGY_ORB_TRIGGER && target->GetEntry() == NPC_PILE_TRIGGER)

View file

@ -611,7 +611,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SANITY)
if (Aura* aur = target->GetAura(SPELL_SANITY))
@ -1163,7 +1163,7 @@ public:
return 0;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_IN_THE_MAWS_OF_THE_OLD_GOD)
me->AddLootMode(32);
@ -1827,7 +1827,7 @@ public:
damage = me->GetHealth() - 1;
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SHADOW_BEACON)
caster->GetAI()->DoAction(ACTION_YOGG_SARON_SHADOW_BEACON);
@ -2247,7 +2247,7 @@ public:
me->CastSpell(me, SPELL_INSANE_PERIODIC, true);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_INSANE1)
{

View file

@ -321,7 +321,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == 47593) // SPELL_FLAME_VISUAL trigger
target->CastSpell(target, me->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);

View file

@ -196,7 +196,7 @@ public:
}
}
void SpellHitTarget(Unit*, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == 59302 && pInstance) // Bane trigger
pInstance->SetData(DATA_YMIRON_ACHIEVEMENT, false);

View file

@ -125,7 +125,7 @@ public:
events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
// restore minions health
if (spellInfo->Id == SPELL_OVERCHARGE)

View file

@ -95,7 +95,7 @@ public:
events.RescheduleEvent(EVENT_SPELL_MANA_DESTRUCTION, 20000);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (!target || !spell)
return;

View file

@ -320,7 +320,7 @@ public:
InstanceScript* pInstance;
uint32 uiRangeCheck_Timer;
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_CREATE_GLOBULE_VISUAL)
me->CastSpell(me, SPELL_WATER_GLOBULE, true);

View file

@ -132,7 +132,7 @@ public:
casterGuid.Clear();
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (phase || spell->Id != SPELL_SET_CART)
return;
@ -551,7 +551,7 @@ struct npc_beryl_sorcererAI : public CreatureAI
_events.ScheduleEvent(EVENT_FROSTBOLT, 3000, 4000);
}
void SpellHit(Unit* unit, const SpellInfo* spell) override
void SpellHit(Unit* unit, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ARCANE_CHAINS && !_chainsCast)
{
@ -774,7 +774,7 @@ public:
{
}
void SpellHit(Unit* unit, const SpellInfo* spell) override
void SpellHit(Unit* unit, SpellInfo const* spell) override
{
if (spell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER)
{

View file

@ -533,7 +533,7 @@ public:
me->SetCorpseDelay(1);
}
bool CanAIAttack(const Unit* who) const override
bool CanAIAttack(Unit const* who) const override
{
return who->GetEntry() == NPC_INJURED_7TH_LEGION_SOLDER;
}
@ -1145,7 +1145,7 @@ public:
ScriptedAI::AttackStart(who);
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE) || target->HasUnitState(UNIT_STATE_STUNNED) || me->GetDisplayId() == 11686)
return false;
@ -1893,7 +1893,7 @@ public:
Talk (SAY_AGGRO, player);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id != SPELL_HIGH_EXECUTORS_BRANDING_IRON)
return;

View file

@ -354,7 +354,7 @@ public:
_gender = Data;
}
void SpellHit(Unit* Caster, const SpellInfo* Spell) override
void SpellHit(Unit* Caster, SpellInfo const* Spell) override
{
if (Spell->Id == SPELL_OUTHOUSE_GROANS)
{
@ -534,7 +534,7 @@ public:
me->DespawnOrUnsummon(_despawnTimer);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_RENEW_SKIRMISHER && caster->GetTypeId() == TYPEID_PLAYER
&& caster->ToPlayer()->GetQuestStatus(QUEST_OVERWHELMED) == QUEST_STATUS_INCOMPLETE)

View file

@ -65,7 +65,7 @@ public:
}
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (caster && spellInfo->Id == 44454)
me->GetMotionMaster()->MovePoint(0, *caster);

View file

@ -398,7 +398,7 @@ public:
}
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override // for banana(51932), orange(51931), papaya(51933)
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override // for banana(51932), orange(51931), papaya(51933)
{
if (running)
{

View file

@ -147,7 +147,7 @@ public:
me->SetControlled(true, UNIT_STATE_STUNNED);
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_STORM_HAMMER)
{
@ -413,7 +413,7 @@ public:
setCharm = true;
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (!playerGUID && spellInfo->Id == SPELL_SPEAR_OF_HODIR)
{
@ -789,7 +789,7 @@ public:
me->DespawnOrUnsummon();
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id != SPELL_ICE_LANCE)
return;

View file

@ -477,14 +477,14 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_THROW_PORTAL_CRYSTAL)
if (Aura* aura = target->AddAura(SPELL_ARTHAS_PORTAL, target))
aura->SetDuration(48000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TOUCH_OF_DEATH)
{
@ -673,7 +673,7 @@ public:
me->DespawnOrUnsummon(1);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_UNLOCK_SHACKLE)
{
@ -728,7 +728,7 @@ public:
DoCast(me, SPELL_KNEEL, true); // Little Hack for kneel - Thanks Illy :P
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_FREE_RAGECLAW)
{
@ -927,7 +927,7 @@ public:
Reset();
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id != GYMERS_GRAB)
return;

View file

@ -91,7 +91,7 @@ public:
summon->CastSpell(summon, SPELL_FOCUS_FIRE_VISUAL, true);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_FOCUS_CAST)
target->CastSpell(target, DUNGEON_MODE(SPELL_FIERY_BLAST_N, SPELL_FIERY_BLAST_H), false);

View file

@ -240,7 +240,7 @@ public:
akama->AI()->EnterEvadeMode();
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target->GetEntry() != NPC_AKAMA && target->GetEntry() != NPC_MAIEV_SHADOWSONG;
}

View file

@ -316,7 +316,7 @@ public:
damage = 0;
}
bool CanAIAttack(const Unit* who) const override
bool CanAIAttack(Unit const* who) const override
{
return who->GetGUID() == ownerGUID;
}

View file

@ -331,7 +331,7 @@ public:
}
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER)
{
@ -975,7 +975,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
// Cast SPELL_BAD_PRESS_DAMAGE with scaled basepoints when the visual hits the target.
// Need Fix: When SPELL_BAD_PRESS_TRIGGER hits target it triggers spell SPELL_BAD_PRESS_DAMAGE by itself

View file

@ -163,7 +163,7 @@ public:
summoned->AI()->AttackStart(me);
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_CHAIN_LIGHTNING)
{
@ -512,7 +512,7 @@ public:
summoned->AI()->AttackStart(me);
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_KUR_CHAIN_LIGHTNING)
{

View file

@ -1728,7 +1728,7 @@ public:
PlayerGUID = who->GetGUID();
}
//void SpellHit(Unit* /*caster*/, const SpellInfo* /*spell*/)
//void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/)
//{
// DoCast(me, SPELL_DE_MATERIALIZE);
//}

View file

@ -251,7 +251,7 @@ public:
caster->AI()->SetData(TYPE_INFERNAL, DATA_DIED);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_SUMMON_INFERNAL)
{
@ -469,7 +469,7 @@ public:
me->SetVisible(true);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (!caster)
return;
@ -612,7 +612,7 @@ public:
events.ScheduleEvent(EVENT_SUNDER, urand(5000, 10000));
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (!caster)
return;
@ -1761,7 +1761,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (!tapped && spell->Id == SPELL_WHISTLE)
{

View file

@ -60,7 +60,7 @@ struct npc_pet_gen_soul_trader_beacon : public ScriptedAI
Player* GetOwner() const { return ObjectAccessor::GetPlayer(*me, ownerGUID); }
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_STEAL_ESSENCE_VISUAL && target == me)
{
@ -740,7 +740,7 @@ struct npc_pet_gen_fetch_ball : public NullCreatureAI
me->CastSpell(me, 48649 /*SPELL_PET_TOY_FETCH_BALL_COME_HERE*/, true);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == 48649 /*SPELL_PET_TOY_FETCH_BALL_COME_HERE*/)
{

View file

@ -461,7 +461,7 @@ class spell_dk_wandering_plague_aura : public AuraScript
bool CheckProc(ProcEventInfo& eventInfo)
{
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || !eventInfo.GetActionTarget() || !eventInfo.GetDamageInfo() || !eventInfo.GetActor())
return false;
@ -591,7 +591,7 @@ class spell_dk_dancing_rune_weapon : public AuraScript
if (!eventInfo.GetActor() || !eventInfo.GetActionTarget() || !eventInfo.GetActionTarget()->IsAlive() || eventInfo.GetActor()->GetTypeId() != TYPEID_PLAYER)
return false;
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo)
return true;
@ -636,7 +636,7 @@ class spell_dk_dancing_rune_weapon : public AuraScript
return;
dancingRuneWeapon->SetOrientation(dancingRuneWeapon->GetAngle(target));
if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
{
// xinef: ugly hack
if (!procSpell->IsAffectingArea())
@ -1338,7 +1338,7 @@ class spell_dk_death_grip : public SpellScript
else
{
caster->CastSpell(target, 49560, true);
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
if (!target->IsImmunedToSpellEffect(spellInfo, EFFECT_0))
target->InterruptNonMeleeSpells(true);
}
@ -1356,7 +1356,7 @@ class spell_dk_death_grip : public SpellScript
{
if (target != GetCaster())
{
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
if (!target->IsImmunedToSpellEffect(spellInfo, EFFECT_0))
target->InterruptNonMeleeSpells(false, 0, false);
}

Some files were not shown because too many files have changed in this diff Show more