Merge branch 'master' into Playerbot
This commit is contained in:
@@ -310,7 +310,7 @@ public:
|
||||
if (target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index)
|
||||
activeStr = handler->GetAcoreString(LANG_ACTIVE);
|
||||
|
||||
std::string titleName = Acore::StringFormat(name, player->GetName().c_str());
|
||||
std::string titleName = Acore::StringFormat(name, player->GetName());
|
||||
|
||||
// send title in "id (idx:idx) - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
Unit* unit = handler->getSelectedUnit();
|
||||
Player* player = nullptr;
|
||||
|
||||
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
|
||||
if (!unit || (!unit->IsPlayer()))
|
||||
{
|
||||
player = handler->GetSession()->GetPlayer();
|
||||
}
|
||||
@@ -733,14 +733,14 @@ public:
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): For the item {}, the owner ({}) and the player ({}) don't match!", index, item->GetGUID().ToString(), item->GetOwnerGUID().ToString(), player->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): For the item {}, the owner ({}) and the player ({}) don't match!", index, item->GetGUID().ToString(), item->GetOwnerGUID().ToString(), player->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->GetQueuePos() != index)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): For the item {}, the queuepos doesn't match it's position in the queue!", index, item->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): For the item {}, the queuepos doesn't match it's position in the queue!", index, item->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -752,14 +752,14 @@ public:
|
||||
|
||||
if (!test)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for {} are incorrect, the player doesn't have any item at that position!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): The bag({}) and slot({}) values for {} are incorrect, the player doesn't have any item at that position!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (test != item)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for the {} are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): The bag({}) and slot({}) values for the {} are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
if (message.empty())
|
||||
return false;
|
||||
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormatFmt(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()));
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormat(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1142,7 +1142,7 @@ public:
|
||||
{
|
||||
if (sWorld->getBoolConfig(CONFIG_DIE_COMMAND_MODE))
|
||||
{
|
||||
if (target->GetTypeId() == TYPEID_UNIT && handler->GetSession()->GetSecurity() == SEC_CONSOLE) // pussywizard
|
||||
if (target->IsCreature() && handler->GetSession()->GetSecurity() == SEC_CONSOLE) // pussywizard
|
||||
{
|
||||
target->ToCreature()->LowerPlayerDamageReq(target->GetMaxHealth());
|
||||
}
|
||||
@@ -2393,7 +2393,7 @@ public:
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (player->GetTarget() && target)
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_UNIT || target->IsPet())
|
||||
if (!target->IsCreature() || target->IsPet())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_SELECT_CREATURE);
|
||||
return false;
|
||||
@@ -2745,7 +2745,7 @@ public:
|
||||
}
|
||||
case HOME_MOTION_TYPE:
|
||||
{
|
||||
if (unit->GetTypeId() == TYPEID_UNIT)
|
||||
if (unit->IsCreature())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_HOME_CREATURE, x, y, z);
|
||||
}
|
||||
@@ -2816,7 +2816,7 @@ public:
|
||||
if (!target->IsAlive() || !damage)
|
||||
return true;
|
||||
|
||||
if (target->GetTypeId() == TYPEID_UNIT && handler->GetSession()->GetSecurity() == SEC_CONSOLE) // pussywizard
|
||||
if (target->IsCreature() && handler->GetSession()->GetSecurity() == SEC_CONSOLE) // pussywizard
|
||||
target->ToCreature()->LowerPlayerDamageReq(target->GetMaxHealth());
|
||||
|
||||
if (percent)
|
||||
|
||||
@@ -337,7 +337,7 @@ public:
|
||||
return false;
|
||||
|
||||
Unit* unit = handler->getSelectedUnit();
|
||||
if (!unit || unit->GetTypeId() != TYPEID_UNIT)
|
||||
if (!unit || !unit->IsCreature())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_SELECT_CREATURE);
|
||||
return false;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
itemCount = *Acore::StringTo<uint32>(itemTokens.at(1));
|
||||
break;
|
||||
default:
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("> Incorrect item list format for '{}'", itemString));
|
||||
handler->SendSysMessage(Acore::StringFormat("> Incorrect item list format for '{}'", itemString));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ public:
|
||||
dbPort = (*res)[0].Get<uint16>();
|
||||
|
||||
if (dbPort)
|
||||
dbPortOutput = Acore::StringFormatFmt("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
|
||||
dbPortOutput = Acore::StringFormat("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
|
||||
else
|
||||
dbPortOutput = Acore::StringFormatFmt("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
|
||||
dbPortOutput = Acore::StringFormat("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
|
||||
}
|
||||
|
||||
HandleServerInfoCommand(handler);
|
||||
|
||||
+1
-1
@@ -303,7 +303,7 @@ public:
|
||||
bool doReset = false;
|
||||
if (resetTimer > 0)
|
||||
{
|
||||
for (const auto& sum : summons)
|
||||
for (auto const& sum : summons)
|
||||
{
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*me, sum))
|
||||
{
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ public:
|
||||
|
||||
void IsSummonedBy(WorldObject* summoner) override
|
||||
{
|
||||
if (summoner->GetTypeId() != TYPEID_UNIT)
|
||||
if (!summoner->IsCreature())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -471,7 +471,7 @@ public:
|
||||
SetData(TYPE_RING_OF_LAW, NOT_STARTED);
|
||||
break;
|
||||
case DONE:
|
||||
for (const auto& itr : ArenaSpectators)
|
||||
for (auto const& itr : ArenaSpectators)
|
||||
{
|
||||
if (Creature* spectator = instance->GetCreature(itr))
|
||||
{
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
|
||||
GetCreatureListWithEntryInGrid(nearbyWhelps, me, NPC_ROOKERY_WHELP, RANGE_WHELP_CALL_HELP);
|
||||
for (const auto& whelp : nearbyWhelps)
|
||||
for (auto const& whelp : nearbyWhelps)
|
||||
{
|
||||
if (!whelp->IsInCombat())
|
||||
{
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
minDist = 50;
|
||||
tempDist = 50;
|
||||
me->GetGameObjectListWithEntryInGrid(nearbyEggs, GO_ROOKERY_EGG, 40);
|
||||
for (const auto& egg : nearbyEggs)
|
||||
for (auto const& egg : nearbyEggs)
|
||||
{
|
||||
if (egg->isSpawned() && egg->getLootState() == GO_READY)
|
||||
{
|
||||
|
||||
+2
-2
@@ -401,14 +401,14 @@ public:
|
||||
pile->SetLootState(GO_READY);
|
||||
pile->Respawn();
|
||||
}
|
||||
for (const auto& circleGUID : go_urokOgreCirles)
|
||||
for (auto const& circleGUID : go_urokOgreCirles)
|
||||
{
|
||||
if (GameObject* circle = instance->GetGameObject(circleGUID))
|
||||
{
|
||||
circle->Delete();
|
||||
}
|
||||
}
|
||||
for (const auto& mobGUID : UrokMobs)
|
||||
for (auto const& mobGUID : UrokMobs)
|
||||
{
|
||||
if (Creature* mob = instance->GetCreature(mobGUID))
|
||||
{
|
||||
|
||||
+2
-2
@@ -212,7 +212,7 @@ struct ClassCallSelector : public Acore::unary_function<Unit*, bool>
|
||||
|
||||
bool operator()(Unit const* target) const
|
||||
{
|
||||
if (!_me || !target || target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!_me || !target || !target->IsPlayer())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1114,7 +1114,7 @@ class spell_class_call_polymorph : public SpellScript
|
||||
{
|
||||
targets.remove_if([&](WorldObject const* target) -> bool
|
||||
{
|
||||
return target->GetTypeId() != TYPEID_PLAYER || target->ToPlayer()->IsGameMaster() || target->ToPlayer()->HasAura(SPELL_POLYMORPH);
|
||||
return !target->IsPlayer() || target->ToPlayer()->IsGameMaster() || target->ToPlayer()->HasAura(SPELL_POLYMORPH);
|
||||
});
|
||||
|
||||
if (!targets.empty())
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
if (target->GetTypeId() == TYPEID_UNIT && !secondPhase)
|
||||
if (target->IsCreature() && !secondPhase)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -587,7 +587,7 @@ class spell_hate_to_zero : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void HandleHit(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -129,7 +129,7 @@ class spell_mc_play_dead_aura : public AuraScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -155,7 +155,7 @@ struct boss_priestess_delrissa : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
if (PlayersKilled < SAY_DEATH)
|
||||
|
||||
@@ -678,7 +678,7 @@ public:
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
{
|
||||
if (PlayerGUID || who->GetTypeId() != TYPEID_PLAYER || !who->IsWithinDist(me, INTERACTION_DISTANCE))
|
||||
if (PlayerGUID || !who->IsPlayer() || !who->IsWithinDist(me, INTERACTION_DISTANCE))
|
||||
return;
|
||||
|
||||
if (MeetQuestCondition(who->ToPlayer()))
|
||||
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
{
|
||||
Position pos = LightOfDawnFightPos[urand(0, 9)];
|
||||
if (Unit* target = cr->SelectNearbyTarget(nullptr, 10.0f))
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
if (target->IsCreature())
|
||||
target->GetMotionMaster()->MoveCharge(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), me->GetSpeed(MOVE_RUN));
|
||||
cr->GetMotionMaster()->MoveCharge(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), me->GetSpeed(MOVE_RUN));
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ public:
|
||||
|
||||
void IsSummonedBy(WorldObject* summoner) override
|
||||
{
|
||||
if (summoner->GetTypeId() != TYPEID_UNIT)
|
||||
if (!summoner->IsCreature())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
void OnUnitDeath(Unit* unit) override
|
||||
{
|
||||
if (unit->GetTypeId() == TYPEID_UNIT && unit->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && unit->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
if (unit->IsCreature() && unit->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && unit->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
_dragonkinList.remove(unit->GetGUID());
|
||||
if (unit->GetEntry() == NPC_JAMMAL_AN_THE_PROPHET)
|
||||
{
|
||||
|
||||
@@ -533,7 +533,7 @@ class DoorsGuidCheck
|
||||
public:
|
||||
bool operator()(WorldObject* object) const
|
||||
{
|
||||
if (object->GetTypeId() != TYPEID_UNIT)
|
||||
if (!object->IsCreature())
|
||||
return true;
|
||||
|
||||
Creature* cr = object->ToCreature();
|
||||
|
||||
@@ -1088,7 +1088,7 @@ class spell_kiljaeden_sinister_reflection_clone : public SpellScript
|
||||
WorldObject* target = targets.front();
|
||||
|
||||
targets.clear();
|
||||
if (target && target->GetTypeId() == TYPEID_UNIT)
|
||||
if (target && target->IsCreature())
|
||||
{
|
||||
target->ToCreature()->AI()->SetData(1, GetCaster()->getClass());
|
||||
targets.push_back(target);
|
||||
@@ -1133,7 +1133,7 @@ class spell_kiljaeden_darkness_aura : public AuraScript
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetUnitOwner()->GetTypeId() == TYPEID_UNIT)
|
||||
if (GetUnitOwner()->IsCreature())
|
||||
GetUnitOwner()->ToCreature()->AI()->DoAction(ACTION_NO_KILL_TALK);
|
||||
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE, true);
|
||||
|
||||
@@ -393,7 +393,7 @@ class spell_entropius_negative_energy : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT && GetUnitOwner()->GetMapId() == MAP_ULDAMAN;
|
||||
return GetUnitOwner()->IsCreature() && GetUnitOwner()->GetMapId() == MAP_ULDAMAN;
|
||||
}
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
me->SetInFront(me->GetVictim());
|
||||
}
|
||||
/*if (float dist = me->IsWithinDist3d(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 5.0f) dist = 5.0f;
|
||||
SDisruptAOEVisual_Timer = 1000 + floor(dist / 30 * 1000.0f);*/
|
||||
SDisruptAOEVisual_Timer = 1000 + std::floor(dist / 30 * 1000.0f);*/
|
||||
events.ScheduleEvent(EVENT_STATIC_DISRUPTION, urand(10000, 18000));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
reviveGUID = victim->GetGUID();
|
||||
@@ -449,7 +449,7 @@ public:
|
||||
{
|
||||
if (!me || !target)
|
||||
return false;
|
||||
if (target->GetTypeId() != TYPEID_PLAYER || !me->IsWithinLOSInMap(target))
|
||||
if (!target->IsPlayer() || !me->IsWithinLOSInMap(target))
|
||||
return false;
|
||||
return true;
|
||||
}))
|
||||
@@ -540,7 +540,7 @@ public:
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
_scheduler.Schedule(6s, 12s, [this](TaskContext context)
|
||||
@@ -557,7 +557,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
reviveGUID = victim->GetGUID();
|
||||
|
||||
@@ -217,7 +217,7 @@ private:
|
||||
{
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [this](Unit* target) -> bool
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER || target->getPowerType() != Powers::POWER_MANA)
|
||||
if (!target->IsPlayer() || target->getPowerType() != Powers::POWER_MANA)
|
||||
return false;
|
||||
if (me->IsWithinMeleeRange(target) || me->GetVictim() == target)
|
||||
return false;
|
||||
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
{
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||
{
|
||||
if (summoner->GetTypeId() == TYPEID_UNIT && summoner->IsAlive() && !summoner->IsInCombat())
|
||||
if (summoner->IsCreature() && summoner->IsAlive() && !summoner->IsInCombat())
|
||||
summoner->ToCreature()->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
{
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||
{
|
||||
if (summoner->GetTypeId() == TYPEID_UNIT && summoner->IsAlive())
|
||||
if (summoner->IsCreature() && summoner->IsAlive())
|
||||
summoner->ToCreature()->DisappearAndDie();
|
||||
}
|
||||
}
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
if (me->IsSummon())
|
||||
{
|
||||
Unit* summoner = me->ToTempSummon()->GetSummonerUnit();
|
||||
if (summoner && summoner->GetTypeId() == TYPEID_UNIT && summoner->IsAIEnabled)
|
||||
if (summoner && summoner->IsCreature() && summoner->IsAIEnabled)
|
||||
{
|
||||
npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI* ai =
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, summoner->GetAI());
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
{
|
||||
if (!who || who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who || !who->IsPlayer())
|
||||
return;
|
||||
|
||||
if (me->FindNearestGameObject(GO_BEACON_TORCH, 10.0f))
|
||||
|
||||
@@ -1584,7 +1584,7 @@ struct npc_coren_direbrew : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!_events.IsInPhase(PHASE_ALL) || who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!_events.IsInPhase(PHASE_ALL) || !who->IsPlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ struct npc_midsummer_bonfire : public ScriptedAI
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!caster->IsPlayer())
|
||||
return;
|
||||
|
||||
switch (spellInfo->Id)
|
||||
@@ -1172,7 +1172,7 @@ class spell_midsummer_juggling_torch : public SpellScript
|
||||
void HandleFinish()
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!caster || !caster->IsPlayer())
|
||||
return;
|
||||
|
||||
if (const WorldLocation* loc = GetExplTargetDest())
|
||||
|
||||
@@ -571,7 +571,7 @@ class spell_pilgrims_bounty_serve_generic : public AuraScript
|
||||
void OnAuraRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
if (target->IsCreature())
|
||||
target->ToCreature()->AI()->DoAction(GetSpellInfo()->Id);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ struct boss_aeonus : public BossAI
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER)
|
||||
if (who->IsCreature() && who->GetEntry() == NPC_TIME_KEEPER)
|
||||
{
|
||||
if (me->IsWithinDistInMap(who, 20.0f))
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ enum Spells
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER)
|
||||
if (who->IsCreature() && who->GetEntry() == NPC_TIME_KEEPER)
|
||||
{
|
||||
if (me->IsWithinDistInMap(who, 20.0f))
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ struct boss_temporus : public BossAI
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER)
|
||||
if (who->IsCreature() && who->GetEntry() == NPC_TIME_KEEPER)
|
||||
{
|
||||
if (me->IsWithinDistInMap(who, 20.0f))
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
immol->GetAI()->SetData(1, 1);
|
||||
immol->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
for (const auto& guid : HighborneSummoners)
|
||||
for (auto const& guid : HighborneSummoners)
|
||||
{
|
||||
if (Creature* summoner = instance->GetCreature(guid))
|
||||
{
|
||||
|
||||
@@ -367,7 +367,7 @@ struct boss_vem : public boss_bug_trio
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [this](Unit* target) -> bool
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return false;
|
||||
if (me->IsWithinMeleeRange(target) || target == me->GetVictim())
|
||||
return false;
|
||||
|
||||
@@ -386,7 +386,7 @@ struct boss_cthun : public BossAI
|
||||
}, 500ms);
|
||||
|
||||
//Spawn flesh tentacle
|
||||
for (const auto& position : FleshTentaclePos)
|
||||
for (auto const& position : FleshTentaclePos)
|
||||
me->SummonCreature(NPC_FLESH_TENTACLE, position, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
|
||||
ScheduleTasks();
|
||||
@@ -501,7 +501,7 @@ struct boss_cthun : public BossAI
|
||||
me->RemoveAurasDueToSpell(SPELL_PURPLE_COLORATION);
|
||||
DoCastSelf(SPELL_CARAPACE_CTHUN, true);
|
||||
//Spawn flesh tentacle
|
||||
for (const auto& position : FleshTentaclePos)
|
||||
for (auto const& position : FleshTentaclePos)
|
||||
me->SummonCreature(NPC_FLESH_TENTACLE, position, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_UNIT || !victim->IsSummon())
|
||||
if (!victim->IsCreature() || !victim->IsSummon())
|
||||
return;
|
||||
|
||||
if (Unit* vehSummoner = victim->ToTempSummon()->GetSummonerUnit())
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
return;
|
||||
|
||||
//only aggro text if not player and only in this area
|
||||
if (who->GetTypeId() != TYPEID_PLAYER && me->GetAreaId() == AREA_MERCHANT_COAST)
|
||||
if (!who->IsPlayer() && me->GetAreaId() == AREA_MERCHANT_COAST)
|
||||
{
|
||||
//appears to be pretty much random (possible only if escorter not in combat with who yet?)
|
||||
Talk(SAY_GIL_AGGRO, who);
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!who->IsAlive() || EventInProgress || who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsAlive() || EventInProgress || !who->IsPlayer())
|
||||
return;
|
||||
|
||||
if (me->IsWithinDistInMap(who, 10.0f) && who->ToPlayer()->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE)
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public:
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
if (!_initTalk)
|
||||
|
||||
@@ -347,7 +347,7 @@ class spell_herald_volzaj_insanity : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_herald_volzaj_insanity);
|
||||
|
||||
bool Load() override { return GetCaster()->GetTypeId() == TYPEID_UNIT; }
|
||||
bool Load() override { return GetCaster()->IsCreature(); }
|
||||
|
||||
void HandleDummyEffect(std::list<WorldObject*>& targets)
|
||||
{
|
||||
@@ -362,7 +362,7 @@ class spell_herald_volzaj_insanity : public SpellScript
|
||||
{
|
||||
targets.remove_if([this](WorldObject* targetObj) -> bool
|
||||
{
|
||||
return !targetObj || targetObj->GetTypeId() != TYPEID_PLAYER || !targetObj->ToPlayer()->IsInCombatWith(GetCaster()) ||
|
||||
return !targetObj || !targetObj->IsPlayer() || !targetObj->ToPlayer()->IsInCombatWith(GetCaster()) ||
|
||||
targetObj->GetDistance(GetCaster()) >= (MAX_VISIBILITY_DISTANCE * 2);
|
||||
});
|
||||
}
|
||||
@@ -466,7 +466,7 @@ class spell_volazj_whisper : public SpellScript
|
||||
});
|
||||
}
|
||||
|
||||
bool Load() override { return GetCaster()->GetTypeId() == TYPEID_UNIT; }
|
||||
bool Load() override { return GetCaster()->IsCreature(); }
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
|
||||
@@ -333,7 +333,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ struct boss_taldaram : public BossAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -925,7 +925,7 @@ struct boss_sartharion_dragonAI : public BossAI
|
||||
|
||||
void KilledUnit(Unit* victim) final
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER || urand(0, 2))
|
||||
if (!victim->IsPlayer() || urand(0, 2))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1053,7 +1053,7 @@ class spell_halion_twilight_phasing : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void Phase()
|
||||
@@ -1116,7 +1116,7 @@ class spell_halion_twilight_realm_aura : public AuraScript
|
||||
return;
|
||||
|
||||
target->RemoveAurasDueToSpell(SPELL_FIERY_COMBUSTION, ObjectGuid::Empty, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
if (GetTarget()->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!GetTarget()->IsPlayer())
|
||||
return;
|
||||
GetTarget()->m_Events.AddEvent(new SendEncounterUnit(GetTarget()->ToPlayer()), GetTarget()->m_Events.CalculateTime(500));
|
||||
}
|
||||
@@ -1149,7 +1149,7 @@ class spell_halion_leave_twilight_realm_aura : public AuraScript
|
||||
{
|
||||
GetTarget()->RemoveAurasDueToSpell(SPELL_TWILIGHT_REALM);
|
||||
|
||||
if (GetTarget()->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!GetTarget()->IsPlayer())
|
||||
return;
|
||||
GetTarget()->m_Events.AddEvent(new SendEncounterUnit(GetTarget()->ToPlayer()), GetTarget()->m_Events.CalculateTime(500));
|
||||
}
|
||||
|
||||
+1
-1
@@ -765,7 +765,7 @@ class spell_toc5_light_rain : public SpellScript
|
||||
{
|
||||
for( std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); )
|
||||
{
|
||||
if ((*itr)->GetTypeId() == TYPEID_UNIT)
|
||||
if ((*itr)->IsCreature())
|
||||
if ((*itr)->ToCreature()->GetEntry() == NPC_FOUNTAIN_OF_LIGHT)
|
||||
{
|
||||
targets.erase(itr);
|
||||
|
||||
+1
-1
@@ -691,7 +691,7 @@ public:
|
||||
if( me->GetExactDist(plr) <= 5.0f )
|
||||
if( Vehicle* v = plr->GetVehicle() )
|
||||
if( Unit* c = v->GetBase() )
|
||||
if( c->GetTypeId() == TYPEID_UNIT && c->ToCreature()->GetEntry() == (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_BATTLEWORG : VEHICLE_ARGENT_WARHORSE) )
|
||||
if( c->IsCreature() && c->ToCreature()->GetEntry() == (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_BATTLEWORG : VEHICLE_ARGENT_WARHORSE) )
|
||||
{
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
+1
-1
@@ -1156,7 +1156,7 @@ public:
|
||||
{
|
||||
NPC_BlackKnightGUID = bk->GetGUID();
|
||||
bk->SendMovementFlagUpdate(); // put him on vehicle visually
|
||||
if( bk->GetTypeId() == TYPEID_UNIT )
|
||||
if( bk->IsCreature() )
|
||||
bk->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -400,7 +400,7 @@ public:
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER || me->GetExactDistSq(who) > 6400.0f) // 80yd*80yd
|
||||
if (!who->IsPlayer() || me->GetExactDistSq(who) > 6400.0f) // 80yd*80yd
|
||||
return;
|
||||
|
||||
if (me->getStandState() != UNIT_STAND_STATE_STAND)
|
||||
@@ -846,7 +846,7 @@ public:
|
||||
{
|
||||
target->UpdatePosition(*c, false);
|
||||
target->CastCustomSpell(SPELL_SPIKE_FAIL, SPELLVALUE_MAX_TARGETS, 1);
|
||||
if( target->GetTypeId() == TYPEID_UNIT )
|
||||
if( target->IsCreature() )
|
||||
target->ToCreature()->AI()->DoAction(-1);
|
||||
Remove();
|
||||
return;
|
||||
|
||||
+3
-3
@@ -172,7 +172,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_FIRE_BOMB:
|
||||
{
|
||||
if( t->GetTypeId() != TYPEID_PLAYER && pInstance )
|
||||
if( !t->IsPlayer() && pInstance )
|
||||
{
|
||||
GuidVector validPlayers;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
if( Vehicle* vk = me->GetVehicleKit() )
|
||||
if( Unit* snobold = vk->GetPassenger(4) )
|
||||
{
|
||||
if( snobold->GetTypeId() == TYPEID_UNIT )
|
||||
if( snobold->IsCreature() )
|
||||
{
|
||||
CAST_AI(npc_snobold_vassal::npc_snobold_vassalAI, snobold->ToCreature()->AI())->TargetGUID = PlayerGUID;
|
||||
snobold->ToCreature()->AI()->AttackStart(p);
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
{
|
||||
events.RescheduleEvent(EVENT_PICK_SNOBOLD_TARGET, 5s);
|
||||
if( Unit* snobold = vk->GetPassenger(4) )
|
||||
if( snobold->GetTypeId() == TYPEID_UNIT )
|
||||
if( snobold->IsCreature() )
|
||||
{
|
||||
bool needDespawn = true;
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public:
|
||||
return true;
|
||||
if (item->ItemId == 46017) // Val'anyr, Hammer of Ancient Kings - exception, too powerful
|
||||
return false;
|
||||
if (item->ItemLevel == 245 && item->Bonding == BIND_WHEN_EQUIPED) // this also includes items crafted from patterns obtained in ToC 10 norm/hc
|
||||
if (item->ItemLevel == 245 && item->Bonding == BIND_WHEN_EQUIPPED) // this also includes items crafted from patterns obtained in ToC 10 norm/hc
|
||||
return true;
|
||||
if (validDedicatedInsanityItems.find(item->ItemId) != validDedicatedInsanityItems.end()) // list of items dropping from ToC 10 norm/hc and also items ilevel 245 buyable for emblems of triumph
|
||||
return true;
|
||||
|
||||
@@ -84,7 +84,7 @@ class spell_dtk_raise_dead_aura : public AuraScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetUnitOwner()->IsCreature();
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
int32 textId = 0;
|
||||
@@ -347,7 +347,7 @@ class spell_wailing_souls_periodic_aura : public AuraScript
|
||||
{
|
||||
t->SetControlled(false, UNIT_STATE_ROOT);
|
||||
t->DisableRotate(false);
|
||||
if (t->GetTypeId() == TYPEID_UNIT)
|
||||
if (t->IsCreature())
|
||||
t->ToCreature()->SetReactState(REACT_AGGRESSIVE);
|
||||
if (t->GetVictim())
|
||||
{
|
||||
|
||||
@@ -333,7 +333,7 @@ class spell_garfrost_permafrost : public SpellScript
|
||||
if (valid)
|
||||
{
|
||||
if (Aura* aur = target->ToUnit()->GetAura(70336))
|
||||
if (aur->GetStackAmount() >= 10 && caster->GetTypeId() == TYPEID_UNIT)
|
||||
if (aur->GetStackAmount() >= 10 && caster->IsCreature())
|
||||
caster->ToCreature()->AI()->SetData(1, aur->GetStackAmount());
|
||||
targetList.push_back(*itrU);
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ class spell_krick_explosive_barrage_aura : public AuraScript
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* caster = GetCaster())
|
||||
if (caster->GetTypeId() == TYPEID_UNIT)
|
||||
if (caster->IsCreature())
|
||||
{
|
||||
Map::PlayerList const& players = caster->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
@@ -505,7 +505,7 @@ class spell_exploding_orb_auto_grow_aura : public AuraScript
|
||||
target->RemoveAurasDueToSpell(SPELL_HASTY_GROW);
|
||||
target->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
|
||||
target->RemoveAurasDueToSpell(SPELL_EXPLODING_ORB_VISUAL);
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
if (target->IsCreature())
|
||||
target->ToCreature()->DespawnOrUnsummon(2000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1130,7 +1130,7 @@ public:
|
||||
me->LoadCreaturesAddon(true);
|
||||
me->SetLootRecipient(nullptr);
|
||||
me->ResetPlayerDamageReq();
|
||||
me->SetLastDamagedTime(0);
|
||||
me->UpdateLeashExtensionTime();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1405,7 +1405,7 @@ class spell_pos_rimefang_frost_nova : public SpellScript
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
Unit::Kill(caster, target);
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
if (target->IsCreature())
|
||||
target->ToCreature()->DespawnOrUnsummon(30000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
|
||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/) override
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return;
|
||||
|
||||
if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
|
||||
@@ -613,7 +613,7 @@ public:
|
||||
|
||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/) override
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return;
|
||||
|
||||
if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
|
||||
@@ -907,7 +907,7 @@ public:
|
||||
|
||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/) override
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return;
|
||||
|
||||
if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
|
||||
@@ -1102,7 +1102,7 @@ public:
|
||||
if (_introDone)
|
||||
return;
|
||||
|
||||
if (who->GetTypeId() != TYPEID_PLAYER || me->GetExactDist2d(who) > 100.0f)
|
||||
if (!who->IsPlayer() || me->GetExactDist2d(who) > 100.0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1335,7 +1335,7 @@ public:
|
||||
|
||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/) override
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1506,7 +1506,7 @@ class spell_taldaram_summon_flame_ball : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
if (!GetCaster()->IsCreature())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1573,7 +1573,7 @@ class spell_valanar_kinetic_bomb_aura : public AuraScript
|
||||
void HandleDummyTick(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target->GetTypeId() != TYPEID_UNIT)
|
||||
if (!target->IsCreature())
|
||||
return;
|
||||
|
||||
if (Creature* bomb = target->FindNearestCreature(NPC_KINETIC_BOMB, 1.0f, true))
|
||||
|
||||
@@ -823,7 +823,7 @@ class spell_blood_queen_vampiric_bite : public SpellScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetCaster()->GetTypeId() != TYPEID_PLAYER || GetCaster()->GetMapId() != 631)
|
||||
if (!GetCaster()->IsPlayer() || GetCaster()->GetMapId() != 631)
|
||||
return;
|
||||
InstanceScript* instance = GetCaster()->GetInstanceScript();
|
||||
if (!instance || instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) != IN_PROGRESS)
|
||||
|
||||
@@ -1259,7 +1259,7 @@ class spell_deathbringer_boiling_blood : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
|
||||
@@ -290,13 +290,13 @@ class spell_festergut_pungent_blight : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (caster->GetTypeId() != TYPEID_UNIT)
|
||||
if (!caster->IsCreature())
|
||||
return;
|
||||
|
||||
// Get Inhaled Blight id for our difficulty
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target, uint32 /*criteria_id*/) override
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_UNIT)
|
||||
if (target && target->IsCreature())
|
||||
return target->ToCreature()->AI()->GetData(DATA_INOCULATED_STACK) < 3;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
Transport::PassengerSet const& passengers = t->GetStaticPassengers();
|
||||
for (Transport::PassengerSet::const_iterator itr = passengers.begin(); itr != passengers.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetTypeId() != TYPEID_UNIT || (*itr)->GetEntry() != NPC_GUNSHIP_HULL)
|
||||
if (!(*itr)->IsCreature() || (*itr)->GetEntry() != NPC_GUNSHIP_HULL)
|
||||
continue;
|
||||
(*itr)->ToCreature()->CastSpell((*itr)->ToCreature(), explosionSpell, true);
|
||||
}
|
||||
@@ -615,7 +615,7 @@ public:
|
||||
Transport::PassengerSet const& passengers = t->GetStaticPassengers();
|
||||
for (Transport::PassengerSet::const_iterator itr = passengers.begin(); itr != passengers.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetTypeId() != TYPEID_UNIT || (*itr)->GetEntry() != cannonEntry)
|
||||
if (!(*itr)->IsCreature() || (*itr)->GetEntry() != cannonEntry)
|
||||
continue;
|
||||
Creature* cannon = (*itr)->ToCreature();
|
||||
cannon->CastSpell(cannon, SPELL_EJECT_ALL_PASSENGERS, true);
|
||||
@@ -661,7 +661,7 @@ public:
|
||||
Transport::PassengerSet const& passengers = t->GetPassengers();
|
||||
for (Transport::PassengerSet::const_iterator itr = passengers.begin(); itr != passengers.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetTypeId() != TYPEID_UNIT)
|
||||
if (!(*itr)->IsCreature())
|
||||
continue;
|
||||
Creature* c = (*itr)->ToCreature();
|
||||
if (c->GetEntry() == NPC_SKYBREAKER_MARINE || c->GetEntry() == NPC_SKYBREAKER_SERGEANT || c->GetEntry() == NPC_KOR_KRON_REAVER || c->GetEntry() == NPC_KOR_KRON_SERGEANT)
|
||||
@@ -2080,7 +2080,7 @@ class spell_igb_check_for_players : public SpellScript
|
||||
bool Load() override
|
||||
{
|
||||
_playerCount = 0;
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void CountTargets(std::list<WorldObject*>& targets)
|
||||
@@ -2302,7 +2302,7 @@ class spell_igb_cannon_blast : public SpellScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void CalculatePower()
|
||||
@@ -2467,7 +2467,7 @@ public:
|
||||
|
||||
bool operator()(WorldObject* unit)
|
||||
{
|
||||
return unit->GetTypeId() != TYPEID_PLAYER || unit->GetPositionZ() > 478.0f || !unit->GetTransport() || unit->GetTransport()->GetEntry() != _entry
|
||||
return !unit->IsPlayer() || unit->GetPositionZ() > 478.0f || !unit->GetTransport() || unit->GetTransport()->GetEntry() != _entry
|
||||
|| unit->GetMapHeight(unit->GetPhaseMask(), unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()) < 465.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
if (target->GetExactDist(_source) > 175.0f)
|
||||
return false;
|
||||
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return false;
|
||||
|
||||
if (target->GetPositionX() > -337.0f)
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
{
|
||||
if (Unit* u = v->GetBase())
|
||||
{
|
||||
if (u->GetEntry() == NPC_BONE_SPIKE && u->GetTypeId() == TYPEID_UNIT)
|
||||
if (u->GetEntry() == NPC_BONE_SPIKE && u->IsCreature())
|
||||
{
|
||||
u->ToCreature()->AI()->DoAction(-1337);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
|
||||
bool operator()(Unit const* target) const
|
||||
{
|
||||
if (!me || !target || target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!me || !target || !target->IsPlayer())
|
||||
return false;
|
||||
|
||||
if (me->IsWithinCombatRange(target, 7.0f))
|
||||
@@ -952,7 +952,7 @@ class spell_putricide_unstable_experiment : public SpellScript
|
||||
void HandleScript(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
if (!GetCaster()->IsCreature())
|
||||
return;
|
||||
|
||||
Creature* creature = GetCaster()->ToCreature();
|
||||
@@ -1044,7 +1044,7 @@ class spell_putricide_ooze_channel : public SpellScript
|
||||
bool Load() override
|
||||
{
|
||||
_target = nullptr;
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
@@ -1318,7 +1318,7 @@ class spell_putricide_mutation_init : public SpellScript
|
||||
if (!GetExplTargetUnit())
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
if (GetExplTargetUnit()->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!GetExplTargetUnit()->IsPlayer())
|
||||
return SPELL_FAILED_TARGET_NOT_PLAYER;
|
||||
|
||||
SpellCustomErrors extension = SPELL_CUSTOM_ERROR_NONE;
|
||||
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
if (!summoner)
|
||||
return;
|
||||
|
||||
if (summoner->GetTypeId() != TYPEID_UNIT)
|
||||
if (!summoner->IsCreature())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -651,7 +651,7 @@ class spell_rotface_large_ooze_combine : public SpellScript
|
||||
if (Creature* rotface = ObjectAccessor::GetCreature(*GetCaster(), instance->GetGuidData(DATA_ROTFACE)))
|
||||
if (rotface->IsAlive())
|
||||
{
|
||||
if (GetCaster()->GetTypeId() == TYPEID_UNIT)
|
||||
if (GetCaster()->IsCreature())
|
||||
GetCaster()->ToCreature()->AI()->Talk(EMOTE_UNSTABLE_EXPLOSION);
|
||||
rotface->AI()->Talk(SAY_UNSTABLE_EXPLOSION);
|
||||
}
|
||||
@@ -708,7 +708,7 @@ class spell_rotface_large_ooze_buff_combine : public SpellScript
|
||||
if (Creature* rotface = ObjectAccessor::GetCreature(*GetCaster(), instance->GetGuidData(DATA_ROTFACE)))
|
||||
if (rotface->IsAlive())
|
||||
{
|
||||
if (GetCaster()->GetTypeId() == TYPEID_UNIT)
|
||||
if (GetCaster()->IsCreature())
|
||||
GetCaster()->ToCreature()->AI()->Talk(EMOTE_UNSTABLE_EXPLOSION);
|
||||
rotface->AI()->Talk(SAY_UNSTABLE_EXPLOSION);
|
||||
}
|
||||
@@ -792,7 +792,7 @@ class spell_rotface_unstable_ooze_explosion_suicide_aura : public AuraScript
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* target = GetTarget();
|
||||
if (target->GetTypeId() != TYPEID_UNIT)
|
||||
if (!target->IsCreature())
|
||||
return;
|
||||
|
||||
target->SetVisible(false);
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
if (target->GetExactDist(_source) > 80.0f)
|
||||
return false;
|
||||
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return false;
|
||||
|
||||
if (target->HasAura(SPELL_FROST_IMBUED_BLADE))
|
||||
@@ -1154,7 +1154,7 @@ class spell_sindragosa_soul_preservation_aura : public AuraScript
|
||||
{
|
||||
s->CastSpell(s, 72466, true);
|
||||
s->RemoveAurasDueToSpell(72424);
|
||||
if (s->GetTypeId() == TYPEID_UNIT) s->ToCreature()->SetLootMode(3);
|
||||
if (s->IsCreature()) s->ToCreature()->SetLootMode(3);
|
||||
SetDuration(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
return false;
|
||||
if (!target->IsAlive())
|
||||
return false;
|
||||
if (_playerOnly && target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (_playerOnly && !target->IsPlayer())
|
||||
return false;
|
||||
if (_maxDist && _source->GetExactDist(target) > _maxDist)
|
||||
return false;
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
return false;
|
||||
if (!target->IsAlive())
|
||||
return false;
|
||||
if (_playerOnly && target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (_playerOnly && !target->IsPlayer())
|
||||
return false;
|
||||
if (target == _source->GetVictim())
|
||||
return false;
|
||||
@@ -446,7 +446,7 @@ public:
|
||||
return false;
|
||||
if (!target->IsAlive())
|
||||
return false;
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!target->IsPlayer())
|
||||
return false;
|
||||
if (_source->GetExactDist(target) > 100.0f)
|
||||
return false;
|
||||
@@ -600,7 +600,7 @@ public:
|
||||
|
||||
bool operator()(Unit* unit) const
|
||||
{
|
||||
if (!unit || unit->GetTypeId() != TYPEID_PLAYER || unit == _sourceObj || _sourceObj->GetVictim() == unit || !unit->isTargetableForAttack())
|
||||
if (!unit || !unit->IsPlayer() || unit == _sourceObj || _sourceObj->GetVictim() == unit || !unit->isTargetableForAttack())
|
||||
return false;
|
||||
if (unit->HasAura(SPELL_PLAGUE_AVOIDANCE) || unit->HasAura(SPELL_BOSS_HITTIN_YA_AURA) || unit->HasAura(_notAura1) || unit->HasAura(_notAura2))
|
||||
return false;
|
||||
@@ -2078,7 +2078,7 @@ class spell_the_lich_king_shadow_trap_periodic : public SpellScript
|
||||
GetCaster()->CastSpell((Unit*)nullptr, SPELL_SHADOW_TRAP_KNOCKBACK, true);
|
||||
if (Aura* a = GetCaster()->GetAura(SPELL_SHADOW_TRAP_AURA))
|
||||
a->SetDuration(0);
|
||||
if (GetCaster()->GetTypeId() == TYPEID_UNIT)
|
||||
if (GetCaster()->IsCreature())
|
||||
GetCaster()->ToCreature()->DespawnOrUnsummon(3000);
|
||||
}
|
||||
|
||||
@@ -2102,7 +2102,7 @@ class spell_the_lich_king_ice_burst_target_search : public SpellScript
|
||||
if (unitList.empty())
|
||||
return;
|
||||
|
||||
if (GetCaster()->GetTypeId() == TYPEID_UNIT)
|
||||
if (GetCaster()->IsCreature())
|
||||
GetCaster()->ToCreature()->AI()->DoAction(-1);
|
||||
}
|
||||
|
||||
@@ -2336,7 +2336,7 @@ class VehicleCheck
|
||||
public:
|
||||
bool operator()(WorldObject* unit)
|
||||
{
|
||||
return (unit->GetTypeId() != TYPEID_UNIT && unit->GetTypeId() != TYPEID_PLAYER) || unit->ToUnit()->GetVehicle();
|
||||
return (!unit->IsCreature() && !unit->IsPlayer()) || unit->ToUnit()->GetVehicle();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2804,7 +2804,7 @@ class spell_the_lich_king_vile_spirit_move_target_search : public SpellScript
|
||||
bool Load() override
|
||||
{
|
||||
_target = nullptr;
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetCaster()->IsCreature();
|
||||
}
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
|
||||
@@ -967,7 +967,7 @@ public:
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
// do not see targets inside Frostwing Halls when we are not there
|
||||
return target->GetTypeId() != TYPEID_PLAYER && (me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f) && target->GetEntry() != NPC_SINDRAGOSA;
|
||||
return !target->IsPlayer() && (me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f) && target->GetEntry() != NPC_SINDRAGOSA;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1757,7 +1757,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* c, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == 71306 && c->GetTypeId() == TYPEID_UNIT) // Twisted Winds
|
||||
if (spell->Id == 71306 && c->IsCreature()) // Twisted Winds
|
||||
{
|
||||
Position myPos = me->GetPosition();
|
||||
me->NearTeleportTo(c->GetPositionX(), c->GetPositionY(), c->GetPositionZ(), c->GetOrientation());
|
||||
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
case NPC_SE_HIGH_OVERLORD_SAURFANG:
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
{
|
||||
creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, creature->GetCreatureData());
|
||||
creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, true);
|
||||
creature->LoadEquipment();
|
||||
}
|
||||
DeathbringerSaurfangEventGUID = creature->GetGUID();
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "SpellInfo.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Faerlina;
|
||||
|
||||
void AddSC_boss_faerlina()
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
if (!urand(0, 3))
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace FourHorsemen;
|
||||
|
||||
void AddSC_boss_four_horsemen()
|
||||
|
||||
@@ -247,7 +247,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Gluth;
|
||||
|
||||
void AddSC_boss_gluth()
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
return false;
|
||||
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for (const auto& itr : pList)
|
||||
for (auto const& itr : pList)
|
||||
{
|
||||
Player* player = itr.GetSource();
|
||||
if (!player || !player->IsAlive())
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Gothik;
|
||||
|
||||
void AddSC_boss_gothik()
|
||||
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_KILL);
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
{
|
||||
bool checklife = false;
|
||||
bool checkdead = false;
|
||||
for (const auto& i : PlayerList)
|
||||
for (auto const& i : PlayerList)
|
||||
{
|
||||
Player* player = i.GetSource();
|
||||
if (player->IsAlive() &&
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "boss_heigan.h"
|
||||
|
||||
|
||||
using namespace Heigan;
|
||||
|
||||
void AddSC_boss_heigan()
|
||||
|
||||
@@ -9,40 +9,40 @@
|
||||
|
||||
namespace Heigan {
|
||||
|
||||
enum HeiganSays
|
||||
enum Says
|
||||
{
|
||||
HEIGAN_SAY_AGGRO = 0,
|
||||
HEIGAN_SAY_SLAY = 1,
|
||||
HEIGAN_SAY_TAUNT = 2,
|
||||
HEIGAN_EMOTE_DEATH = 3,
|
||||
HEIGAN_EMOTE_DANCE = 4,
|
||||
HEIGAN_EMOTE_DANCE_END = 5,
|
||||
HEIGAN_SAY_DANCE = 6
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1,
|
||||
SAY_TAUNT = 2,
|
||||
EMOTE_DEATH = 3,
|
||||
EMOTE_DANCE = 4,
|
||||
EMOTE_DANCE_END = 5,
|
||||
SAY_DANCE = 6
|
||||
};
|
||||
|
||||
enum HeiganSpells
|
||||
enum Spells
|
||||
{
|
||||
HEIGAN_SPELL_SPELL_DISRUPTION = 29310,
|
||||
HEIGAN_SPELL_DECREPIT_FEVER_10 = 29998,
|
||||
HEIGAN_SPELL_DECREPIT_FEVER_25 = 55011,
|
||||
HEIGAN_SPELL_PLAGUE_CLOUD = 29350,
|
||||
HEIGAN_SPELL_TELEPORT_SELF = 30211
|
||||
SPELL_SPELL_DISRUPTION = 29310,
|
||||
SPELL_DECREPIT_FEVER_10 = 29998,
|
||||
SPELL_DECREPIT_FEVER_25 = 55011,
|
||||
SPELL_PLAGUE_CLOUD = 29350,
|
||||
SPELL_TELEPORT_SELF = 30211
|
||||
};
|
||||
|
||||
enum HeiganEvents
|
||||
enum Events
|
||||
{
|
||||
HEIGAN_EVENT_DISRUPTION = 1,
|
||||
HEIGAN_EVENT_DECEPIT_FEVER = 2,
|
||||
HEIGAN_EVENT_ERUPT_SECTION = 3,
|
||||
HEIGAN_EVENT_SWITCH_PHASE = 4,
|
||||
HEIGAN_EVENT_SAFETY_DANCE = 5,
|
||||
HEIGAN_EVENT_PLAGUE_CLOUD = 6
|
||||
EVENT_DISRUPTION = 1,
|
||||
EVENT_DECEPIT_FEVER = 2,
|
||||
EVENT_ERUPT_SECTION = 3,
|
||||
EVENT_SWITCH_PHASE = 4,
|
||||
EVENT_SAFETY_DANCE = 5,
|
||||
EVENT_PLAGUE_CLOUD = 6
|
||||
};
|
||||
|
||||
enum HeiganMisc
|
||||
enum Misc
|
||||
{
|
||||
HEIGAN_PHASE_SLOW_DANCE = 0,
|
||||
HEIGAN_PHASE_FAST_DANCE = 1
|
||||
PHASE_SLOW_DANCE = 0,
|
||||
PHASE_FAST_DANCE = 1
|
||||
};
|
||||
|
||||
class boss_heigan : public CreatureScript
|
||||
@@ -86,10 +86,10 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(HEIGAN_SAY_SLAY);
|
||||
Talk(SAY_SLAY);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
@@ -99,14 +99,14 @@ public:
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(HEIGAN_EMOTE_DEATH);
|
||||
Talk(EMOTE_DEATH);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
me->SetInCombatWithZone();
|
||||
Talk(HEIGAN_SAY_AGGRO);
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_ENTER_GATE)))
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
StartFightPhase(HEIGAN_PHASE_SLOW_DANCE);
|
||||
StartFightPhase(PHASE_SLOW_DANCE);
|
||||
}
|
||||
|
||||
void StartFightPhase(uint8 phase)
|
||||
@@ -122,30 +122,30 @@ public:
|
||||
currentSection = 3;
|
||||
currentPhase = phase;
|
||||
events.Reset();
|
||||
if (phase == HEIGAN_PHASE_SLOW_DANCE)
|
||||
if (phase == PHASE_SLOW_DANCE)
|
||||
{
|
||||
me->CastStop();
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
DoZoneInCombat();
|
||||
events.ScheduleEvent(HEIGAN_EVENT_DISRUPTION, 12s, 15s);
|
||||
events.ScheduleEvent(HEIGAN_EVENT_DECEPIT_FEVER, 17s);
|
||||
events.ScheduleEvent(HEIGAN_EVENT_ERUPT_SECTION, 15s);
|
||||
events.ScheduleEvent(HEIGAN_EVENT_SWITCH_PHASE, 90s);
|
||||
events.ScheduleEvent(EVENT_DISRUPTION, 12s, 15s);
|
||||
events.ScheduleEvent(EVENT_DECEPIT_FEVER, 17s);
|
||||
events.ScheduleEvent(EVENT_ERUPT_SECTION, 15s);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PHASE, 90s);
|
||||
}
|
||||
else // if (phase == HEIGAN_PHASE_FAST_DANCE)
|
||||
else // if (phase == PHASE_FAST_DANCE)
|
||||
{
|
||||
Talk(HEIGAN_EMOTE_DANCE);
|
||||
Talk(HEIGAN_SAY_DANCE);
|
||||
Talk(EMOTE_DANCE);
|
||||
Talk(SAY_DANCE);
|
||||
me->AttackStop();
|
||||
me->StopMoving();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->CastSpell(me, HEIGAN_SPELL_TELEPORT_SELF, false);
|
||||
me->CastSpell(me, SPELL_TELEPORT_SELF, false);
|
||||
me->SetFacingTo(2.40f);
|
||||
events.ScheduleEvent(HEIGAN_EVENT_PLAGUE_CLOUD, 1s);
|
||||
events.ScheduleEvent(HEIGAN_EVENT_ERUPT_SECTION, 7s);
|
||||
events.ScheduleEvent(HEIGAN_EVENT_SWITCH_PHASE, 45s);
|
||||
events.ScheduleEvent(EVENT_PLAGUE_CLOUD, 1s);
|
||||
events.ScheduleEvent(EVENT_ERUPT_SECTION, 7s);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PHASE, 45s);
|
||||
}
|
||||
events.ScheduleEvent(HEIGAN_EVENT_SAFETY_DANCE, 5s);
|
||||
events.ScheduleEvent(EVENT_SAFETY_DANCE, 5s);
|
||||
}
|
||||
|
||||
bool IsInRoom(Unit* who)
|
||||
@@ -172,29 +172,29 @@ public:
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case HEIGAN_EVENT_DISRUPTION:
|
||||
me->CastSpell(me, HEIGAN_SPELL_SPELL_DISRUPTION, false);
|
||||
case EVENT_DISRUPTION:
|
||||
me->CastSpell(me, SPELL_SPELL_DISRUPTION, false);
|
||||
events.Repeat(10s);
|
||||
break;
|
||||
case HEIGAN_EVENT_DECEPIT_FEVER:
|
||||
me->CastSpell(me, RAID_MODE(HEIGAN_SPELL_DECREPIT_FEVER_10, HEIGAN_SPELL_DECREPIT_FEVER_25), false);
|
||||
case EVENT_DECEPIT_FEVER:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DECREPIT_FEVER_10, SPELL_DECREPIT_FEVER_25), false);
|
||||
events.Repeat(22s, 25s);
|
||||
break;
|
||||
case HEIGAN_EVENT_PLAGUE_CLOUD:
|
||||
me->CastSpell(me, HEIGAN_SPELL_PLAGUE_CLOUD, false);
|
||||
case EVENT_PLAGUE_CLOUD:
|
||||
me->CastSpell(me, SPELL_PLAGUE_CLOUD, false);
|
||||
break;
|
||||
case HEIGAN_EVENT_SWITCH_PHASE:
|
||||
if (currentPhase == HEIGAN_PHASE_SLOW_DANCE)
|
||||
case EVENT_SWITCH_PHASE:
|
||||
if (currentPhase == PHASE_SLOW_DANCE)
|
||||
{
|
||||
StartFightPhase(HEIGAN_PHASE_FAST_DANCE);
|
||||
StartFightPhase(PHASE_FAST_DANCE);
|
||||
}
|
||||
else
|
||||
{
|
||||
StartFightPhase(HEIGAN_PHASE_SLOW_DANCE);
|
||||
Talk(HEIGAN_EMOTE_DANCE_END); // avoid play the emote on aggro
|
||||
StartFightPhase(PHASE_SLOW_DANCE);
|
||||
Talk(EMOTE_DANCE_END); // avoid play the emote on aggro
|
||||
}
|
||||
break;
|
||||
case HEIGAN_EVENT_ERUPT_SECTION:
|
||||
case EVENT_ERUPT_SECTION:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_HEIGAN_ERUPTION, currentSection);
|
||||
@@ -208,16 +208,16 @@ public:
|
||||
}
|
||||
moveRight ? currentSection++ : currentSection--;
|
||||
}
|
||||
if (currentPhase == HEIGAN_PHASE_SLOW_DANCE)
|
||||
if (currentPhase == PHASE_SLOW_DANCE)
|
||||
{
|
||||
Talk(HEIGAN_SAY_TAUNT);
|
||||
Talk(SAY_TAUNT);
|
||||
}
|
||||
events.Repeat(currentPhase == HEIGAN_PHASE_SLOW_DANCE ? 10s : 4s);
|
||||
events.Repeat(currentPhase == PHASE_SLOW_DANCE ? 10s : 4s);
|
||||
break;
|
||||
case HEIGAN_EVENT_SAFETY_DANCE:
|
||||
case EVENT_SAFETY_DANCE:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for (const auto& itr : pList)
|
||||
for (auto const& itr : pList)
|
||||
{
|
||||
if (IsInRoom(itr.GetSource()) && !itr.GetSource()->IsAlive())
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Kelthuzad;
|
||||
|
||||
void AddSC_boss_kelthuzad()
|
||||
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
@@ -553,7 +553,7 @@ public:
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER && !who->IsPet())
|
||||
if (!who->IsPlayer() && !who->IsPet())
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Noth;
|
||||
|
||||
void AddSC_boss_noth()
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
|
||||
namespace Noth {
|
||||
|
||||
enum NothSays
|
||||
enum Says
|
||||
{
|
||||
NOTH_SAY_AGGRO = 0,
|
||||
NOTH_SAY_SUMMON = 1,
|
||||
NOTH_SAY_SLAY = 2,
|
||||
NOTH_SAY_DEATH = 3,
|
||||
NOTH_EMOTE_SUMMON = 4,
|
||||
NOTH_EMOTE_SUMMON_WAVE = 5,
|
||||
NOTH_EMOTE_TELEPORT_BALCONY = 6,
|
||||
NOTH_EMOTE_TELEPORT_BACK = 7,
|
||||
NOTH_EMOTE_BLINK = 8
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SUMMON = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_DEATH = 3,
|
||||
EMOTE_SUMMON = 4,
|
||||
EMOTE_SUMMON_WAVE = 5,
|
||||
EMOTE_TELEPORT_BALCONY = 6,
|
||||
EMOTE_TELEPORT_BACK = 7,
|
||||
EMOTE_BLINK = 8
|
||||
};
|
||||
|
||||
enum NothSpells
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER_10 = 29213,
|
||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER_25 = 54835,
|
||||
@@ -30,11 +30,11 @@ enum NothSpells
|
||||
SPELL_SUMMON_PLAGUED_WARRIORS = 29237,
|
||||
SPELL_TELEPORT = 29216,
|
||||
SPELL_TELEPORT_BACK = 29231,
|
||||
NOTH_SPELL_BERSERK = 68378,
|
||||
SPELL_BERSERK = 68378,
|
||||
SPELL_BLINK = 29208
|
||||
};
|
||||
|
||||
enum NothEvents
|
||||
enum Events
|
||||
{
|
||||
EVENT_CURSE = 1,
|
||||
EVENT_CRIPPLE = 2,
|
||||
@@ -47,7 +47,7 @@ enum NothEvents
|
||||
EVENT_BALCONY_SUMMON_REAL = 9
|
||||
};
|
||||
|
||||
enum NothMisc
|
||||
enum Misc
|
||||
{
|
||||
NPC_PLAGUED_WARRIOR = 16984,
|
||||
NPC_PLAGUED_CHAMPION = 16983,
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(NOTH_SAY_AGGRO);
|
||||
Talk(SAY_AGGRO);
|
||||
StartGroundPhase();
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
me->NearTeleportTo(nothPosition.GetPositionX(), nothPosition.GetPositionY(), nothPosition.GetPositionZ(), nothPosition.GetOrientation(), true);
|
||||
}
|
||||
BossAI::JustDied(killer);
|
||||
Talk(NOTH_SAY_DEATH);
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
||||
@@ -195,10 +195,10 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(NOTH_SAY_SLAY);
|
||||
Talk(SAY_SLAY);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
@@ -228,8 +228,8 @@ public:
|
||||
events.Repeat(25s);
|
||||
break;
|
||||
case EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE:
|
||||
Talk(NOTH_SAY_SUMMON);
|
||||
Talk(NOTH_EMOTE_SUMMON);
|
||||
Talk(SAY_SUMMON);
|
||||
Talk(EMOTE_SUMMON);
|
||||
events.Repeat(30s);
|
||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_REAL, 4s);
|
||||
break;
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
SummonHelper(NPC_PLAGUED_WARRIOR, RAID_MODE(2, 3));
|
||||
break;
|
||||
case EVENT_MOVE_TO_BALCONY:
|
||||
Talk(NOTH_EMOTE_TELEPORT_BALCONY);
|
||||
Talk(EMOTE_TELEPORT_BALCONY);
|
||||
me->CastSpell(me, SPELL_TELEPORT, true);
|
||||
StartBalconyPhase();
|
||||
break;
|
||||
@@ -246,12 +246,12 @@ public:
|
||||
DoResetThreatList();
|
||||
me->CastSpell(me, RAID_MODE(SPELL_CRIPPLE_10, SPELL_CRIPPLE_25), false);
|
||||
me->CastSpell(me, SPELL_BLINK, true);
|
||||
Talk(NOTH_EMOTE_BLINK);
|
||||
Talk(EMOTE_BLINK);
|
||||
events.Repeat(30s);
|
||||
break;
|
||||
// BALCONY
|
||||
case EVENT_BALCONY_SUMMON_ANNOUNCE:
|
||||
Talk(NOTH_EMOTE_SUMMON_WAVE);
|
||||
Talk(EMOTE_SUMMON_WAVE);
|
||||
events.Repeat(30s);
|
||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_REAL, 4s);
|
||||
break;
|
||||
@@ -272,12 +272,12 @@ public:
|
||||
}
|
||||
break;
|
||||
case EVENT_MOVE_TO_GROUND:
|
||||
Talk(NOTH_EMOTE_TELEPORT_BACK);
|
||||
Talk(EMOTE_TELEPORT_BACK);
|
||||
me->CastSpell(me, SPELL_TELEPORT_BACK, true);
|
||||
timesInBalcony++;
|
||||
if (timesInBalcony == 3)
|
||||
{
|
||||
DoCastSelf(NOTH_SPELL_BERSERK);
|
||||
DoCastSelf(SPELL_BERSERK);
|
||||
}
|
||||
StartGroundPhase();
|
||||
break;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace PatchWerk;
|
||||
|
||||
void AddSC_boss_patchwerk()
|
||||
|
||||
@@ -8,33 +8,33 @@
|
||||
|
||||
namespace PatchWerk {
|
||||
|
||||
enum PatchwerkYells
|
||||
enum Yells
|
||||
{
|
||||
PATCHWERK_SAY_AGGRO = 0,
|
||||
PATCHWERK_SAY_SLAY = 1,
|
||||
PATCHWERK_SAY_DEATH = 2,
|
||||
PATCHWERK_EMOTE_BERSERK = 3,
|
||||
PATCHWERK_EMOTE_ENRAGE = 4
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1,
|
||||
SAY_DEATH = 2,
|
||||
EMOTE_BERSERK = 3,
|
||||
EMOTE_ENRAGE = 4
|
||||
};
|
||||
|
||||
enum PatchwerkSpells
|
||||
enum Spells
|
||||
{
|
||||
SPELL_HATEFUL_STRIKE_10 = 41926,
|
||||
SPELL_HATEFUL_STRIKE_25 = 59192,
|
||||
PATCHWERK_SPELL_FRENZY = 28131,
|
||||
PATCHWERK_SPELL_BERSERK = 26662,
|
||||
SPELL_FRENZY = 28131,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_SLIME_BOLT = 32309
|
||||
};
|
||||
|
||||
enum PatchwerkEvents
|
||||
enum Events
|
||||
{
|
||||
PATCHWERK_EVENT_HEALTH_CHECK = 1,
|
||||
EVENT_HEALTH_CHECK = 1,
|
||||
EVENT_HATEFUL_STRIKE = 2,
|
||||
EVENT_SLIME_BOLT = 3,
|
||||
PATCHWERK_EVENT_BERSERK = 4
|
||||
EVENT_BERSERK = 4
|
||||
};
|
||||
|
||||
enum PatchwerkMisc
|
||||
enum Misc
|
||||
{
|
||||
ACHIEV_TIMED_START_EVENT = 10286
|
||||
};
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
if (!urand(0, 3))
|
||||
{
|
||||
Talk(PATCHWERK_SAY_SLAY);
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -83,17 +83,17 @@ public:
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(PATCHWERK_SAY_DEATH);
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(PATCHWERK_SAY_AGGRO);
|
||||
Talk(SAY_AGGRO);
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_HATEFUL_STRIKE, 1500ms);
|
||||
events.ScheduleEvent(PATCHWERK_EVENT_BERSERK, 6min);
|
||||
events.ScheduleEvent(PATCHWERK_EVENT_HEALTH_CHECK, 1s);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 6min);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1s);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
@@ -159,20 +159,20 @@ public:
|
||||
events.Repeat(1s);
|
||||
break;
|
||||
}
|
||||
case PATCHWERK_EVENT_BERSERK:
|
||||
Talk(PATCHWERK_EMOTE_BERSERK);
|
||||
me->CastSpell(me, PATCHWERK_SPELL_BERSERK, true);
|
||||
case EVENT_BERSERK:
|
||||
Talk(EMOTE_BERSERK);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.ScheduleEvent(EVENT_SLIME_BOLT, 3s);
|
||||
break;
|
||||
case EVENT_SLIME_BOLT:
|
||||
me->CastSpell(me, SPELL_SLIME_BOLT, false);
|
||||
events.Repeat(3s);
|
||||
break;
|
||||
case PATCHWERK_EVENT_HEALTH_CHECK:
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->GetHealthPct() <= 5)
|
||||
{
|
||||
Talk(PATCHWERK_EMOTE_ENRAGE);
|
||||
me->CastSpell(me, PATCHWERK_SPELL_FRENZY, true);
|
||||
Talk(EMOTE_ENRAGE);
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
break;
|
||||
}
|
||||
events.Repeat(1s);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "naxxramas.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
|
||||
using namespace Razuvious;
|
||||
|
||||
void AddSC_boss_razuvious()
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
// Damage done by the controlled Death Knight understudies should also count toward damage done by players
|
||||
if(who && who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_DEATH_KNIGHT_UNDERSTUDY)
|
||||
if(who && who->IsCreature() && who->GetEntry() == NPC_DEATH_KNIGHT_UNDERSTUDY)
|
||||
{
|
||||
me->LowerPlayerDamageReq(damage);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Sapphiron;
|
||||
|
||||
void AddSC_boss_sapphiron()
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
if (PlList.IsEmpty())
|
||||
return;
|
||||
|
||||
for (const auto& i : PlList)
|
||||
for (auto const& i : PlList)
|
||||
{
|
||||
if (Player* player = i.GetSource())
|
||||
{
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
case EVENT_HUNDRED_CLUB:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for (const auto& itr : pList)
|
||||
for (auto const& itr : pList)
|
||||
{
|
||||
if (itr.GetSource()->GetResistance(SPELL_SCHOOL_FROST) > 100 && pInstance)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
|
||||
using namespace Thaddius;
|
||||
|
||||
void AddSC_boss_thaddius()
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
@@ -477,7 +477,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who->IsPlayer())
|
||||
return;
|
||||
|
||||
if (pInstance)
|
||||
@@ -635,7 +635,7 @@ class spell_thaddius_pos_neg_charge : public SpellScript
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->HasAura(GetTriggeringSpell()->Id) || target->GetTypeId() != TYPEID_PLAYER)
|
||||
if (target->HasAura(GetTriggeringSpell()->Id) || !target->IsPlayer())
|
||||
{
|
||||
SetHitDamage(0);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ class spell_boss_magus_telestra_summon_telestra_clones_aura : public AuraScript
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT;
|
||||
return GetUnitOwner()->IsCreature();
|
||||
}
|
||||
|
||||
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
|
||||
void IsSummonedBy(WorldObject* summoner) override
|
||||
{
|
||||
if (summoner->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!summoner->IsPlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
|
||||
void PassengerBoarded(Unit* passenger, int8 /*seatid*/, bool add) override
|
||||
{
|
||||
if (passenger->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!passenger->IsPlayer())
|
||||
return;
|
||||
|
||||
if (add)
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!victim->IsPlayer())
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER || urand(0, 2))
|
||||
if (!victim->IsPlayer() || urand(0, 2))
|
||||
return;
|
||||
|
||||
Talk(SAY_ALGALON_KILL);
|
||||
@@ -1018,7 +1018,7 @@ public:
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id != SPELL_CONSTELLATION_PHASE_EFFECT || caster->GetTypeId() != TYPEID_UNIT)
|
||||
if (spell->Id != SPELL_CONSTELLATION_PHASE_EFFECT || !caster->IsCreature())
|
||||
return;
|
||||
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user