mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 20:13:48 +00:00
feat(Unit/Misc): HasAnyAuras() HasAllAuras() HasAuras() (#21040)
This commit is contained in:
@@ -447,7 +447,7 @@ class spell_mutate_explode_bug : public SpellScript
|
||||
if (target->GetEntry() != NPC_QIRAJI_SCARAB && target->GetEntry() != NPC_QIRAJI_SCORPION)
|
||||
return true;
|
||||
if (Creature const* creature = target->ToCreature())
|
||||
if (creature->HasAura(SPELL_EXPLODE_BUG) || creature->HasAura(SPELL_MUTATE_BUG))
|
||||
if (creature->HasAnyAuras(SPELL_EXPLODE_BUG, SPELL_MUTATE_BUG))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -473,7 +473,7 @@ public:
|
||||
{
|
||||
if (spell->Id == SPELL_KODO_KOMBO_ITEM)
|
||||
{
|
||||
if (!(caster->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) || me->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF))
|
||||
if (!caster->HasAnyAuras(SPELL_KODO_KOMBO_PLAYER_BUFF, SPELL_KODO_KOMBO_DESPAWN_BUFF)
|
||||
&& (me->GetEntry() == NPC_AGED_KODO || me->GetEntry() == NPC_DYING_KODO || me->GetEntry() == NPC_ANCIENT_KODO))
|
||||
{
|
||||
me->UpdateEntry(NPC_TAMED_KODO, nullptr, false);
|
||||
@@ -494,7 +494,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) && creature->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF))
|
||||
if (player->HasAllAuras(SPELL_KODO_KOMBO_PLAYER_BUFF, SPELL_KODO_KOMBO_DESPAWN_BUFF))
|
||||
{
|
||||
player->TalkedToCreature(creature->GetEntry(), ObjectGuid::Empty);
|
||||
player->RemoveAurasDueToSpell(SPELL_KODO_KOMBO_PLAYER_BUFF);
|
||||
|
||||
Reference in New Issue
Block a user