aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/ExilesReach
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-12-29 12:59:38 +0100
committerShauren <shauren.trinity@gmail.com>2024-12-29 12:59:38 +0100
commit5e541de5747b26270da90d0d3c60de96a518a5b9 (patch)
tree68e5ef094cd7c3230b9293ba38659d45a6277e90 /src/server/scripts/ExilesReach
parent44130cf9c49a982d8ac4371c81d778dee21b1f2e (diff)
Scripts: Remove direct unit flag manipulations for UNIT_FLAG_IMMUNE_TO_PC, UNIT_FLAG_IMMUNE_TO_NPC and UNIT_FLAG_UNINTERACTIBLE
Diffstat (limited to 'src/server/scripts/ExilesReach')
-rw-r--r--src/server/scripts/ExilesReach/zone_exiles_reach.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/scripts/ExilesReach/zone_exiles_reach.cpp b/src/server/scripts/ExilesReach/zone_exiles_reach.cpp
index e53b4dd9e3b..37bdace06af 100644
--- a/src/server/scripts/ExilesReach/zone_exiles_reach.cpp
+++ b/src/server/scripts/ExilesReach/zone_exiles_reach.cpp
@@ -2435,7 +2435,7 @@ struct npc_sparring_partner_combat_training : public ScriptedAI
me->SetFacingToObject(owner);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
_events.ScheduleEvent(EVENT_COMBAT_CHECK_PLAYER, 1s);
OnReadyPointReached();
@@ -2508,13 +2508,13 @@ struct npc_sparring_partner_combat_training : public ScriptedAI
me->SetFacingToObject(owner);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
break;
}
case EVENT_COMBAT_TRAINING_END:
// Used by all classes
me->SetImmuneToPC(true);
- me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(true);
me->RemoveAllAuras();
if (Unit* owner = me->GetDemonCreator())
{
@@ -2554,7 +2554,7 @@ struct npc_sparring_partner_enhanced_combat_training_warrior : public npc_sparri
{
_slamCounter = 0;
me->SetImmuneToPC(true);
- me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(true);
player->GetSpellHistory()->ResetCharges(CHARGE_CATEGORY_CHARGE_SPELL);
me->CastSpell(me, SPELL_AGGRO_RADIUS_CHECK_DNT_WARRIOR_MAGE);
me->CastSpell(me, SPELL_RANGED_ROOT_DNT);
@@ -2913,7 +2913,7 @@ struct npc_sparring_partner_enhanced_combat_training_priest : public npc_sparrin
{
StartConversationWithPlayer(CONVERSATION_SHADOW_WORD_PAIN_PRE_COMBAT_PRIEST);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
me->RemoveAura(SPELL_RANGED_ROOT_DNT);
_secondaryCheck = false;
}
@@ -2971,7 +2971,7 @@ struct npc_sparring_partner_enhanced_combat_training_shaman : public npc_sparrin
case EVENT_COMBAT_TRAINING_AGGRO_CHECK_SHAMAN:
me->CastSpell(me, SPELL_AGGRO_RADIUS_CHECK_DNT_SHAMAN);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
_secondaryCheck = true;
break;
default:
@@ -3010,7 +3010,7 @@ struct npc_sparring_partner_enhanced_combat_training_shaman : public npc_sparrin
{
StartConversationWithPlayer(CONVERSATION_PRIMAL_STRIKE_QUEST_CREDIT_SHAMAN);
me->SetImmuneToPC(true);
- me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(true);
_events.ScheduleEvent(EVENT_COMBAT_TRAINING_RESET_SHAMAN, 3s);
}
}
@@ -3064,7 +3064,7 @@ struct npc_sparring_partner_enhanced_combat_training_mage : public npc_sparring_
case EVENT_COMBAT_TRAINING_AGGRO_CHECK_MAGE:
me->CastSpell(me, SPELL_AGGRO_RADIUS_CHECK_DNT_WARRIOR_MAGE);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
_secondaryCheck = true;
break;
default:
@@ -3092,7 +3092,7 @@ struct npc_sparring_partner_enhanced_combat_training_mage : public npc_sparring_
{
StartConversationWithPlayer(CONVERSATION_FIRE_BLAST_QUEST_CREDIT_MAGE);
me->SetImmuneToPC(true);
- me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(true);
_events.ScheduleEvent(EVENT_COMBAT_TRAINING_RESET_MAGE, 4s);
}
}
@@ -3180,7 +3180,7 @@ struct npc_sparring_partner_enhanced_combat_training_warlock : public npc_sparri
{
StartConversationWithPlayer(CONVERSATION_CORRUPTION_CAST_PRE_COMBAT_WARLOCK);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
me->RemoveAura(SPELL_RANGED_ROOT_DNT);
_secondaryCheck = false;
}
@@ -3296,7 +3296,7 @@ struct npc_sparring_partner_enhanced_combat_training_druid : public npc_sparring
{
StartConversationWithPlayer(CONVERSATION_MOONFIRE_CAST_PRE_COMBAT_DRUID);
me->SetImmuneToPC(false);
- me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ me->SetUninteractible(false);
me->RemoveAura(SPELL_RANGED_ROOT_DNT);
_hitByMoonfire = true;
}