mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 15:38:19 +08:00
More Onyxia 40 fixes
This commit is contained in:
@@ -423,7 +423,7 @@ public:
|
||||
class IndividualPlayerProgression_UnitScript : public UnitScript
|
||||
{
|
||||
private:
|
||||
float computeTotalGearTuning(Player* player)
|
||||
static float computeTotalGearTuning(Player* player)
|
||||
{
|
||||
float gearAdjustment = 0.0;
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
|
||||
@@ -112,9 +112,8 @@ enum Yells
|
||||
SAY_KILL = 1,
|
||||
SAY_PHASE_2_TRANS = 2,
|
||||
SAY_PHASE_3_TRANS = 3,
|
||||
|
||||
// Emote
|
||||
EMOTE_BREATH = 4
|
||||
EMOTE_BREATH = 4,
|
||||
SAY_EVADE = 5
|
||||
};
|
||||
|
||||
class boss_onyxia_40 : public CreatureScript
|
||||
@@ -293,9 +292,21 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckInRoom() override
|
||||
{
|
||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 95.0f)
|
||||
{
|
||||
Talk(SAY_EVADE);
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -452,7 +463,7 @@ public:
|
||||
{
|
||||
Talk(EMOTE_BREATH);
|
||||
me->SetFacingTo(OnyxiaMoveData[CurrentWP].o);
|
||||
DoCast(OnyxiaMoveData[CurrentWP].spellId);
|
||||
DoCastAOE(OnyxiaMoveData[CurrentWP].spellId);
|
||||
events.ScheduleEvent(EVENT_SPELL_BREATH, 8250);
|
||||
break;
|
||||
}
|
||||
@@ -500,7 +511,7 @@ public:
|
||||
{
|
||||
if (Creature* trigger = me->SummonCreature(12758, *me, TEMPSUMMON_TIMED_DESPAWN, 1000))
|
||||
{
|
||||
trigger->AI()->DoCast(trigger, 17731);
|
||||
trigger->CastSpell(trigger, 17731, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,14 @@ public:
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_WHELP_SPAWNER:
|
||||
go->CastSpell((Unit*)nullptr, 17646);
|
||||
if (instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC)
|
||||
{
|
||||
go->CastSpell((Unit*)nullptr, 90003);
|
||||
}
|
||||
else
|
||||
{
|
||||
go->CastSpell((Unit*)nullptr, 17646);
|
||||
}
|
||||
if (Creature* onyxia = GetCreature(DATA_ONYXIA))
|
||||
{
|
||||
onyxia->AI()->DoAction(-1);
|
||||
@@ -314,6 +321,12 @@ public:
|
||||
spellInfo->Effects[EFFECT_0].DieSides = 225;
|
||||
spellInfo->Effects[EFFECT_0].BasePoints = 1387;
|
||||
break;
|
||||
case 90003:
|
||||
spellInfo->Targets |= TARGET_FLAG_DEST_LOCATION;
|
||||
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_DEST);
|
||||
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13); // 50000yd
|
||||
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user