aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-01-22 15:00:55 -0300
committerariel- <ariel-@users.noreply.github.com>2018-01-22 15:00:55 -0300
commit7c9722a4ae08b5f283f6a085a411e37604a7da9f (patch)
treeae026035f31ecd0c4f6cece5294683d5de59d40c /src/server/scripts/EasternKingdoms
parente315e41d36061fc88dfa09bfa0da1fbc0c00826f (diff)
Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version
Closes #12108 (again)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp4
6 files changed, 13 insertions, 13 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
index 43210d99de6..98eecd0da8d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
@@ -169,7 +169,7 @@ struct boss_coren_direbrew : public BossAI
events.SetPhase(PHASE_ONE);
me->SetImmuneToPC(false);
me->SetFaction(FACTION_GOBLIN_DARK_IRON_BAR_PATRON);
- me->SetInCombatWithZone();
+ DoZoneInCombat();
EntryCheckPredicate pred(NPC_ANTAGONIST);
summons.DoAction(ACTION_ANTAGONIST_HOSTILE, pred);
@@ -217,7 +217,7 @@ struct boss_coren_direbrew : public BossAI
void SummonSister(uint32 entry)
{
if (Creature* sister = me->SummonCreature(entry, me->GetPosition(), TEMPSUMMON_DEAD_DESPAWN))
- sister->SetInCombatWithZone();
+ DoZoneInCombat(sister);
}
void UpdateAI(uint32 diff) override
@@ -343,7 +343,7 @@ struct npc_direbrew_minion : public ScriptedAI
void Reset() override
{
me->SetFaction(FACTION_GOBLIN_DARK_IRON_BAR_PATRON);
- me->SetInCombatWithZone();
+ DoZoneInCombat();
}
void IsSummonedBy(Unit* /*summoner*/) override
@@ -373,7 +373,7 @@ struct npc_direbrew_antagonist : public ScriptedAI
case ACTION_ANTAGONIST_HOSTILE:
me->SetImmuneToPC(false);
me->SetFaction(FACTION_GOBLIN_DARK_IRON_BAR_PATRON);
- me->SetInCombatWithZone();
+ DoZoneInCombat();
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
index afb5e5414db..cafbc0cebf9 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -380,7 +380,7 @@ public:
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
{
if (Creature* creature = *itr)
- creature->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim());
+ DoZoneInCombat(creature); // AI()->AttackStart(me->GetVictim());
}
_events.ScheduleEvent(EVENT_STRIKE, urand(8000, 16000));
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index ec4344a18cf..0005338c231 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
@@ -457,7 +457,7 @@ public:
if (id == 1)
{
- me->SetInCombatWithZone();
+ DoZoneInCombat();
if (me->GetVictim())
AttackStart(me->GetVictim());
}
@@ -576,7 +576,7 @@ public:
if ((*itr) && !(*itr)->IsAlive())
{
(*itr)->Respawn();
- (*itr)->SetInCombatWithZone();
+ DoZoneInCombat((*itr));
(*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
(*itr)->SetReactState(REACT_AGGRESSIVE);
(*itr)->SetStandState(UNIT_STAND_STATE_STAND);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
index c5712cf012d..38eb7fff204 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
@@ -242,9 +242,9 @@ public:
switch (eventId)
{
case EVENT_RAZOR_SPAWN:
- for (uint8 i = urand(2, 5); i > 0 ; --i)
- if (Creature* summon = instance->SummonCreature(Entry[urand(0, 4)], SummonPosition[urand(0, 7)]))
- summon->SetInCombatWithZone();
+ for (uint8 i = urand(2, 5); i > 0; --i)
+ if (Creature* summon = instance->SummonCreature(Entry[urand(0, 4)], SummonPosition[urand(0, 7)]))
+ summon->AI()->DoZoneInCombat();
_events.ScheduleEvent(EVENT_RAZOR_SPAWN, urand(12, 17) * IN_MILLISECONDS);
break;
case EVENT_RAZOR_PHASE_TWO:
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
index b8067337c42..7204f406fda 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
@@ -299,7 +299,7 @@ public:
break;
case EVENT_INTRO_LANDING:
me->SetImmuneToPC(false);
- me->SetInCombatWithZone();
+ DoZoneInCombat();
break;
case EVENT_LAND:
Talk(YELL_LAND_PHASE);
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
index f45409f025d..628d6345ece 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
@@ -215,7 +215,7 @@ class boss_apothecary_hummel : public CreatureScript
case EVENT_START_FIGHT:
{
me->SetImmuneToAll(false);
- me->SetInCombatWithZone();
+ DoZoneInCombat();
events.ScheduleEvent(EVENT_CALL_BAXTER, Seconds(6));
events.ScheduleEvent(EVENT_CALL_FRYE, Seconds(14));
events.ScheduleEvent(EVENT_PERFUME_SPRAY, Milliseconds(3640));
@@ -296,7 +296,7 @@ struct npc_apothecary_genericAI : public ScriptedAI
else if (action == ACTION_START_FIGHT)
{
me->SetImmuneToAll(false);
- me->SetInCombatWithZone();
+ DoZoneInCombat();
}
}