diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-01-22 15:00:55 -0300 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-06-16 21:03:06 +0200 |
| commit | c77925da4a320df5be5eaeb1fc799df50e22c041 (patch) | |
| tree | 3a574f41483c6c73b6bd10aa254d15bbc2a4501c /src/server/scripts/EasternKingdoms | |
| parent | 29bfa32fc39de1d93fbdb272d48689174c547725 (diff) | |
Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version
Closes #12108 (again)
(cherry picked from commit 7c9722a4ae08b5f283f6a085a411e37604a7da9f)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
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 aaf0c43a0cf..63a8b580568 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 bb011209dcb..918dabf2f13 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 e1e4d26c00f..e76d3e6504b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -455,7 +455,7 @@ public: if (id == 1) { - me->SetInCombatWithZone(); + DoZoneInCombat(); if (me->GetVictim()) AttackStart(me->GetVictim()); } @@ -574,7 +574,7 @@ public: if ((*itr) && !(*itr)->IsAlive()) { (*itr)->Respawn(); - (*itr)->SetInCombatWithZone(); + DoZoneInCombat((*itr)); (*itr)->RemoveUnitFlag(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 d2cbc6e5b09..deb7719d022 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -244,9 +244,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 ea9bf01997a..2094e18289d 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 0bc222fde12..65303b527b7 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -217,7 +217,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)); @@ -298,7 +298,7 @@ struct npc_apothecary_genericAI : public ScriptedAI else if (action == ACTION_START_FIGHT) { me->SetImmuneToAll(false); - me->SetInCombatWithZone(); + DoZoneInCombat(); } } |
