fix(Scripts/Karazhan): Midnight no longer evades during Attumen fight (#25610)
This commit is contained in:
parent
cb0ffd34aa
commit
cf62b76ae0
2 changed files with 12 additions and 17 deletions
|
|
@ -82,11 +82,6 @@ struct boss_attumen : public BossAI
|
|||
Initialize();
|
||||
}
|
||||
|
||||
bool CanMeleeHit()
|
||||
{
|
||||
return me->GetVictim() && (me->GetVictim()->GetPositionZ() < 53.0f || me->GetVictim()->GetDistance(me->GetHomePosition()) < 50.0f);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
if (Creature* midnight = instance->GetCreature(DATA_MIDNIGHT))
|
||||
|
|
@ -215,18 +210,10 @@ struct boss_attumen : public BossAI
|
|||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_phase != PHASE_NONE)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!CanMeleeHit())
|
||||
{
|
||||
BossAI::EnterEvadeMode(EvadeReason::EVADE_REASON_BOUNDARY);
|
||||
}
|
||||
scheduler.Update(diff, std::bind(&BossAI::DoMeleeAttackIfReady, this));
|
||||
if (_phase != PHASE_NONE && !UpdateVictim())
|
||||
return;
|
||||
|
||||
scheduler.Update(diff, [this] { DoMeleeAttackIfReady(); });
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaBoundary.h"
|
||||
#include "Creature.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceMapScript.h"
|
||||
|
|
@ -65,6 +66,12 @@ DoorData const doorData[] =
|
|||
{ 0, 0, DOOR_TYPE_ROOM }
|
||||
};
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_ATTUMEN, new CircleBoundary(Position(-11126.3f, -1929.11f), 50.0f) },
|
||||
{ DATA_ATTUMEN, new ZRangeBoundary(49.0f, 55.0f) },
|
||||
};
|
||||
|
||||
class instance_karazhan : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
|
|
@ -81,6 +88,7 @@ public:
|
|||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadBossBoundaries(boundaries);
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue