mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Core/SSC): Added boss boundaries (#17981)
* fix(Core/SSC): Added boss boundaries for Lady Vashj and Morogrim * add FLK boundaries * leftover
This commit is contained in:
@@ -73,8 +73,8 @@ enum Misc
|
||||
|
||||
const Position advisorsPosition[MAX_ADVISORS] =
|
||||
{
|
||||
{448.37f, -544.71f, -7.54f, 0.00f},
|
||||
{457.37f, -544.71f, -7.54f, 0.00f}
|
||||
{ 448.37f, -544.71f, -7.54f, 0.00f },
|
||||
{ 457.37f, -544.71f, -7.54f, 0.00f }
|
||||
};
|
||||
|
||||
struct boss_fathomlord_karathress : public BossAI
|
||||
@@ -183,9 +183,10 @@ private:
|
||||
|
||||
struct boss_fathomguard_sharkkis : public ScriptedAI
|
||||
{
|
||||
boss_fathomguard_sharkkis(Creature* creature) : ScriptedAI(creature), summons(creature)
|
||||
boss_fathomguard_sharkkis(Creature* creature) : ScriptedAI(creature), _summons(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
SetBoundary(_instance->GetBossBoundary(DATA_FATHOM_LORD_KARATHRESS));
|
||||
|
||||
scheduler.SetValidator([this]
|
||||
{
|
||||
@@ -193,20 +194,18 @@ struct boss_fathomguard_sharkkis : public ScriptedAI
|
||||
});
|
||||
}
|
||||
|
||||
SummonList summons;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
scheduler.CancelAll();
|
||||
|
||||
summons.DespawnAll();
|
||||
summons.clear();
|
||||
_summons.DespawnAll();
|
||||
_summons.clear();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summon->SetInCombatWithZone();
|
||||
summons.Summon(summon);
|
||||
_summons.Summon(summon);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
@@ -234,7 +233,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI
|
||||
}).Schedule(41250ms, [this](TaskContext context)
|
||||
{
|
||||
DoCastSelf(SPELL_THE_BEAST_WITHIN);
|
||||
summons.DoForAllSummons([&](WorldObject* summon)
|
||||
_summons.DoForAllSummons([&](WorldObject* summon)
|
||||
{
|
||||
me->CastSpell(summon->ToCreature(), SPELL_BESTIAL_WRATH, true);
|
||||
});
|
||||
@@ -270,6 +269,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
SummonList _summons;
|
||||
};
|
||||
|
||||
enum NPCTotems
|
||||
@@ -295,9 +295,10 @@ enum TotemChoice
|
||||
|
||||
struct boss_fathomguard_tidalvess : public ScriptedAI
|
||||
{
|
||||
boss_fathomguard_tidalvess(Creature* creature) : ScriptedAI(creature), summons(creature)
|
||||
boss_fathomguard_tidalvess(Creature* creature) : ScriptedAI(creature), _summons(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
SetBoundary(_instance->GetBossBoundary(DATA_FATHOM_LORD_KARATHRESS));
|
||||
|
||||
_scheduler.SetValidator([this]
|
||||
{
|
||||
@@ -305,25 +306,21 @@ struct boss_fathomguard_tidalvess : public ScriptedAI
|
||||
});
|
||||
}
|
||||
|
||||
SummonList summons;
|
||||
|
||||
std::list<uint32> entryList;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_scheduler.CancelAll();
|
||||
_choice = 0;
|
||||
|
||||
summons.DespawnAll();
|
||||
_summons.DespawnAll();
|
||||
|
||||
entryList.clear();
|
||||
_entryList.clear();
|
||||
|
||||
entryList = {NPC_SPITFIRE_TOTEM, NPC_GREATER_EARTHBIND_TOTEM, NPC_GREATER_POISON_CLEANSING_TOTEM};
|
||||
_entryList = { NPC_SPITFIRE_TOTEM, NPC_GREATER_EARTHBIND_TOTEM, NPC_GREATER_POISON_CLEANSING_TOTEM };
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
_summons.Summon(summon);
|
||||
summon->Attack(me->GetVictim(), false);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
@@ -366,15 +363,15 @@ struct boss_fathomguard_tidalvess : public ScriptedAI
|
||||
{
|
||||
case ACTION_REMOVE_SPITFIRE:
|
||||
_totemScheduler.CancelGroup(SPITFIRE);
|
||||
entryList.push_back(NPC_SPITFIRE_TOTEM);
|
||||
_entryList.push_back(NPC_SPITFIRE_TOTEM);
|
||||
break;
|
||||
case ACTION_REMOVE_EARTHBIND:
|
||||
_totemScheduler.CancelGroup(EARTHBIND);
|
||||
entryList.push_back(NPC_GREATER_EARTHBIND_TOTEM);
|
||||
_entryList.push_back(NPC_GREATER_EARTHBIND_TOTEM);
|
||||
break;
|
||||
case ACTION_REMOVE_CLEANSING:
|
||||
_totemScheduler.CancelGroup(CLEANSING);
|
||||
entryList.push_back(NPC_GREATER_POISON_CLEANSING_TOTEM);
|
||||
_entryList.push_back(NPC_GREATER_POISON_CLEANSING_TOTEM);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -411,10 +408,10 @@ struct boss_fathomguard_tidalvess : public ScriptedAI
|
||||
context.Repeat(10900ms, 14700ms);
|
||||
}).Schedule(15800ms, [this](TaskContext context)
|
||||
{
|
||||
if (entryList.size() != 0) //don't summon when all totems are up
|
||||
if (_entryList.size() != 0) //don't summon when all totems are up
|
||||
{
|
||||
uint32 totemEntry = entryList.front();
|
||||
entryList.pop_front();
|
||||
uint32 totemEntry = _entryList.front();
|
||||
_entryList.pop_front();
|
||||
SummonTotem(totemEntry);
|
||||
ScheduleRemoval(totemEntry);
|
||||
}
|
||||
@@ -450,13 +447,16 @@ private:
|
||||
TaskScheduler _totemScheduler;
|
||||
InstanceScript* _instance;
|
||||
uint8 _choice;
|
||||
SummonList _summons;
|
||||
std::list<uint32> _entryList;
|
||||
};
|
||||
|
||||
struct boss_fathomguard_caribdis : public ScriptedAI
|
||||
{
|
||||
boss_fathomguard_caribdis(Creature* creature) : ScriptedAI(creature), summons(creature)
|
||||
boss_fathomguard_caribdis(Creature* creature) : ScriptedAI(creature), _summons(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
SetBoundary(_instance->GetBossBoundary(DATA_FATHOM_LORD_KARATHRESS));
|
||||
|
||||
_scheduler.SetValidator([this]
|
||||
{
|
||||
@@ -464,18 +464,16 @@ struct boss_fathomguard_caribdis : public ScriptedAI
|
||||
});
|
||||
}
|
||||
|
||||
SummonList summons;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_scheduler.CancelAll();
|
||||
|
||||
summons.DespawnAll();
|
||||
_summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
_summons.Summon(summon);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
@@ -531,6 +529,7 @@ struct boss_fathomguard_caribdis : public ScriptedAI
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
InstanceScript* _instance;
|
||||
SummonList _summons;
|
||||
};
|
||||
|
||||
class spell_karathress_power_of_tidalvess : public AuraScript
|
||||
|
||||
@@ -47,6 +47,13 @@ MinionData const minionData[] =
|
||||
{ 0, 0, }
|
||||
};
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_FATHOM_LORD_KARATHRESS, new RectangleBoundary(456.86f, 571.56f, -602.07f, -449.59f) },
|
||||
{ DATA_MOROGRIM_TIDEWALKER, new RectangleBoundary(304.32f, 457.59f, -786.5f, -661.3f) },
|
||||
{ DATA_LADY_VASHJ, new CircleBoundary(Position(29.99f, -922.409f), 83.65f) }
|
||||
};
|
||||
|
||||
class instance_serpent_shrine : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -63,6 +70,7 @@ public:
|
||||
LoadDoorData(doorData);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
LoadMinionData(minionData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
|
||||
_aliveKeepersCount = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user