Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-08-26 22:29:54 +08:00
358 changed files with 1165 additions and 1381 deletions
@@ -95,7 +95,7 @@ class boss_anub_arak : public CreatureScript
void MoveInLineOfSight(Unit* who) override
{
if (!intro && who->GetTypeId() == TYPEID_PLAYER)
if (!intro && who->IsPlayer())
{
intro = true;
Talk(SAY_INTRO);
@@ -304,4 +304,3 @@ void AddSC_boss_anub_arak()
RegisterSpellScript(spell_azjol_nerub_pound);
RegisterSpellScript(spell_azjol_nerub_impale_summon);
}
@@ -415,4 +415,3 @@ void AddSC_boss_hadronox()
RegisterSpellScript(spell_hadronox_leech_poison_aura);
new achievement_hadronox_denied();
}
@@ -350,4 +350,3 @@ void AddSC_boss_amanitar()
// Spells
RegisterSpellScript(spell_amanitar_remove_mushroom_power);
}
@@ -146,7 +146,7 @@ struct boss_elder_nadox : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
Talk(SAY_SLAY);
}
@@ -395,4 +395,3 @@ void AddSC_boss_elder_nadox()
// Achievements
new achievement_respect_your_elders();
}
@@ -151,7 +151,7 @@ struct boss_volazj : public BossAI
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
{
switch (urand(0, 2))
{
@@ -504,4 +504,3 @@ void AddSC_boss_volazj()
RegisterSpellScript(spell_herald_volzaj_insanity);
RegisterSpellScript(spell_volazj_whisper);
}
@@ -735,4 +735,3 @@ void AddSC_boss_jedoga_shadowseeker()
// Achievements
new achievement_volunteer_work();
}
@@ -420,7 +420,7 @@ struct boss_taldaram : public BossAI
if (reference)
{
Unit const* pTarget = ObjectAccessor::GetUnit(*me, reference->getUnitGuid());
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->IsAlive())
if (pTarget && pTarget->IsPlayer() && pTarget->IsAlive())
{
++count;
}
@@ -549,4 +549,3 @@ void AddSC_boss_taldaram()
RegisterSpellScript(spell_prince_taldaram_conjure_flame_sphere);
RegisterSpellScript(spell_prince_taldaram_flame_sphere_summon);
}
@@ -389,7 +389,7 @@ public:
void KilledUnit(Unit* pVictim) override
{
if (!urand(0, 2) && pVictim->GetTypeId() == TYPEID_PLAYER)
if (!urand(0, 2) && pVictim->IsPlayer())
{
Talk(SAY_SARTHARION_SLAY);
}
@@ -194,4 +194,3 @@ void AddSC_instance_obsidian_sanctum()
{
new instance_obsidian_sanctum();
}
@@ -308,7 +308,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && events.GetNextEventTime(EVENT_KILL_TALK) == 0)
if (victim->IsPlayer() && events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -475,7 +475,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
if (victim->IsPlayer() && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
Talk(SAY_KILL);
_events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -1358,4 +1358,3 @@ void AddSC_boss_halion()
RegisterSpellScript(spell_halion_twilight_division);
RegisterSpellScript(spell_halion_twilight_mending);
}
@@ -229,4 +229,3 @@ void AddSC_boss_saviana_ragefire()
RegisterSpellScript(spell_saviana_conflagration_init);
RegisterSpellScript(spell_saviana_conflagration_throwback);
}
@@ -276,4 +276,3 @@ void AddSC_instance_ruby_sanctum()
new instance_ruby_sanctum();
RegisterSpellScript(spell_ruby_sanctum_rallying_shout);
}
@@ -116,7 +116,7 @@ public:
void KilledUnit(Unit* who) override
{
if( who->GetTypeId() == TYPEID_PLAYER )
if( who->IsPlayer() )
{
Talk(SAY_EADRIC_KILL_PLAYER);
}
@@ -243,7 +243,7 @@ public:
void KilledUnit(Unit* who) override
{
if( who->GetTypeId() == TYPEID_PLAYER )
if( who->IsPlayer() )
{
Talk(SAY_PALETRESS_KILL_PLAYER);
}
@@ -822,4 +822,3 @@ void AddSC_boss_argent_challenge()
RegisterSpellScript(spell_toc5_light_rain);
RegisterSpellScript(spell_reflective_shield_aura);
}
@@ -305,7 +305,7 @@ public:
void KilledUnit(Unit* victim) override
{
if( victim->GetTypeId() == TYPEID_PLAYER )
if( victim->IsPlayer() )
{
Talk(SAY_BK_KILL_PLAYER);
}
@@ -434,7 +434,7 @@ public:
}
break;
case SPELL_EXPLODE_H:
if (target && target->GetTypeId() == TYPEID_PLAYER)
if (target && target->IsPlayer())
if (pInstance)
pInstance->SetData(DATA_ACHIEV_IVE_HAD_WORSE, 0);
break;
@@ -1310,4 +1310,3 @@ void AddSC_instance_trial_of_the_champion()
{
new instance_trial_of_the_champion();
}
@@ -385,7 +385,7 @@ public:
void KilledUnit(Unit* who) override
{
if( who->GetTypeId() == TYPEID_PLAYER )
if( who->IsPlayer() )
Talk(SAY_KILL_PLAYER);
}
@@ -955,4 +955,3 @@ void AddSC_boss_anubarak_trial()
new spell_gen_leeching_swarm();
new spell_gen_leeching_swarm_dmg();
}
@@ -107,7 +107,7 @@ struct boss_faction_championsAI : public ScriptedAI
for( ThreatContainer::StorageType::const_iterator itr = tList.begin(); itr != tList.end(); ++itr )
{
Unit* pUnit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if( pUnit && pUnit->GetTypeId() == TYPEID_PLAYER && me->GetThreatMgr().GetThreat(pUnit) )
if( pUnit && pUnit->IsPlayer() && me->GetThreatMgr().GetThreat(pUnit) )
{
float threatMod = GetThreatMod(me->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth(), pUnit->GetMaxHealth(), pUnit);
me->GetThreatMgr().ModifyThreatByPercent(pUnit, -100);
@@ -2496,4 +2496,3 @@ void AddSC_boss_faction_champions()
new npc_toc_pet_hunter();
new spell_faction_champion_warl_unstable_affliction();
}
@@ -524,4 +524,3 @@ void AddSC_boss_jaraxxus()
new spell_toc25_mistress_kiss();
new spell_mistress_kiss_area();
}
@@ -161,12 +161,12 @@ public:
case 0:
break;
case EVENT_SPELL_SNOBOLLED:
if( t->GetTypeId() == TYPEID_PLAYER )
if( t->IsPlayer() )
me->CastSpell((Unit*)nullptr, SPELL_SNOBOLLED, true);
break;
case EVENT_SPELL_BATTER:
if( t->GetTypeId() == TYPEID_PLAYER )
if( t->IsPlayer() )
me->CastSpell(t, SPELL_BATTER);
events.Repeat(6s, 8s);
break;
@@ -198,7 +198,7 @@ public:
}
break;
case EVENT_SPELL_HEAD_CRACK:
if( t->GetTypeId() == TYPEID_PLAYER )
if( t->IsPlayer() )
me->CastSpell(t, SPELL_HEAD_CRACK);
events.Repeat(30s, 35s);
break;
@@ -499,7 +499,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
void KilledUnit(Unit* who) override
{
if( who->GetTypeId() == TYPEID_PLAYER )
if( who->IsPlayer() )
{
Talk(SAY_KILL_PLAYER);
if( Creature* twin = GetSister() )
@@ -927,4 +927,3 @@ void AddSC_boss_twin_valkyr()
new spell_valkyr_touch();
new spell_valkyr_ball_periodic_dummy();
}
@@ -155,7 +155,7 @@ public:
void OnUnitDeath(Unit* u) override
{
if (bNooneDied && u->GetTypeId() == TYPEID_PLAYER)
if (bNooneDied && u->IsPlayer())
{
bNooneDied = false;
SaveToDB();
@@ -1694,4 +1694,3 @@ void AddSC_instance_trial_of_the_crusader()
{
new instance_trial_of_the_crusader();
}
@@ -284,4 +284,3 @@ void AddSC_boss_tharon_ja()
RegisterSpellScript(spell_tharon_ja_dummy_aura);
RegisterSpellScript(spell_tharon_ja_clear_gift_of_tharon_ja);
}
@@ -86,7 +86,7 @@ public:
me->setActive(true);
instance->SetBossState(DATA_TROLLGORE, IN_PROGRESS);
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
{
Talk(SAY_AGGRO);
me->SetInCombatWithZone();
@@ -190,7 +190,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(SAY_SLAY);
}
@@ -373,4 +373,3 @@ void AddSC_boss_bronjahm()
RegisterSpellScript(spell_bronjahm_soulstorm_visual_aura);
RegisterSpellScript(spell_bronjahm_soulstorm_targeting);
}
@@ -371,4 +371,3 @@ void AddSC_boss_devourer_of_souls()
new boss_devourer_of_souls();
RegisterSpellScript(spell_wailing_souls_periodic_aura);
}
@@ -303,4 +303,3 @@ void AddSC_forge_of_souls()
new npc_fos_leader_second();
RegisterSpellScript(spell_shield_of_bones_aura);
}
@@ -219,4 +219,3 @@ void AddSC_instance_forge_of_souls()
{
new instance_forge_of_souls();
}
@@ -161,7 +161,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(SAY_SLAY);
}
@@ -184,4 +184,3 @@ void AddSC_boss_falric()
{
new boss_falric();
}
@@ -154,7 +154,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(SAY_SLAY);
}
@@ -1213,4 +1213,3 @@ void AddSC_instance_halls_of_reflection()
{
new instance_halls_of_reflection();
}
@@ -280,7 +280,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(SAY_SLAY);
}
@@ -368,4 +368,3 @@ void AddSC_boss_garfrost()
RegisterSpellScript(spell_garfrost_permafrost);
}
@@ -115,7 +115,7 @@ public:
{
if (!target || !spell)
return;
if (spell->Id == SPELL_PURSUIT && target->GetTypeId() == TYPEID_PLAYER)
if (spell->Id == SPELL_PURSUIT && target->IsPlayer())
{
Talk(EMOTE_ICK_CHASE, target);
AttackStart(target);
@@ -262,7 +262,7 @@ public:
if (me->GetReactState() == REACT_PASSIVE)
me->SetReactState(REACT_AGGRESSIVE);
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
if (Creature* k = GetKrick())
k->AI()->Talk(SAY_SLAY);
}
@@ -524,4 +524,3 @@ void AddSC_boss_ick()
RegisterSpellScript(spell_krick_explosive_barrage_aura);
RegisterSpellScript(spell_exploding_orb_auto_grow_aura);
}
@@ -209,7 +209,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(SAY_SLAY);
}
@@ -409,4 +409,3 @@ void AddSC_instance_pit_of_saron()
{
new instance_pit_of_saron();
}
@@ -881,7 +881,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == 70827 && pInstance)
if (target && spell && target->IsPlayer() && spell->Id == 70827 && pInstance)
pInstance->SetData(DATA_ACHIEV_DONT_LOOK_UP, 0);
}
@@ -1185,7 +1185,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if ((spell->Id == SPELL_TELEPORT_JAINA || spell->Id == SPELL_TELEPORT_SYLVANAS) && target && target->GetTypeId() == TYPEID_PLAYER)
if ((spell->Id == SPELL_TELEPORT_JAINA || spell->Id == SPELL_TELEPORT_SYLVANAS) && target && target->IsPlayer())
{
float angle = rand_norm() * 2 * M_PI;
float dist = urand(1, 4);
@@ -358,7 +358,7 @@ public:
{
if (me->ToTempSummon())
{
if (who->GetTypeId() == TYPEID_PLAYER || who->GetOwnerGUID().IsPlayer())
if (who->IsPlayer() || who->GetOwnerGUID().IsPlayer())
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
summoner->GetAI()->DoAction(ACTION_INFORM);
return;
@@ -476,4 +476,3 @@ void AddSC_boss_drakkari_colossus()
RegisterSpellScript(spell_drakkari_colossus_surge);
RegisterSpellScript(spell_drakkari_colossus_face_me);
}
@@ -219,4 +219,3 @@ void AddSC_instance_gundrak()
{
new instance_gundrak();
}
@@ -352,7 +352,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KELESETH_KILL);
}
@@ -622,7 +622,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_TALDARAM_KILL);
}
@@ -916,7 +916,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_VALANAR_KILL);
}
@@ -1451,7 +1451,7 @@ class spell_blood_council_shadow_prison_aura : public AuraScript
void HandleDummyTick(AuraEffect const* aurEff)
{
if (GetTarget()->GetTypeId() == TYPEID_PLAYER && GetTarget()->isMoving())
if (GetTarget()->IsPlayer() && GetTarget()->isMoving())
{
GetTarget()->CastSpell(GetTarget(), SPELL_SHADOW_PRISON_DAMAGE, true, nullptr, aurEff);
}
@@ -1710,4 +1710,3 @@ void AddSC_boss_blood_prince_council()
RegisterSpellScript(spell_valanar_kinetic_bomb_summon);
RegisterSpellScript(spell_blood_council_summon_shadow_resonance);
}
@@ -268,7 +268,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -341,7 +341,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -162,7 +162,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -2018,7 +2018,7 @@ class spell_igb_rocket_pack_useable_aura : public AuraScript
bool CheckAreaTarget(Unit* target)
{
return target->GetTypeId() == TYPEID_PLAYER && GetOwner()->GetInstanceScript()->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE;
return target->IsPlayer() && GetOwner()->GetInstanceScript()->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE;
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -2571,7 +2571,7 @@ class spell_igb_on_gunship_deck_aura : public AuraScript
bool CheckAreaTarget(Unit* unit)
{
return unit->GetTypeId() == TYPEID_PLAYER;
return unit->IsPlayer();
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -544,7 +544,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -285,13 +285,13 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
void MoveInLineOfSight(Unit* who) override
{
if (!_introDone && me->IsAlive() && who->GetTypeId() == TYPEID_PLAYER && me->GetExactDist2dSq(who) <= 10000.0f) // 100*100, moveinlineofsight limited to 60yd anyway
if (!_introDone && me->IsAlive() && who->IsPlayer() && me->GetExactDist2dSq(who) <= 10000.0f) // 100*100, moveinlineofsight limited to 60yd anyway
{
Talk(SAY_ENTER_ZONE);
_introDone = true;
@@ -662,4 +662,3 @@ void AddSC_boss_lord_marrowgar()
RegisterSpellScript(spell_marrowgar_bone_storm);
RegisterSpellScript(spell_marrowgar_bone_slice);
}
@@ -333,7 +333,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -1547,4 +1547,3 @@ void AddSC_boss_professor_putricide()
RegisterSpellScript(spell_putricide_eat_ooze);
RegisterSpellScript(spell_putricide_regurgitated_ooze);
}
@@ -216,7 +216,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -913,4 +913,3 @@ void AddSC_boss_rotface()
new npc_precious_icc();
}
@@ -361,7 +361,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_KILL);
}
@@ -488,7 +488,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(70127, me))
if (spellId == spell->Id)
if (Aura const* mysticBuffet = target->GetAura(spell->Id))
@@ -805,7 +805,7 @@ class spell_sindragosa_s_fury : public SpellScript
{
PreventHitDefaultEffect(effIndex);
if (!GetHitUnit()->IsAlive() || (GetHitUnit()->GetTypeId() == TYPEID_PLAYER && GetHitUnit()->ToPlayer()->IsGameMaster()) || !_targetCount)
if (!GetHitUnit()->IsAlive() || (GetHitUnit()->IsPlayer() && GetHitUnit()->ToPlayer()->IsGameMaster()) || !_targetCount)
return;
float resistance = float(GetHitUnit()->GetResistance(SpellSchoolMask(GetSpellInfo()->SchoolMask)));
@@ -725,7 +725,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && !me->IsInEvadeMode() && _phase != PHASE_OUTRO && _lastTalkTimeKill + 5 < GameTime::GetGameTime().count())
if (victim->IsPlayer() && !me->IsInEvadeMode() && _phase != PHASE_OUTRO && _lastTalkTimeKill + 5 < GameTime::GetGameTime().count())
{
_lastTalkTimeKill = GameTime::GetGameTime().count();
Talk(SAY_LK_KILL);
@@ -2229,7 +2229,7 @@ public:
me->CastSpell(me, SPELL_RAGING_SPIRIT_VISUAL, true);
if (TempSummon* summon = me->ToTempSummon())
if (Unit* summoner = summon->GetSummonerUnit())
if (summoner->GetTypeId() == TYPEID_PLAYER && summoner->IsAlive() && !summoner->ToPlayer()->IsBeingTeleported() && summoner->FindMap() == me->GetMap())
if (summoner->IsPlayer() && summoner->IsAlive() && !summoner->ToPlayer()->IsBeingTeleported() && summoner->FindMap() == me->GetMap())
{
valid = true;
summoner->CastSpell(me, SPELL_RAGING_SPIRIT_VISUAL_CLONE, true);
@@ -2290,7 +2290,7 @@ public:
bool valid = false;
if (TempSummon* summon = me->ToTempSummon())
if (Unit* summoner = summon->GetSummonerUnit())
if (summoner->GetTypeId() == TYPEID_PLAYER && summoner->IsAlive() && !summoner->ToPlayer()->IsBeingTeleported() && summoner->FindMap() == me->GetMap())
if (summoner->IsPlayer() && summoner->IsAlive() && !summoner->ToPlayer()->IsBeingTeleported() && summoner->FindMap() == me->GetMap())
{
valid = true;
AttackStart(summoner);
@@ -2957,8 +2957,8 @@ public:
{
if (Unit* summoner = summ->GetSummonerUnit())
{
bool buff = _instance->GetBossState(DATA_THE_LICH_KING) == IN_PROGRESS && summoner->GetTypeId() == TYPEID_PLAYER && (!summoner->IsAlive() || summoner->ToPlayer()->IsBeingTeleported() || summoner->FindMap() != me->GetMap());
if (summoner->GetTypeId() == TYPEID_PLAYER && !summoner->ToPlayer()->IsBeingTeleported() && summoner->FindMap() == me->GetMap())
bool buff = _instance->GetBossState(DATA_THE_LICH_KING) == IN_PROGRESS && summoner->IsPlayer() && (!summoner->IsAlive() || summoner->ToPlayer()->IsBeingTeleported() || summoner->FindMap() != me->GetMap());
if (summoner->IsPlayer() && !summoner->ToPlayer()->IsBeingTeleported() && summoner->FindMap() == me->GetMap())
{
if (buff)
summoner->CastSpell((Unit*)nullptr, SPELL_HARVESTED_SOUL_LK_BUFF, true, nullptr, nullptr, _instance->GetGuidData(DATA_THE_LICH_KING));
@@ -2994,7 +2994,7 @@ public:
if (TempSummon* summ = me->ToTempSummon())
if (Unit* summoner = summ->GetSummonerUnit())
{
if (summoner->IsAlive() && summoner->GetTypeId() == TYPEID_PLAYER)
if (summoner->IsAlive() && summoner->IsPlayer())
{
summoner->CastSpell((Unit*)nullptr, SPELL_HARVEST_SOUL_VISUAL, true);
summoner->ExitVehicle(summoner);
@@ -3487,7 +3487,7 @@ public:
bool CanAIAttack(Unit const* target) const override
{
return me->GetReactState() == REACT_AGGRESSIVE && target->GetTypeId() == TYPEID_PLAYER && target->GetExactDistSq(495.708f, -2523.76f, 1049.95f) < 40.0f * 40.0f;
return me->GetReactState() == REACT_AGGRESSIVE && target->IsPlayer() && target->GetExactDistSq(495.708f, -2523.76f, 1049.95f) < 40.0f * 40.0f;
}
};
@@ -551,7 +551,7 @@ public:
void AttackStart(Unit* target) override
{
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
BossAI::AttackStart(target);
}
@@ -564,7 +564,7 @@ public:
bool CanAIAttack(Unit const* target) const override
{
return target->GetTypeId() == TYPEID_PLAYER;
return target->IsPlayer();
}
void JustReachedHome() override
@@ -599,7 +599,7 @@ public:
if (!threatList.empty())
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
if (Unit* target = (*itr)->getTarget())
if (target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER && me->GetExactDist(target) < 200.0f && !target->IsImmunedToDamageOrSchool(SPELL_SCHOOL_MASK_ALL))
if (target->IsAlive() && target->IsPlayer() && me->GetExactDist(target) < 200.0f && !target->IsImmunedToDamageOrSchool(SPELL_SCHOOL_MASK_ALL))
return;
EnterEvadeMode();
}
@@ -1211,7 +1211,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_CAPTAIN_KILL);
}
@@ -1237,7 +1237,7 @@ public:
bool CanAIAttack(Unit const* target) const override
{
// do not see targets inside Frostwing Halls when we are not there
return (me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f) && (target->GetTypeId() == TYPEID_PLAYER || target->IsInCombat());
return (me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f) && (target->IsPlayer() || target->IsInCombat());
}
void EnterEvadeMode(EvadeReason why) override
@@ -2713,7 +2713,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
if (me->IsAlive() && !me->IsInCombat() && who->GetTypeId() == TYPEID_PLAYER && who->GetExactDist2d(me) < 35.0f)
if (me->IsAlive() && !me->IsInCombat() && who->IsPlayer() && who->GetExactDist2d(me) < 35.0f)
AttackStart(who);
}
@@ -3085,7 +3085,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
else
{
if (!me->IsInCombat() && who->GetTypeId() == TYPEID_PLAYER && me->GetExactDist2dSq(who) < 25.0f * 25.0f && me->CanSeeOrDetect(who) && me->IsValidAttackTarget(who))
if (!me->IsInCombat() && who->IsPlayer() && me->GetExactDist2dSq(who) < 25.0f * 25.0f && me->CanSeeOrDetect(who) && me->IsValidAttackTarget(who))
AttackStart(who);
}
}
@@ -3230,7 +3230,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
if (!_didWebBeam && who->GetTypeId() == TYPEID_PLAYER && me->GetExactDist2d(who) < 70.0f)
if (!_didWebBeam && who->IsPlayer() && me->GetExactDist2d(who) < 70.0f)
{
_didWebBeam = true;
float nx = me->GetPositionX();
@@ -134,4 +134,3 @@ void AddSC_icecrown_citadel_teleport()
new icecrown_citadel_teleport();
new at_frozen_throne_teleport();
}
@@ -31,4 +31,3 @@ void AddSC_boss_four_horsemen()
new boss_four_horsemen();
RegisterSpellScript(spell_four_horsemen_mark_aura);
}
@@ -30,4 +30,3 @@ void AddSC_boss_gluth()
new boss_gluth();
RegisterSpellScript(spell_gluth_decimate);
}
@@ -33,4 +33,3 @@ void AddSC_boss_gothik()
new npc_gothik_trigger();
RegisterSpellScript(spell_gothik_shadow_bolt_volley);
}
@@ -34,4 +34,3 @@ void AddSC_boss_grobbulus()
RegisterSpellScript(spell_grobbulus_mutating_injection_aura);
RegisterSpellScript(spell_grobbulus_poison);
}
@@ -32,4 +32,3 @@ void AddSC_boss_kelthuzad()
RegisterSpellScript(spell_kelthuzad_frost_blast);
RegisterSpellScript(spell_kelthuzad_detonate_mana_aura);
}
@@ -30,4 +30,3 @@ void AddSC_boss_sapphiron()
new boss_sapphiron();
RegisterSpellScript(spell_sapphiron_frost_explosion);
}
@@ -1240,4 +1240,3 @@ void AddSC_instance_naxxramas()
new boss_naxxramas_misc();
new at_naxxramas_hub_portal();
}
@@ -894,7 +894,7 @@ public:
void PassengerBoarded(Unit* pass, int8 /*seat*/, bool apply) override
{
if (pass && !apply && pass->GetTypeId() == TYPEID_PLAYER)
if (pass && !apply && pass->IsPlayer())
{
Player* plr = pass->ToPlayer();
float speed = plr->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()) / (1.0f * 0.001f);
@@ -1258,7 +1258,7 @@ public:
return;
if (apply)
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
{
who->ApplySpellImmune(0, IMMUNITY_ID, SPELL_ARCANE_OVERLOAD_DMG, true);
who->ApplySpellImmune(0, IMMUNITY_ID, SPELL_SURGE_OF_POWER_DMG, true);
@@ -1286,7 +1286,7 @@ public:
me->SetCanFly(false);
me->GetMotionMaster()->MoveLand(0, me->GetPositionX(), me->GetPositionY(), 267.24f, 10.0f);
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
{
who->ApplySpellImmune(0, IMMUNITY_ID, SPELL_ARCANE_OVERLOAD_DMG, false);
who->ApplySpellImmune(0, IMMUNITY_ID, SPELL_SURGE_OF_POWER_DMG, false);
@@ -1456,7 +1456,7 @@ public:
me->SetDisableGravity(false);
me->SendMovementFlagUpdate();
}
else if (pass && pass->GetTypeId() == TYPEID_PLAYER && me->IsAlive())
else if (pass && pass->IsPlayer() && me->IsAlive())
{
me->SetDisplayId(11686); // prevents nasty falling animation at despawn
me->DespawnOrUnsummon(1);
@@ -251,4 +251,3 @@ void AddSC_instance_eye_of_eternity()
{
new instance_eye_of_eternity();
}
@@ -222,4 +222,3 @@ void AddSC_boss_anomalus()
new boss_anomalus();
new achievement_chaos_theory();
}
@@ -216,4 +216,3 @@ void AddSC_boss_keristrasza()
new boss_keristrasza();
new achievement_intense_cold();
}
@@ -273,4 +273,3 @@ void AddSC_instance_nexus()
new instance_nexus();
new npc_crystalline_frayer();
}
@@ -295,4 +295,3 @@ void AddSC_instance_oculus()
{
new instance_oculus();
}
@@ -922,4 +922,3 @@ void AddSC_oculus()
RegisterSpellScript(spell_oculus_rider_aura);
RegisterSpellScript(spell_oculus_drake_flag_aura);
}
@@ -290,4 +290,3 @@ void AddSC_boss_loken()
new boss_loken();
new spell_loken_pulsing_shockwave();
}
@@ -475,7 +475,7 @@ public:
{
if (_attackGUID)
ScriptedAI::MoveInLineOfSight(who);
else if (_isActive && who->GetTypeId() == TYPEID_PLAYER)
else if (_isActive && who->IsPlayer())
{
if ((who->GetPositionX() < me->GetPositionX() || who->GetPositionY() < -220.0f) && me->GetDistance2d(who) < 40)
{
@@ -218,4 +218,3 @@ void AddSC_instance_halls_of_lightning()
{
new instance_halls_of_lightning();
}
@@ -251,4 +251,3 @@ void AddSC_boss_krystallus()
new spell_krystallus_shatter();
new spell_krystallus_shatter_effect();
}
@@ -899,4 +899,3 @@ void AddSC_brann_bronzebeard()
new iron_golem_custodian();
new spell_hos_dark_matter();
}
@@ -268,4 +268,3 @@ void AddSC_instance_halls_of_stone()
{
new instance_halls_of_stone();
}
@@ -657,7 +657,7 @@ void boss_flame_leviathan::boss_flame_leviathanAI::KilledUnit(Unit* who)
if (who == me->GetVictim())
events.RescheduleEvent(EVENT_PURSUE, 0ms);
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(FLAME_LEVIATHAN_SAY_SLAY);
}
@@ -1313,4 +1313,3 @@ void AddSC_boss_freya()
new achievement_freya_knock_on_wood("achievement_freya_knock_knock_on_wood", 2);
new achievement_freya_knock_on_wood("achievement_freya_knock_knock_knock_on_wood", 3);
}
@@ -203,7 +203,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
if (target && spell && target->IsPlayer() && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
bAchievShadowdodger = false;
}
@@ -367,7 +367,7 @@ public:
void KilledUnit(Unit* who) override
{
if( who->GetTypeId() == TYPEID_PLAYER )
if( who->IsPlayer() )
Talk(SAY_SLAY);
}
@@ -560,7 +560,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(TEXT_SLAY);
}
@@ -576,7 +576,7 @@ public:
bool CanAIAttack(Unit const* t) const override
{
if (t->GetTypeId() == TYPEID_PLAYER)
if (t->IsPlayer())
return !t->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER);
else if (t->GetTypeId() == TYPEID_UNIT)
return !t->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC);
@@ -702,9 +702,9 @@ public:
{
if (Unit* s = me->ToTempSummon()->GetSummonerUnit())
{
if ((s->GetTypeId() == TYPEID_PLAYER && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER)) || (s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC)))
if ((s->IsPlayer() && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER)) || (s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC)))
me->DespawnOrUnsummon(2000);
else if (s->GetTypeId() == TYPEID_PLAYER)
else if (s->IsPlayer())
if (InstanceScript* instanceScript = me->GetInstanceScript())
if (instanceScript->GetData(TYPE_HODIR) == NOT_STARTED)
{
@@ -1211,7 +1211,7 @@ class spell_hodir_biting_cold_main_aura : public AuraScript
{
if ((aurEff->GetTickNumber() % 4) == 0)
if (Unit* target = GetTarget())
if (target->GetTypeId() == TYPEID_PLAYER
if (target->IsPlayer()
&& !target->isMoving()
&& !target->HasAura(SPELL_BITING_COLD_PLAYER_AURA)
&& !target->HasAura(SPELL_MAGE_TOASTY_FIRE_AURA))
@@ -1357,7 +1357,7 @@ class spell_hodir_flash_freeze_aura : public AuraScript
if (!target || !caster || caster->GetTypeId() != TYPEID_UNIT)
return;
if (Aura* aur = target->GetAura(target->GetTypeId() == TYPEID_PLAYER ? SPELL_FLASH_FREEZE_TRAPPED_PLAYER : SPELL_FLASH_FREEZE_TRAPPED_NPC))
if (Aura* aur = target->GetAura(target->IsPlayer() ? SPELL_FLASH_FREEZE_TRAPPED_PLAYER : SPELL_FLASH_FREEZE_TRAPPED_NPC))
{
if (Unit* caster2 = aur->GetCaster())
{
@@ -1369,7 +1369,7 @@ class spell_hodir_flash_freeze_aura : public AuraScript
target->CastSpell(target, SPELL_FLASH_FREEZE_INSTAKILL, true);
return;
}
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
{
caster->ToCreature()->AI()->SetData(1, 1);
if( Creature* c = target->SummonCreature(NPC_FLASH_FREEZE_PLR, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 5 * 60 * 1000) )
@@ -1409,7 +1409,7 @@ class spell_hodir_storm_power_aura : public AuraScript
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* target = GetTarget())
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
target->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, GetId(), 0, GetCaster());
}
@@ -1449,7 +1449,7 @@ class spell_hodir_toasty_fire_aura : public AuraScript
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* target = GetTarget())
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
target->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, SPELL_MAGE_TOASTY_FIRE_AURA, 0, GetCaster());
}
@@ -1466,7 +1466,7 @@ class spell_hodir_starlight_aura : public AuraScript
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* target = GetTarget())
if (target->GetTypeId() == TYPEID_PLAYER)
if (target->IsPlayer())
target->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, SPELL_DRUID_STARLIGHT_AREA_AURA, 0, GetCaster());
}
@@ -290,7 +290,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_SLAY);
}
@@ -174,7 +174,7 @@ public:
void MoveInLineOfSight(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER && me->GetExactDist2d(who) < 45.0f && me->getStandState() == UNIT_STAND_STATE_SUBMERGED)
if (who->IsPlayer() && me->GetExactDist2d(who) < 45.0f && me->getStandState() == UNIT_STAND_STATE_SUBMERGED)
{
me->SetStandState(UNIT_STAND_STATE_STAND);
if (Unit* arm = ObjectAccessor::GetCreature(*me, _left))
@@ -1186,7 +1186,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
if (Creature* c = GetMimiron())
{
if (Phase == 1)
@@ -1522,7 +1522,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
if (Creature* c = GetMimiron())
{
if (Phase == 2)
@@ -1827,7 +1827,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
if (Creature* c = GetMimiron())
{
if (Phase == 3)
@@ -1909,7 +1909,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_MINE_EXPLOSION)
if (target && spell && target->IsPlayer() && spell->Id == SPELL_MINE_EXPLOSION)
if (InstanceScript* pInstance = me->GetInstanceScript())
if (Creature* c = GetMimiron())
c->AI()->SetData(0, 11);
@@ -2450,7 +2450,7 @@ public:
{
if (target->GetEntry() == NPC_ASSAULT_BOT)
me->CastSpell(me, 65040, true); // achievement Not-So-Friendly Fire
else if (target->GetTypeId() == TYPEID_PLAYER)
else if (target->IsPlayer())
if (InstanceScript* pInstance = me->GetInstanceScript())
if (Creature* c = GetMimiron())
c->AI()->SetData(0, 13);
@@ -1181,4 +1181,3 @@ void AddSC_boss_razorscale()
new achievement_quick_shave();
new achievement_iron_dwarf_medium_rare();
}
@@ -510,7 +510,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_SLAY);
}
@@ -528,7 +528,7 @@ public:
void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (who && _isHitAllowed && who->GetPositionZ() > 430 && who->GetTypeId() == TYPEID_PLAYER)
if (who && _isHitAllowed && who->GetPositionZ() > 430 && who->IsPlayer())
{
_isHitAllowed = false;
DisableThorim(false);
@@ -640,7 +640,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_LIGHTNING_CHARGE_DAMAGE && target->GetTypeId() == TYPEID_PLAYER)
if (spellInfo->Id == SPELL_LIGHTNING_CHARGE_DAMAGE && target->IsPlayer())
_hitByLightning = true;
}
@@ -1111,7 +1111,7 @@ public:
void DamageTaken(Unit* who, uint32&, DamageEffectType, SpellSchoolMask) override
{
if (!_playerAttack && who && (who->GetTypeId() == TYPEID_PLAYER || who->GetOwnerGUID().IsPlayer()))
if (!_playerAttack && who && (who->IsPlayer() || who->GetOwnerGUID().IsPlayer()))
{
if (me->GetInstanceScript())
if (Creature* thorim = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(TYPE_THORIM)))
@@ -225,7 +225,7 @@ public:
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && !urand(0, 2))
if (victim->IsPlayer() && !urand(0, 2))
{
Talk(SAY_SLAY);
}
@@ -1097,7 +1097,7 @@ public:
void OnUnitDeath(Unit* unit) override
{
// Feeds on Tears achievement
if (unit->GetTypeId() == TYPEID_PLAYER)
if (unit->IsPlayer())
{
if (GetData(TYPE_ALGALON) == IN_PROGRESS)
if (Creature* algalon = instance->GetCreature(m_uiAlgalonGUID))
@@ -1114,7 +1114,7 @@ public:
}
// achievement Champion/Conqueror of Ulduar
if (unit->GetTypeId() == TYPEID_PLAYER)
if (unit->IsPlayer())
for (uint8 i = 0; i <= 12; ++i)
{
bool go = false;
@@ -1348,4 +1348,3 @@ void AddSC_instance_ulduar()
{
new instance_ulduar();
}
@@ -239,7 +239,7 @@ struct npc_ulduar_snow_mound : public ScriptedAI
void MoveInLineOfSight(Unit* who) override
{
if (!_activated && who->GetTypeId() == TYPEID_PLAYER)
if (!_activated && who->IsPlayer())
{
if (me->GetExactDist2d(who) <= 10.0f && me->GetMap()->isInLineOfSight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 5.0f,
who->GetPositionX(), who->GetPositionY(), who->GetPositionZ() + 5.0f, 2, LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags::Nothing))
@@ -373,4 +373,3 @@ void AddSC_boss_keleseth()
new npc_vrykul_skeleton();
RegisterSpellScript(spell_frost_tomb_aura);
}
@@ -321,4 +321,3 @@ void AddSC_instance_utgarde_keep()
{
new instance_utgarde_keep();
}
@@ -239,4 +239,3 @@ void AddSC_utgarde_keep()
RegisterSpellScript(spell_ticking_time_bomb_aura);
}
@@ -821,4 +821,3 @@ void AddSC_boss_palehoof()
new npc_frenzied_worgen();
new go_palehoof_sphere();
}
@@ -533,4 +533,3 @@ void AddSC_boss_skadi()
new boss_skadi_grauf();
new go_harpoon_canon();
}
@@ -205,7 +205,7 @@ public:
instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, 26555, 1, nullptr);
}
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->IsPlayer())
Talk(SAY_SLAY);
}
@@ -439,4 +439,3 @@ void AddSC_boss_svala()
new npc_ritual_channeler();
RegisterSpellAndAuraScriptPair(spell_svala_ritual_strike, spell_svala_ritual_strike_aura);
}
@@ -271,4 +271,3 @@ void AddSC_instance_utgarde_pinnacle()
{
new instance_utgarde_pinnacle();
}
@@ -72,4 +72,3 @@ void AddSC_utgarde_pinnacle()
{
RegisterSpellScript(spell_utgarde_pinnacle_beast_mark);
}
@@ -235,4 +235,3 @@ void AddSC_boss_archavon()
new boss_archavon();
new spell_archavon_rock_shards();
}
@@ -278,4 +278,3 @@ void AddSC_boss_emalon()
new spell_voa_overcharge();
new spell_voa_lightning_nova();
}
@@ -263,4 +263,3 @@ void AddSC_boss_koralon()
new spell_koralon_meteor_fists();
new spell_flame_warder_meteor_fists();
}
@@ -268,4 +268,3 @@ void AddSC_instance_vault_of_archavon()
{
new instance_vault_of_archavon();
}
@@ -155,4 +155,3 @@ void AddSC_boss_moragg()
new boss_moragg();
RegisterSpellScript(spell_optic_link_aura);
}
@@ -677,4 +677,3 @@ void AddSC_instance_violet_hold()
{
new instance_violet_hold();
}
@@ -376,7 +376,7 @@ class spell_ioc_gunship_portal : public SpellScript
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
return GetCaster()->IsPlayer();
}
void HandleScript(SpellEffIndex effIndex)
@@ -480,4 +480,3 @@ void AddSC_isle_of_conquest()
RegisterSpellScript(spell_ioc_parachute_ic_aura);
RegisterSpellScript(spell_ioc_launch);
}
@@ -224,7 +224,7 @@ public:
{
if (Unit* owner = who->GetOwner())
{
if (owner->GetTypeId() == TYPEID_PLAYER)
if (owner->IsPlayer())
{
owner->CastSpell(owner, SPELL_MAMMOTH_CALF_ESCORT_CREDIT, true);
who->ToCreature()->DespawnOrUnsummon();
@@ -746,7 +746,7 @@ public:
void SpellHit(Unit* unit, SpellInfo const* spell) override
{
if (spell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER)
if (spell->Id == SPELL_NEURAL_NEEDLE && unit->IsPlayer())
{
if (Player* player = unit->ToPlayer())
{
@@ -2060,4 +2060,3 @@ void AddSC_borean_tundra()
RegisterSpellScript(spell_q11719_bloodspore_ruination_45997);
new npc_bloodmage_laurith();
}
@@ -917,7 +917,7 @@ public:
void DamageTaken(Unit* who, uint32&, DamageEffectType, SpellSchoolMask) override
{
if (who && who->GetTypeId() == TYPEID_PLAYER)
if (who && who->IsPlayer())
{
me->SetLootRecipient(who);
me->LowerPlayerDamageReq(me->GetMaxHealth());
@@ -1567,7 +1567,7 @@ public:
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (who->IsPlayer())
Talk(2);
}

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