mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -437,7 +437,7 @@ struct npc_midsummer_torch_target : public ScriptedAI
|
||||
if (posVec.empty())
|
||||
return;
|
||||
// Triggered spell from torch
|
||||
if (spellInfo->Id == SPELL_TORCH_TOSS_LAND && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (spellInfo->Id == SPELL_TORCH_TOSS_LAND && caster->IsPlayer())
|
||||
{
|
||||
me->CastSpell(me, SPELL_BRAZIERS_HIT_VISUAL, true); // hit visual anim
|
||||
if (++counter >= maxCount)
|
||||
@@ -906,12 +906,12 @@ class spell_midsummer_ribbon_pole : public AuraScript
|
||||
target->CastSpell(target, SPELL_RIBBON_POLE_XP, true);
|
||||
|
||||
// Achievement
|
||||
if ((GameTime::GetGameTime().count() - GetApplyTime()) > 60 && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if ((GameTime::GetGameTime().count() - GetApplyTime()) > 60 && target->IsPlayer())
|
||||
target->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 58934, 0, target);
|
||||
}
|
||||
|
||||
// Achievement
|
||||
if ((time(nullptr) - GetApplyTime()) > 60 && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if ((time(nullptr) - GetApplyTime()) > 60 && target->IsPlayer())
|
||||
target->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 58934, 0, target);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user