Ported .Net Core commits:
hondacrx: - Initial commit: Switch to .Net Core 2.0 - Fix build and removed not needed files Fabi: - Updated solution platforms. - Changed folder structure. - Change library target framework to netstandard2.0. - Updated solution platforms again... - Removed windows specific kernel32 function usage (Ctrl-C handler).
This commit is contained in:
@@ -0,0 +1,650 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
|
||||
{
|
||||
struct TrialOfChampionSpells
|
||||
{
|
||||
//Vehicle
|
||||
public const uint CHARGE = 63010;
|
||||
public const uint SHIELD_BREAKER = 68504;
|
||||
public const uint SHIELD = 66482;
|
||||
|
||||
// Marshal Jacob Alerius && Mokra the Skullcrusher || Warrior
|
||||
public const uint MORTAL_STRIKE = 68783;
|
||||
public const uint MORTAL_STRIKE_H = 68784;
|
||||
public const uint BLADESTORM = 63784;
|
||||
public const uint INTERCEPT = 67540;
|
||||
public const uint ROLLING_THROW = 47115; //not implemented in the AI yet...
|
||||
|
||||
// Ambrose Boltspark && Eressea Dawnsinger || Mage
|
||||
public const uint FIREBALL = 66042;
|
||||
public const uint FIREBALL_H = 68310;
|
||||
public const uint BLAST_WAVE = 66044;
|
||||
public const uint BLAST_WAVE_H = 68312;
|
||||
public const uint HASTE = 66045;
|
||||
public const uint POLYMORPH = 66043;
|
||||
public const uint POLYMORPH_H = 68311;
|
||||
|
||||
// Colosos && Runok Wildmane || Shaman
|
||||
public const uint CHAIN_LIGHTNING = 67529;
|
||||
public const uint CHAIN_LIGHTNING_H = 68319;
|
||||
public const uint EARTH_SHIELD = 67530;
|
||||
public const uint HEALING_WAVE = 67528;
|
||||
public const uint HEALING_WAVE_H = 68318;
|
||||
public const uint HEX_OF_MENDING = 67534;
|
||||
|
||||
// Jaelyne Evensong && Zul'tore || Hunter
|
||||
public const uint DISENGAGE = 68340; //not implemented in the AI yet...
|
||||
public const uint LIGHTNING_ARROWS = 66083;
|
||||
public const uint MULTI_SHOT = 66081;
|
||||
public const uint SHOOT = 65868;
|
||||
public const uint SHOOT_H = 67988;
|
||||
|
||||
// Lana Stouthammer Evensong && Deathstalker Visceri || Rouge
|
||||
public const uint EVISCERATE = 67709;
|
||||
public const uint EVISCERATE_H = 68317;
|
||||
public const uint FAN_OF_KNIVES = 67706;
|
||||
public const uint POISON_BOTTLE = 67701;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class generic_vehicleAI_toc5 : npc_escortAI
|
||||
{
|
||||
public generic_vehicleAI_toc5(Creature creature) : base(creature)
|
||||
{
|
||||
Initialize();
|
||||
SetDespawnAtEnd(false);
|
||||
uiWaypointPath = 0;
|
||||
|
||||
instance = creature.GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiChargeTimer = 5000;
|
||||
uiShieldBreakerTimer = 8000;
|
||||
uiBuffTimer = RandomHelper.URand(30000, 60000);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public override void SetData(uint uiType, uint uiData)
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
case 1:
|
||||
AddWaypoint(0, 747.36f, 634.07f, 411.572f);
|
||||
AddWaypoint(1, 780.43f, 607.15f, 411.82f);
|
||||
AddWaypoint(2, 785.99f, 599.41f, 411.92f);
|
||||
AddWaypoint(3, 778.44f, 601.64f, 411.79f);
|
||||
uiWaypointPath = 1;
|
||||
break;
|
||||
case 2:
|
||||
AddWaypoint(0, 747.35f, 634.07f, 411.57f);
|
||||
AddWaypoint(1, 768.72f, 581.01f, 411.92f);
|
||||
AddWaypoint(2, 763.55f, 590.52f, 411.71f);
|
||||
uiWaypointPath = 2;
|
||||
break;
|
||||
case 3:
|
||||
AddWaypoint(0, 747.35f, 634.07f, 411.57f);
|
||||
AddWaypoint(1, 784.02f, 645.33f, 412.39f);
|
||||
AddWaypoint(2, 775.67f, 641.91f, 411.91f);
|
||||
uiWaypointPath = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
if (uiType <= 3)
|
||||
Start(false, true);
|
||||
}
|
||||
|
||||
public override void WaypointReached(uint waypointId)
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 2:
|
||||
if (uiWaypointPath == 3 || uiWaypointPath == 2)
|
||||
instance.SetData((uint)Data.DATA_MOVEMENT_DONE, instance.GetData((uint)Data.DATA_MOVEMENT_DONE) + 1);
|
||||
break;
|
||||
case 3:
|
||||
instance.SetData((uint)Data.DATA_MOVEMENT_DONE, instance.GetData((uint)Data.DATA_MOVEMENT_DONE) + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
DoCastSpellShield();
|
||||
}
|
||||
|
||||
void DoCastSpellShield()
|
||||
{
|
||||
for (byte i = 0; i < 3; ++i)
|
||||
DoCast(me, TrialOfChampionSpells.SHIELD, true);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint uiDiff)
|
||||
{
|
||||
base.UpdateAI(uiDiff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiBuffTimer <= uiDiff)
|
||||
{
|
||||
if (!me.HasAura(TrialOfChampionSpells.SHIELD))
|
||||
DoCastSpellShield();
|
||||
|
||||
uiBuffTimer = RandomHelper.URand(30000, 45000);
|
||||
}
|
||||
else
|
||||
uiBuffTimer -= uiDiff;
|
||||
|
||||
if (uiChargeTimer <= uiDiff)
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
if (!players.Empty())
|
||||
{
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player && !player.IsGameMaster() && me.IsInRange(player, 8.0f, 25.0f, false))
|
||||
{
|
||||
DoResetThreat();
|
||||
me.AddThreat(player, 1.0f);
|
||||
DoCast(player, TrialOfChampionSpells.CHARGE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
uiChargeTimer = 5000;
|
||||
}
|
||||
else
|
||||
uiChargeTimer -= uiDiff;
|
||||
|
||||
//dosen't work at all
|
||||
if (uiShieldBreakerTimer <= uiDiff)
|
||||
{
|
||||
Vehicle pVehicle = me.GetVehicleKit();
|
||||
if (!pVehicle)
|
||||
return;
|
||||
|
||||
Unit pPassenger = pVehicle.GetPassenger(0);
|
||||
if (pPassenger)
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
if (!players.Empty())
|
||||
{
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player && !player.IsGameMaster() && me.IsInRange(player, 10.0f, 30.0f, false))
|
||||
{
|
||||
pPassenger.CastSpell(player, TrialOfChampionSpells.SHIELD_BREAKER, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
uiShieldBreakerTimer = 7000;
|
||||
}
|
||||
else
|
||||
uiShieldBreakerTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
uint uiChargeTimer;
|
||||
uint uiShieldBreakerTimer;
|
||||
uint uiBuffTimer;
|
||||
|
||||
uint uiWaypointPath;
|
||||
}
|
||||
|
||||
abstract class boss_basic_toc5AI : ScriptedAI
|
||||
{
|
||||
public boss_basic_toc5AI(Creature creature) : base(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature.GetInstanceScript();
|
||||
|
||||
bDone = false;
|
||||
bHome = false;
|
||||
|
||||
uiPhase = 0;
|
||||
uiPhaseTimer = 0;
|
||||
|
||||
me.SetReactState(ReactStates.Passive);
|
||||
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.ImmuneToPc);
|
||||
}
|
||||
|
||||
public abstract void Initialize();
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public override void JustReachedHome()
|
||||
{
|
||||
base.JustReachedHome();
|
||||
|
||||
if (!bHome)
|
||||
return;
|
||||
|
||||
uiPhaseTimer = 15000;
|
||||
uiPhase = 1;
|
||||
|
||||
bHome = false;
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
instance.SetData((uint)Data.BOSS_GRAND_CHAMPIONS, (uint)EncounterState.Done);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!bDone && GrandChampionsOutVehicle(me))
|
||||
{
|
||||
bDone = true;
|
||||
|
||||
if (me.GetGUID() == instance.GetGuidData((uint)Data64.DATA_GRAND_CHAMPION_1))
|
||||
me.SetHomePosition(739.678f, 662.541f, 412.393f, 4.49f);
|
||||
else if (me.GetGUID() == instance.GetGuidData((uint)Data64.DATA_GRAND_CHAMPION_2))
|
||||
me.SetHomePosition(746.71f, 661.02f, 411.69f, 4.6f);
|
||||
else if (me.GetGUID() == instance.GetGuidData((uint)Data64.DATA_GRAND_CHAMPION_3))
|
||||
me.SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f);
|
||||
|
||||
EnterEvadeMode();
|
||||
bHome = true;
|
||||
}
|
||||
|
||||
if (uiPhaseTimer <= diff)
|
||||
{
|
||||
if (uiPhase == 1)
|
||||
{
|
||||
AggroAllPlayers(me);
|
||||
uiPhase = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
uiPhaseTimer -= diff;
|
||||
}
|
||||
|
||||
public bool InVehicle()
|
||||
{
|
||||
return !me.m_movementInfo.transport.guid.IsEmpty();
|
||||
}
|
||||
|
||||
void AggroAllPlayers(Creature temp)
|
||||
{
|
||||
var PlList = temp.GetMap().GetPlayers();
|
||||
|
||||
if (PlList.Empty())
|
||||
return;
|
||||
|
||||
foreach (var player in PlList)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
if (player.IsGameMaster())
|
||||
continue;
|
||||
|
||||
if (player.IsAlive())
|
||||
{
|
||||
temp.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.ImmuneToPc);
|
||||
temp.SetReactState(ReactStates.Aggressive);
|
||||
temp.SetInCombatWith(player);
|
||||
player.SetInCombatWith(temp);
|
||||
temp.AddThreat(player, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool GrandChampionsOutVehicle(Creature me)
|
||||
{
|
||||
InstanceScript instance = me.GetInstanceScript();
|
||||
|
||||
if (instance == null)
|
||||
return false;
|
||||
|
||||
Creature pGrandChampion1 = ObjectAccessor.GetCreature(me, instance.GetGuidData((uint)Data64.DATA_GRAND_CHAMPION_1));
|
||||
Creature pGrandChampion2 = ObjectAccessor.GetCreature(me, instance.GetGuidData((uint)Data64.DATA_GRAND_CHAMPION_2));
|
||||
Creature pGrandChampion3 = ObjectAccessor.GetCreature(me, instance.GetGuidData((uint)Data64.DATA_GRAND_CHAMPION_3));
|
||||
|
||||
if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
|
||||
{
|
||||
if (pGrandChampion1.m_movementInfo.transport.guid.IsEmpty() &&
|
||||
pGrandChampion2.m_movementInfo.transport.guid.IsEmpty() &&
|
||||
pGrandChampion3.m_movementInfo.transport.guid.IsEmpty())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public TaskScheduler NonCombatEvents = new TaskScheduler();
|
||||
|
||||
public InstanceScript instance;
|
||||
|
||||
public byte uiPhase;
|
||||
public uint uiPhaseTimer;
|
||||
|
||||
bool bDone;
|
||||
public bool bHome;
|
||||
}
|
||||
|
||||
[Script]
|
||||
// Marshal Jacob Alerius && Mokra the Skullcrusher || Warrior
|
||||
class boss_warrior_toc5 : boss_basic_toc5AI
|
||||
{
|
||||
public boss_warrior_toc5(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(20), task =>
|
||||
{
|
||||
DoCastVictim(TrialOfChampionSpells.BLADESTORM);
|
||||
task.Repeat(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(20));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(7), task =>
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
if (!players.Empty())
|
||||
{
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player && !player.IsGameMaster() && me.IsInRange(player, 8.0f, 25.0f, false))
|
||||
{
|
||||
DoResetThreat();
|
||||
me.AddThreat(player, 5.0f);
|
||||
DoCast(player, TrialOfChampionSpells.INTERCEPT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
task.Repeat(TimeSpan.FromSeconds(7));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
DoCastVictim(TrialOfChampionSpells.MORTAL_STRIKE);
|
||||
task.Repeat(TimeSpan.FromSeconds(8), TimeSpan.FromSeconds(12));
|
||||
});
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim() || InVehicle())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Script]
|
||||
// Ambrose Boltspark && Eressea Dawnsinger || Mage
|
||||
class boss_mage_toc5 : boss_basic_toc5AI
|
||||
{
|
||||
public boss_mage_toc5(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), task =>
|
||||
{
|
||||
DoCastVictim(TrialOfChampionSpells.FIREBALL);
|
||||
task.Repeat(TimeSpan.FromSeconds(5));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0);
|
||||
if (target)
|
||||
DoCast(target, TrialOfChampionSpells.POLYMORPH);
|
||||
task.Repeat(TimeSpan.FromSeconds(8));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
DoCastAOE(TrialOfChampionSpells.BLAST_WAVE, false);
|
||||
task.Repeat(TimeSpan.FromSeconds(13));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(22), task =>
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
|
||||
DoCast(me, TrialOfChampionSpells.HASTE);
|
||||
task.Repeat(TimeSpan.FromSeconds(22));
|
||||
});
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim() || InVehicle())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
// Colosos && Runok Wildmane || Shaman
|
||||
class boss_shaman_toc5 : boss_basic_toc5AI
|
||||
{
|
||||
public boss_shaman_toc5(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(16), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0);
|
||||
if (target)
|
||||
DoCast(target, TrialOfChampionSpells.CHAIN_LIGHTNING);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(16));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
bool bChance = RandomHelper.randChance(50);
|
||||
|
||||
if (!bChance)
|
||||
{
|
||||
Unit pFriend = DoSelectLowestHpFriendly(40);
|
||||
if (pFriend)
|
||||
DoCast(pFriend, TrialOfChampionSpells.HEALING_WAVE);
|
||||
}
|
||||
else
|
||||
DoCast(me, TrialOfChampionSpells.HEALING_WAVE);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(12));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(35), task =>
|
||||
{
|
||||
DoCast(me, TrialOfChampionSpells.EARTH_SHIELD);
|
||||
task.Repeat(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(35));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(20), TimeSpan.FromSeconds(25), task =>
|
||||
{
|
||||
DoCastVictim(TrialOfChampionSpells.HEX_OF_MENDING, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(20), TimeSpan.FromSeconds(25));
|
||||
});
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
DoCast(me, TrialOfChampionSpells.EARTH_SHIELD);
|
||||
DoCast(who, TrialOfChampionSpells.HEX_OF_MENDING);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim() || InVehicle())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
// Jaelyne Evensong && Zul'tore || Hunter
|
||||
class boss_hunter_toc5 : boss_basic_toc5AI
|
||||
{
|
||||
public boss_hunter_toc5(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(7), task =>
|
||||
{
|
||||
DoCastAOE(TrialOfChampionSpells.LIGHTNING_ARROWS, false);
|
||||
task.Repeat(TimeSpan.FromSeconds(7));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
ObjectGuid uiTargetGUID = ObjectGuid.Empty;
|
||||
Unit target = SelectTarget(SelectAggroTarget.Farthest, 0, 30.0f);
|
||||
if (target)
|
||||
{
|
||||
uiTargetGUID = target.GetGUID();
|
||||
DoCast(target, TrialOfChampionSpells.SHOOT);
|
||||
}
|
||||
|
||||
bool bShoot = true;
|
||||
task.Repeat(TimeSpan.FromSeconds(12));
|
||||
task.Schedule(TimeSpan.FromSeconds(3), task1 =>
|
||||
{
|
||||
if (bShoot)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
|
||||
Unit target1 = Global.ObjAccessor.GetUnit(me, uiTargetGUID);
|
||||
if (target1 && me.IsInRange(target1, 5.0f, 30.0f, false))
|
||||
{
|
||||
DoCast(target1, TrialOfChampionSpells.MULTI_SHOT);
|
||||
}
|
||||
else
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
if (!players.Empty())
|
||||
{
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player && !player.IsGameMaster() && me.IsInRange(player, 5.0f, 30.0f, false))
|
||||
{
|
||||
DoCast(player, TrialOfChampionSpells.MULTI_SHOT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bShoot = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim() || InVehicle())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
// Lana Stouthammer Evensong && Deathstalker Visceri || Rouge
|
||||
class boss_rouge_toc5 : boss_basic_toc5AI
|
||||
{
|
||||
public boss_rouge_toc5(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
|
||||
{
|
||||
DoCastVictim(TrialOfChampionSpells.EVISCERATE);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(8));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(14), task =>
|
||||
{
|
||||
DoCastAOE(TrialOfChampionSpells.FAN_OF_KNIVES, false);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(14));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(19), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0);
|
||||
if (target)
|
||||
DoCast(target, TrialOfChampionSpells.POISON_BOTTLE);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(19));
|
||||
});
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim() || !me.m_movementInfo.transport.guid.IsEmpty())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.GameMath;
|
||||
using Framework.IO;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Game.AI;
|
||||
|
||||
namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
|
||||
{
|
||||
[Script]
|
||||
class instance_trial_of_the_champion : InstanceMapScript
|
||||
{
|
||||
public instance_trial_of_the_champion() : base("instance_trial_of_the_champion", 650) { }
|
||||
|
||||
class instance_trial_of_the_champion_InstanceMapScript : InstanceScript
|
||||
{
|
||||
public instance_trial_of_the_champion_InstanceMapScript(Map map) : base(map)
|
||||
{
|
||||
SetHeaders("TC");
|
||||
uiMovementDone = 0;
|
||||
uiGrandChampionsDeaths = 0;
|
||||
uiArgentSoldierDeaths = 0;
|
||||
|
||||
//bDone = false;
|
||||
}
|
||||
|
||||
public override bool IsEncounterInProgress()
|
||||
{
|
||||
for (byte i = 0; i < 4; ++i)
|
||||
{
|
||||
if (m_auiEncounter[i] == EncounterState.InProgress)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnCreatureCreate(Creature creature)
|
||||
{
|
||||
var players = instance.GetPlayers();
|
||||
Team TeamInInstance = 0;
|
||||
|
||||
if (!players.Empty())
|
||||
{
|
||||
Player player = players.First();
|
||||
if (player)
|
||||
TeamInInstance = player.GetTeam();
|
||||
}
|
||||
|
||||
switch (creature.GetEntry())
|
||||
{
|
||||
// Champions
|
||||
case VehicleIds.MOKRA_SKILLCRUSHER_MOUNT:
|
||||
if (TeamInInstance == Team.Horde)
|
||||
creature.UpdateEntry(VehicleIds.MARSHAL_JACOB_ALERIUS_MOUNT);
|
||||
break;
|
||||
case VehicleIds.ERESSEA_DAWNSINGER_MOUNT:
|
||||
if (TeamInInstance == Team.Horde)
|
||||
creature.UpdateEntry(VehicleIds.AMBROSE_BOLTSPARK_MOUNT);
|
||||
break;
|
||||
case VehicleIds.RUNOK_WILDMANE_MOUNT:
|
||||
if (TeamInInstance == Team.Horde)
|
||||
creature.UpdateEntry(VehicleIds.COLOSOS_MOUNT);
|
||||
break;
|
||||
case VehicleIds.ZUL_TORE_MOUNT:
|
||||
if (TeamInInstance == Team.Horde)
|
||||
creature.UpdateEntry(VehicleIds.EVENSONG_MOUNT);
|
||||
break;
|
||||
case VehicleIds.DEATHSTALKER_VESCERI_MOUNT:
|
||||
if (TeamInInstance == Team.Horde)
|
||||
creature.UpdateEntry(VehicleIds.LANA_STOUTHAMMER_MOUNT);
|
||||
break;
|
||||
// Coliseum Announcer || Just NPC_JAEREN must be spawned.
|
||||
case CreatureIds.JAEREN:
|
||||
uiAnnouncerGUID = creature.GetGUID();
|
||||
if (TeamInInstance == Team.Alliance)
|
||||
creature.UpdateEntry(CreatureIds.ARELAS);
|
||||
break;
|
||||
case VehicleIds.ARGENT_WARHORSE:
|
||||
case VehicleIds.ARGENT_BATTLEWORG:
|
||||
VehicleList.Add(creature.GetGUID());
|
||||
break;
|
||||
case CreatureIds.EADRIC:
|
||||
case CreatureIds.PALETRESS:
|
||||
uiArgentChampionGUID = creature.GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGameObjectCreate(GameObject go)
|
||||
{
|
||||
switch (go.GetEntry())
|
||||
{
|
||||
case GameObjectIds.MAIN_GATE:
|
||||
uiMainGateGUID = go.GetGUID();
|
||||
break;
|
||||
case GameObjectIds.CHAMPIONS_LOOT:
|
||||
case GameObjectIds.CHAMPIONS_LOOT_H:
|
||||
uiChampionLootGUID = go.GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetData(uint uiType, uint uiData)
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
case (uint)Data.DATA_MOVEMENT_DONE:
|
||||
uiMovementDone = (ushort)uiData;
|
||||
if (uiMovementDone == 3)
|
||||
{
|
||||
Creature pAnnouncer = instance.GetCreature(uiAnnouncerGUID);
|
||||
if (pAnnouncer)
|
||||
pAnnouncer.GetAI().SetData((uint)Data.DATA_IN_POSITION, 0);
|
||||
}
|
||||
break;
|
||||
case (uint)Data.BOSS_GRAND_CHAMPIONS:
|
||||
m_auiEncounter[0] = (EncounterState)uiData;
|
||||
if (uiData == (uint)EncounterState.InProgress)
|
||||
{
|
||||
foreach (var guid in VehicleList)
|
||||
{
|
||||
Creature summon = instance.GetCreature(guid);
|
||||
if (summon)
|
||||
summon.RemoveFromWorld();
|
||||
}
|
||||
}
|
||||
else if (uiData == (uint)EncounterState.Done)
|
||||
{
|
||||
++uiGrandChampionsDeaths;
|
||||
if (uiGrandChampionsDeaths == 3)
|
||||
{
|
||||
Creature pAnnouncer = instance.GetCreature(uiAnnouncerGUID);
|
||||
if (pAnnouncer)
|
||||
{
|
||||
pAnnouncer.GetMotionMaster().MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
|
||||
pAnnouncer.SummonGameObject(instance.IsHeroic() ? GameObjectIds.CHAMPIONS_LOOT_H : GameObjectIds.CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, Quaternion.WAxis, 90000);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (uint)Data.DATA_ARGENT_SOLDIER_DEFEATED:
|
||||
uiArgentSoldierDeaths = (byte)uiData;
|
||||
if (uiArgentSoldierDeaths == 9)
|
||||
{
|
||||
Creature pBoss = instance.GetCreature(uiArgentChampionGUID);
|
||||
if (pBoss)
|
||||
{
|
||||
pBoss.GetMotionMaster().MovePoint(0, 746.88f, 618.74f, 411.06f);
|
||||
pBoss.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
|
||||
pBoss.SetReactState(ReactStates.Aggressive);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (uint)Data.BOSS_ARGENT_CHALLENGE_E:
|
||||
{
|
||||
m_auiEncounter[1] = (EncounterState)uiData;
|
||||
Creature pAnnouncer = instance.GetCreature(uiAnnouncerGUID);
|
||||
if (pAnnouncer)
|
||||
{
|
||||
pAnnouncer.GetMotionMaster().MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
|
||||
pAnnouncer.SummonGameObject(instance.IsHeroic() ? GameObjectIds.EADRIC_LOOT_H : GameObjectIds.EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, Quaternion.WAxis, 90000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (uint)Data.BOSS_ARGENT_CHALLENGE_P:
|
||||
{
|
||||
m_auiEncounter[2] = (EncounterState)uiData;
|
||||
Creature pAnnouncer = instance.GetCreature(uiAnnouncerGUID);
|
||||
if (pAnnouncer)
|
||||
{
|
||||
pAnnouncer.GetMotionMaster().MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
|
||||
pAnnouncer.SummonGameObject(instance.IsHeroic() ? GameObjectIds.PALETRESS_LOOT_H : GameObjectIds.PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, Quaternion.WAxis, 90000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (uiData == (uint)EncounterState.Done)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
public override uint GetData(uint uiData)
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
case (uint)Data.BOSS_GRAND_CHAMPIONS:
|
||||
return (uint)m_auiEncounter[0];
|
||||
case (uint)Data.BOSS_ARGENT_CHALLENGE_E:
|
||||
return (uint)m_auiEncounter[1];
|
||||
case (uint)Data.BOSS_ARGENT_CHALLENGE_P:
|
||||
return (uint)m_auiEncounter[2];
|
||||
case (uint)Data.BOSS_BLACK_KNIGHT:
|
||||
return (uint)m_auiEncounter[3];
|
||||
|
||||
case (uint)Data.DATA_MOVEMENT_DONE:
|
||||
return uiMovementDone;
|
||||
case (uint)Data.DATA_ARGENT_SOLDIER_DEFEATED:
|
||||
return uiArgentSoldierDeaths;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override ObjectGuid GetGuidData(uint uiData)
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
case (uint)Data64.DATA_ANNOUNCER:
|
||||
return uiAnnouncerGUID;
|
||||
case (uint)Data64.DATA_MAIN_GATE:
|
||||
return uiMainGateGUID;
|
||||
|
||||
case (uint)Data64.DATA_GRAND_CHAMPION_1:
|
||||
return uiGrandChampion1GUID;
|
||||
case (uint)Data64.DATA_GRAND_CHAMPION_2:
|
||||
return uiGrandChampion2GUID;
|
||||
case (uint)Data64.DATA_GRAND_CHAMPION_3:
|
||||
return uiGrandChampion3GUID;
|
||||
}
|
||||
|
||||
return ObjectGuid.Empty;
|
||||
}
|
||||
|
||||
public override void SetGuidData(uint uiType, ObjectGuid uiData)
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
case (uint)Data64.DATA_GRAND_CHAMPION_1:
|
||||
uiGrandChampion1GUID = uiData;
|
||||
break;
|
||||
case (uint)Data64.DATA_GRAND_CHAMPION_2:
|
||||
uiGrandChampion2GUID = uiData;
|
||||
break;
|
||||
case (uint)Data64.DATA_GRAND_CHAMPION_3:
|
||||
uiGrandChampion3GUID = uiData;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA();
|
||||
|
||||
string str_data = string.Format("T C {0} {1} {2} {3} {4} {5}", m_auiEncounter[0], m_auiEncounter[1], m_auiEncounter[2], m_auiEncounter[3], uiGrandChampionsDeaths, uiMovementDone);
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE();
|
||||
return str_data;
|
||||
}
|
||||
|
||||
public override void Load(string str)
|
||||
{
|
||||
if (str.IsEmpty())
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL();
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
StringArguments loadStream = new StringArguments(str);
|
||||
string dataHead = loadStream.NextString();
|
||||
|
||||
if (dataHead[0] == 'T' && dataHead[1] == 'C')
|
||||
{
|
||||
for (byte i = 0; i < 4; ++i)
|
||||
{
|
||||
m_auiEncounter[i] = (EncounterState)loadStream.NextUInt32();
|
||||
if (m_auiEncounter[i] == EncounterState.InProgress)
|
||||
m_auiEncounter[i] = EncounterState.NotStarted;
|
||||
|
||||
}
|
||||
|
||||
uiGrandChampionsDeaths = loadStream.NextUInt16();
|
||||
uiMovementDone = loadStream.NextUInt16();
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL();
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE();
|
||||
}
|
||||
|
||||
EncounterState[] m_auiEncounter = new EncounterState[4];
|
||||
|
||||
ushort uiMovementDone;
|
||||
ushort uiGrandChampionsDeaths;
|
||||
byte uiArgentSoldierDeaths;
|
||||
|
||||
ObjectGuid uiAnnouncerGUID;
|
||||
ObjectGuid uiMainGateGUID;
|
||||
//ObjectGuid uiGrandChampionVehicle1GUID;
|
||||
//ObjectGuid uiGrandChampionVehicle2GUID;
|
||||
//ObjectGuid uiGrandChampionVehicle3GUID;
|
||||
ObjectGuid uiGrandChampion1GUID;
|
||||
ObjectGuid uiGrandChampion2GUID;
|
||||
ObjectGuid uiGrandChampion3GUID;
|
||||
ObjectGuid uiChampionLootGUID;
|
||||
ObjectGuid uiArgentChampionGUID;
|
||||
|
||||
List<ObjectGuid> VehicleList = new List<ObjectGuid>();
|
||||
|
||||
//bool bDone;
|
||||
}
|
||||
|
||||
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||
{
|
||||
return new instance_trial_of_the_champion_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
public static T GetTrialOfTheChampionAI<T>(Creature creature) where T : CreatureAI
|
||||
{
|
||||
return GetInstanceAI<T>(creature, "instance_trial_of_the_champion");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,588 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
|
||||
{
|
||||
struct TrialOfTheChampionConst
|
||||
{
|
||||
public const uint SAY_INTRO_1 = 0;
|
||||
public const uint SAY_INTRO_2 = 1;
|
||||
public const uint SAY_INTRO_3 = 2;
|
||||
public const uint SAY_AGGRO = 3;
|
||||
public const uint SAY_PHASE_2 = 4;
|
||||
public const uint SAY_PHASE_3 = 5;
|
||||
public const uint SAY_KILL_PLAYER = 6;
|
||||
public const uint SAY_DEATH = 7;
|
||||
|
||||
public const string GOSSIP_START_EVENT1 = "I'm ready to start challenge.";
|
||||
public const string GOSSIP_START_EVENT2 = "I'm ready for the next challenge.";
|
||||
}
|
||||
|
||||
enum Data
|
||||
{
|
||||
BOSS_GRAND_CHAMPIONS,
|
||||
BOSS_ARGENT_CHALLENGE_E,
|
||||
BOSS_ARGENT_CHALLENGE_P,
|
||||
BOSS_BLACK_KNIGHT,
|
||||
DATA_MOVEMENT_DONE,
|
||||
DATA_LESSER_CHAMPIONS_DEFEATED,
|
||||
DATA_START,
|
||||
DATA_IN_POSITION,
|
||||
DATA_ARGENT_SOLDIER_DEFEATED
|
||||
};
|
||||
|
||||
enum Data64
|
||||
{
|
||||
DATA_ANNOUNCER,
|
||||
DATA_MAIN_GATE,
|
||||
|
||||
DATA_GRAND_CHAMPION_VEHICLE_1,
|
||||
DATA_GRAND_CHAMPION_VEHICLE_2,
|
||||
DATA_GRAND_CHAMPION_VEHICLE_3,
|
||||
|
||||
DATA_GRAND_CHAMPION_1,
|
||||
DATA_GRAND_CHAMPION_2,
|
||||
DATA_GRAND_CHAMPION_3
|
||||
};
|
||||
|
||||
struct CreatureIds
|
||||
{
|
||||
// Horde Champions
|
||||
public const uint MOKRA = 35572;
|
||||
public const uint ERESSEA = 35569;
|
||||
public const uint RUNOK = 35571;
|
||||
public const uint ZULTORE = 35570;
|
||||
public const uint VISCERI = 35617;
|
||||
|
||||
// Alliance Champions
|
||||
public const uint JACOB = 34705;
|
||||
public const uint AMBROSE = 34702;
|
||||
public const uint COLOSOS = 34701;
|
||||
public const uint JAELYNE = 34657;
|
||||
public const uint LANA = 34703;
|
||||
|
||||
public const uint EADRIC = 35119;
|
||||
public const uint PALETRESS = 34928;
|
||||
|
||||
public const uint ARGENT_LIGHWIELDER = 35309;
|
||||
public const uint ARGENT_MONK = 35305;
|
||||
public const uint PRIESTESS = 35307;
|
||||
|
||||
public const uint BLACK_KNIGHT = 35451;
|
||||
|
||||
public const uint RISEN_JAEREN = 35545;
|
||||
public const uint RISEN_ARELAS = 35564;
|
||||
|
||||
public const uint JAEREN = 35004;
|
||||
public const uint ARELAS = 35005;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
public const uint MAIN_GATE = 195647;
|
||||
|
||||
public const uint CHAMPIONS_LOOT = 195709;
|
||||
public const uint CHAMPIONS_LOOT_H = 195710;
|
||||
|
||||
public const uint EADRIC_LOOT = 195374;
|
||||
public const uint EADRIC_LOOT_H = 195375;
|
||||
|
||||
public const uint PALETRESS_LOOT = 195323;
|
||||
public const uint PALETRESS_LOOT_H = 195324;
|
||||
}
|
||||
|
||||
struct VehicleIds
|
||||
{
|
||||
//Grand Champions Alliance Vehicles
|
||||
public const uint MARSHAL_JACOB_ALERIUS_MOUNT = 35637;
|
||||
public const uint AMBROSE_BOLTSPARK_MOUNT = 35633;
|
||||
public const uint COLOSOS_MOUNT = 35768;
|
||||
public const uint EVENSONG_MOUNT = 34658;
|
||||
public const uint LANA_STOUTHAMMER_MOUNT = 35636;
|
||||
//Faction Champions (ALLIANCE)
|
||||
public const uint DARNASSIA_NIGHTSABER = 33319;
|
||||
public const uint EXODAR_ELEKK = 33318;
|
||||
public const uint STORMWIND_STEED = 33217;
|
||||
public const uint GNOMEREGAN_MECHANOSTRIDER = 33317;
|
||||
public const uint IRONFORGE_RAM = 33316;
|
||||
//Grand Champions Horde Vehicles
|
||||
public const uint MOKRA_SKILLCRUSHER_MOUNT = 35638;
|
||||
public const uint ERESSEA_DAWNSINGER_MOUNT = 35635;
|
||||
public const uint RUNOK_WILDMANE_MOUNT = 35640;
|
||||
public const uint ZUL_TORE_MOUNT = 35641;
|
||||
public const uint DEATHSTALKER_VESCERI_MOUNT = 35634;
|
||||
//Faction Champions (HORDE)
|
||||
public const uint FORSAKE_WARHORSE = 33324;
|
||||
public const uint THUNDER_BLUFF_KODO = 33322;
|
||||
public const uint ORGRIMMAR_WOLF = 33320;
|
||||
public const uint SILVERMOON_HAWKSTRIDER = 33323;
|
||||
public const uint DARKSPEAR_RAPTOR = 33321;
|
||||
|
||||
public const uint ARGENT_WARHORSE = 35644;
|
||||
public const uint ARGENT_BATTLEWORG = 36558;
|
||||
|
||||
public const uint BLACK_KNIGHT = 35491;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_announcer_toc5 : CreatureScript
|
||||
{
|
||||
public npc_announcer_toc5() : base("npc_announcer_toc5") { }
|
||||
|
||||
class npc_announcer_toc5AI : ScriptedAI
|
||||
{
|
||||
public npc_announcer_toc5AI(Creature creature) : base(creature)
|
||||
{
|
||||
instance = creature.GetInstanceScript();
|
||||
|
||||
uiSummonTimes = 0;
|
||||
uiLesserChampions = 0;
|
||||
|
||||
uiFirstBoss = 0;
|
||||
uiSecondBoss = 0;
|
||||
uiThirdBoss = 0;
|
||||
|
||||
uiArgentChampion = 0;
|
||||
|
||||
uiPhase = 0;
|
||||
uiTimer = 0;
|
||||
|
||||
me.SetReactState(ReactStates.Passive);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
|
||||
me.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
|
||||
|
||||
SetGrandChampionsForEncounter();
|
||||
SetArgentChampion();
|
||||
}
|
||||
|
||||
void NextStep(uint uiTimerStep, bool bNextStep = true, byte uiPhaseStep = 0)
|
||||
{
|
||||
uiTimer = uiTimerStep;
|
||||
if (bNextStep)
|
||||
++uiPhase;
|
||||
else
|
||||
uiPhase = uiPhaseStep;
|
||||
}
|
||||
|
||||
public override void SetData(uint uiType, uint uiData)
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
case (uint)Data.DATA_START:
|
||||
DoSummonGrandChampion(uiFirstBoss);
|
||||
NextStep(10000, false, 1);
|
||||
break;
|
||||
case (uint)Data.DATA_IN_POSITION: //movement EncounterState.Done.
|
||||
me.GetMotionMaster().MovePoint(1, 735.81f, 661.92f, 412.39f);
|
||||
GameObject go = ObjectAccessor.GetGameObject(me, instance.GetGuidData((uint)Data64.DATA_MAIN_GATE));
|
||||
if (go)
|
||||
instance.HandleGameObject(go.GetGUID(), false);
|
||||
NextStep(10000, false, 3);
|
||||
break;
|
||||
case (uint)Data.DATA_LESSER_CHAMPIONS_DEFEATED:
|
||||
{
|
||||
++uiLesserChampions;
|
||||
List<ObjectGuid> TempList = new List<ObjectGuid>();
|
||||
if (uiLesserChampions == 3 || uiLesserChampions == 6)
|
||||
{
|
||||
switch (uiLesserChampions)
|
||||
{
|
||||
case 3:
|
||||
TempList = Champion2List;
|
||||
break;
|
||||
case 6:
|
||||
TempList = Champion3List;
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var guid in TempList)
|
||||
{
|
||||
Creature summon = ObjectAccessor.GetCreature(me, guid);
|
||||
if (summon)
|
||||
AggroAllPlayers(summon);
|
||||
}
|
||||
}
|
||||
else if (uiLesserChampions == 9)
|
||||
StartGrandChampionsAttack();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StartGrandChampionsAttack()
|
||||
{
|
||||
Creature pGrandChampion1 = ObjectAccessor.GetCreature(me, uiVehicle1GUID);
|
||||
Creature pGrandChampion2 = ObjectAccessor.GetCreature(me, uiVehicle2GUID);
|
||||
Creature pGrandChampion3 = ObjectAccessor.GetCreature(me, uiVehicle3GUID);
|
||||
|
||||
if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
|
||||
{
|
||||
AggroAllPlayers(pGrandChampion1);
|
||||
AggroAllPlayers(pGrandChampion2);
|
||||
AggroAllPlayers(pGrandChampion3);
|
||||
}
|
||||
}
|
||||
|
||||
public override void MovementInform(MovementGeneratorType uiType, uint uiPointId)
|
||||
{
|
||||
if (uiType != MovementGeneratorType.Point)
|
||||
return;
|
||||
|
||||
if (uiPointId == 1)
|
||||
me.SetFacingTo(4.714f);
|
||||
}
|
||||
|
||||
void DoSummonGrandChampion(uint uiBoss)
|
||||
{
|
||||
++uiSummonTimes;
|
||||
uint VEHICLE_TO_SUMMON1 = 0;
|
||||
uint VEHICLE_TO_SUMMON2 = 0;
|
||||
switch (uiBoss)
|
||||
{
|
||||
case 0:
|
||||
VEHICLE_TO_SUMMON1 = VehicleIds.MOKRA_SKILLCRUSHER_MOUNT;
|
||||
VEHICLE_TO_SUMMON2 = VehicleIds.ORGRIMMAR_WOLF;
|
||||
break;
|
||||
case 1:
|
||||
VEHICLE_TO_SUMMON1 = VehicleIds.ERESSEA_DAWNSINGER_MOUNT;
|
||||
VEHICLE_TO_SUMMON2 = VehicleIds.SILVERMOON_HAWKSTRIDER;
|
||||
break;
|
||||
case 2:
|
||||
VEHICLE_TO_SUMMON1 = VehicleIds.RUNOK_WILDMANE_MOUNT;
|
||||
VEHICLE_TO_SUMMON2 = VehicleIds.THUNDER_BLUFF_KODO;
|
||||
break;
|
||||
case 3:
|
||||
VEHICLE_TO_SUMMON1 = VehicleIds.ZUL_TORE_MOUNT;
|
||||
VEHICLE_TO_SUMMON2 = VehicleIds.DARKSPEAR_RAPTOR;
|
||||
break;
|
||||
case 4:
|
||||
VEHICLE_TO_SUMMON1 = VehicleIds.DEATHSTALKER_VESCERI_MOUNT;
|
||||
VEHICLE_TO_SUMMON2 = VehicleIds.FORSAKE_WARHORSE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
Creature pBoss = me.SummonCreature(VEHICLE_TO_SUMMON1, SpawnPosition);
|
||||
if (pBoss)
|
||||
{
|
||||
ObjectGuid uiGrandChampionBoss = ObjectGuid.Empty;
|
||||
Vehicle pVehicle = pBoss.GetVehicleKit();
|
||||
if (pVehicle)
|
||||
{
|
||||
Unit unit = pVehicle.GetPassenger(0);
|
||||
if (unit)
|
||||
uiGrandChampionBoss = unit.GetGUID();
|
||||
}
|
||||
|
||||
switch (uiSummonTimes)
|
||||
{
|
||||
case 1:
|
||||
uiVehicle1GUID = pBoss.GetGUID();
|
||||
instance.SetGuidData((uint)Data64.DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID);
|
||||
instance.SetGuidData((uint)Data64.DATA_GRAND_CHAMPION_1, uiGrandChampionBoss);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
uiVehicle2GUID = pBoss.GetGUID();
|
||||
instance.SetGuidData((uint)Data64.DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID);
|
||||
instance.SetGuidData((uint)Data64.DATA_GRAND_CHAMPION_2, uiGrandChampionBoss);
|
||||
break;
|
||||
case 3:
|
||||
uiVehicle3GUID = pBoss.GetGUID();
|
||||
instance.SetGuidData((uint)Data64.DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID);
|
||||
instance.SetGuidData((uint)Data64.DATA_GRAND_CHAMPION_3, uiGrandChampionBoss);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pBoss.GetAI().SetData(uiSummonTimes, 0);
|
||||
|
||||
for (byte i = 0; i < 3; ++i)
|
||||
{
|
||||
Creature pAdd = me.SummonCreature(VEHICLE_TO_SUMMON2, SpawnPosition, TempSummonType.CorpseDespawn);
|
||||
if (pAdd)
|
||||
{
|
||||
switch (uiSummonTimes)
|
||||
{
|
||||
case 1:
|
||||
Champion1List.Add(pAdd.GetGUID());
|
||||
break;
|
||||
case 2:
|
||||
Champion2List.Add(pAdd.GetGUID());
|
||||
break;
|
||||
case 3:
|
||||
Champion3List.Add(pAdd.GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
pAdd.GetMotionMaster().MoveFollow(pBoss, 2.0f, MathFunctions.PI);
|
||||
break;
|
||||
case 1:
|
||||
pAdd.GetMotionMaster().MoveFollow(pBoss, 2.0f, MathFunctions.PI / 2);
|
||||
break;
|
||||
case 2:
|
||||
pAdd.GetMotionMaster().MoveFollow(pBoss, 2.0f, MathFunctions.PI / 2 + MathFunctions.PI);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoStartArgentChampionEncounter()
|
||||
{
|
||||
me.GetMotionMaster().MovePoint(1, 735.81f, 661.92f, 412.39f);
|
||||
|
||||
if (me.SummonCreature(uiArgentChampion, SpawnPosition))
|
||||
{
|
||||
for (byte i = 0; i < 3; ++i)
|
||||
{
|
||||
Creature lightwielderTrash = me.SummonCreature(CreatureIds.ARGENT_LIGHWIELDER, SpawnPosition);
|
||||
if (lightwielderTrash)
|
||||
lightwielderTrash.GetAI().SetData(i, 0);
|
||||
|
||||
Creature monkTrash = me.SummonCreature(CreatureIds.ARGENT_MONK, SpawnPosition);
|
||||
if (monkTrash)
|
||||
monkTrash.GetAI().SetData(i, 0);
|
||||
|
||||
Creature priestessTrash = me.SummonCreature(CreatureIds.PRIESTESS, SpawnPosition);
|
||||
if (priestessTrash)
|
||||
priestessTrash.GetAI().SetData(i, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetGrandChampionsForEncounter()
|
||||
{
|
||||
uiFirstBoss = RandomHelper.URand(0, 4);
|
||||
|
||||
while (uiSecondBoss == uiFirstBoss || uiThirdBoss == uiFirstBoss || uiThirdBoss == uiSecondBoss)
|
||||
{
|
||||
uiSecondBoss = RandomHelper.URand(0, 4);
|
||||
uiThirdBoss = RandomHelper.URand(0, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void SetArgentChampion()
|
||||
{
|
||||
byte uiTempBoss = (byte)RandomHelper.URand(0, 1);
|
||||
|
||||
switch (uiTempBoss)
|
||||
{
|
||||
case 0:
|
||||
uiArgentChampion = CreatureIds.EADRIC;
|
||||
break;
|
||||
case 1:
|
||||
uiArgentChampion = CreatureIds.PALETRESS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartEncounter()
|
||||
{
|
||||
me.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
|
||||
|
||||
if (instance.GetData((uint)Data.BOSS_BLACK_KNIGHT) == (uint)EncounterState.NotStarted)
|
||||
{
|
||||
if (instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_E) == (uint)EncounterState.NotStarted && instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_P) == (uint)EncounterState.NotStarted)
|
||||
{
|
||||
if (instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.NotStarted)
|
||||
SetData((uint)Data.DATA_START, 0);
|
||||
|
||||
if (instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.Done)
|
||||
DoStartArgentChampionEncounter();
|
||||
}
|
||||
|
||||
if ((instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.Done &&
|
||||
instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_E) == (uint)EncounterState.Done) ||
|
||||
instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_P) == (uint)EncounterState.Done)
|
||||
me.SummonCreature(VehicleIds.BLACK_KNIGHT, 769.834f, 651.915f, 447.035f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void AggroAllPlayers(Creature temp)
|
||||
{
|
||||
var PlList = me.GetMap().GetPlayers();
|
||||
|
||||
if (PlList.Empty())
|
||||
return;
|
||||
|
||||
foreach (var player in PlList)
|
||||
{
|
||||
if (player.IsGameMaster())
|
||||
continue;
|
||||
|
||||
if (player.IsAlive())
|
||||
{
|
||||
temp.SetHomePosition(me.GetPositionX(), me.GetPositionY(), me.GetPositionZ(), me.GetOrientation());
|
||||
temp.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
|
||||
temp.SetReactState(ReactStates.Aggressive);
|
||||
temp.SetInCombatWith(player);
|
||||
player.SetInCombatWith(temp);
|
||||
temp.AddThreat(player, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (uiTimer <= diff)
|
||||
{
|
||||
switch (uiPhase)
|
||||
{
|
||||
case 1:
|
||||
DoSummonGrandChampion(uiSecondBoss);
|
||||
NextStep(10000, true);
|
||||
break;
|
||||
case 2:
|
||||
DoSummonGrandChampion(uiThirdBoss);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 3:
|
||||
if (!Champion1List.Empty())
|
||||
{
|
||||
foreach (var guid in Champion1List)
|
||||
{
|
||||
Creature summon = ObjectAccessor.GetCreature(me, guid);
|
||||
if (summon)
|
||||
AggroAllPlayers(summon);
|
||||
}
|
||||
NextStep(0, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
uiTimer -= diff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
if (instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.NotStarted)
|
||||
{
|
||||
summon.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
|
||||
summon.SetReactState(ReactStates.Passive);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SummonedCreatureDespawn(Creature summon)
|
||||
{
|
||||
switch (summon.GetEntry())
|
||||
{
|
||||
case VehicleIds.DARNASSIA_NIGHTSABER:
|
||||
case VehicleIds.EXODAR_ELEKK:
|
||||
case VehicleIds.STORMWIND_STEED:
|
||||
case VehicleIds.GNOMEREGAN_MECHANOSTRIDER:
|
||||
case VehicleIds.IRONFORGE_RAM:
|
||||
case VehicleIds.FORSAKE_WARHORSE:
|
||||
case VehicleIds.THUNDER_BLUFF_KODO:
|
||||
case VehicleIds.ORGRIMMAR_WOLF:
|
||||
case VehicleIds.SILVERMOON_HAWKSTRIDER:
|
||||
case VehicleIds.DARKSPEAR_RAPTOR:
|
||||
SetData((uint)Data.DATA_LESSER_CHAMPIONS_DEFEATED, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
byte uiSummonTimes;
|
||||
byte uiLesserChampions;
|
||||
|
||||
uint uiArgentChampion;
|
||||
|
||||
uint uiFirstBoss;
|
||||
uint uiSecondBoss;
|
||||
uint uiThirdBoss;
|
||||
|
||||
uint uiPhase;
|
||||
uint uiTimer;
|
||||
|
||||
ObjectGuid uiVehicle1GUID;
|
||||
ObjectGuid uiVehicle2GUID;
|
||||
ObjectGuid uiVehicle3GUID;
|
||||
|
||||
List<ObjectGuid> Champion1List = new List<ObjectGuid>();
|
||||
List<ObjectGuid> Champion2List = new List<ObjectGuid>();
|
||||
List<ObjectGuid> Champion3List = new List<ObjectGuid>();
|
||||
|
||||
Position SpawnPosition = new Position(746.261f, 657.401f, 411.681f, 4.65f);
|
||||
}
|
||||
|
||||
public override bool OnGossipHello(Player player, Creature creature)
|
||||
{
|
||||
InstanceScript instance = creature.GetInstanceScript();
|
||||
|
||||
if (instance != null &&
|
||||
((instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.Done &&
|
||||
instance.GetData((uint)Data.BOSS_BLACK_KNIGHT) == (uint)EncounterState.Done &&
|
||||
instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_E) == (uint)EncounterState.Done) ||
|
||||
instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_P) == (uint)EncounterState.Done))
|
||||
return false;
|
||||
|
||||
if (instance != null &&
|
||||
instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.NotStarted &&
|
||||
instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_E) == (uint)EncounterState.NotStarted &&
|
||||
instance.GetData((uint)Data.BOSS_ARGENT_CHALLENGE_P) == (uint)EncounterState.NotStarted &&
|
||||
instance.GetData((uint)Data.BOSS_BLACK_KNIGHT) == (uint)EncounterState.NotStarted)
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, TrialOfTheChampionConst.GOSSIP_START_EVENT1, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
else if (instance != null)
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, TrialOfTheChampionConst.GOSSIP_START_EVENT2, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
|
||||
player.SEND_GOSSIP_MENU(player.GetGossipTextId(creature), creature.GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnGossipSelect(Player player, Creature creature, uint sender, uint action)
|
||||
{
|
||||
player.PlayerTalkClass.ClearMenus();
|
||||
if (action == eTradeskill.GossipActionInfoDef + 1)
|
||||
{
|
||||
player.CLOSE_GOSSIP_MENU();
|
||||
((npc_announcer_toc5AI)creature.GetAI()).StartEncounter();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return instance_trial_of_the_champion.GetTrialOfTheChampionAI<npc_announcer_toc5AI>(creature);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,487 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
using Game.Spells;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
|
||||
{
|
||||
struct Jaraxxus
|
||||
{
|
||||
public const uint SayIntro = 0;
|
||||
public const uint SayAggro = 1;
|
||||
public const uint EmoteLegionFlame = 2;
|
||||
public const uint EmoteNetherPortal = 3;
|
||||
public const uint SayMistressOfPain = 4;
|
||||
public const uint EmoteIncinerate = 5;
|
||||
public const uint SayIncinerate = 6;
|
||||
public const uint EmoteInfernalEruption = 7;
|
||||
public const uint SayInfernalEruption = 8;
|
||||
public const uint SayKillPlayer = 9;
|
||||
public const uint SayDeath = 10;
|
||||
public const uint SayBerserk = 11;
|
||||
|
||||
public const uint NpcLegionFlame = 34784;
|
||||
public const uint NpcInfernalVolcano = 34813;
|
||||
public const uint NpcFelInfernal = 34815; // Immune To All Cc On Heroic (Stuns; Banish; Interrupt; Etc)
|
||||
public const uint NpcNetherPortal = 34825;
|
||||
public const uint NpcMistressOfPain = 34826;
|
||||
|
||||
public const uint SpellLegionFlame = 66197; // Player Should Run Away From Raid Because He Triggers Legion Flame
|
||||
public const uint SpellLegionFlameEffect = 66201; // Used By Trigger Npc
|
||||
public const uint SpellNetherPower = 66228; // +20% Of Spell Damage Per Stack; Stackable Up To 5/10 Times; Must Be Dispelled/Stealed
|
||||
public const uint SpellFelLighting = 66528; // Jumps To Nearby Targets
|
||||
public const uint SpellFelFireball = 66532; // Does Heavy Damage To The Tank; Interruptable
|
||||
public const uint SpellIncinerateFlesh = 66237; // Target Must Be Healed Or Will Trigger Burning Inferno
|
||||
public const uint SpellBurningInferno = 66242; // Triggered By Incinerate Flesh
|
||||
public const uint SpellInfernalEruption = 66258; // Summons Infernal Volcano
|
||||
public const uint SpellInfernalEruptionEffect = 66252; // Summons Felflame Infernal (3 At Normal And Inifinity At Heroic)
|
||||
public const uint SpellNetherPortal = 66269; // Summons Nether Portal
|
||||
public const uint SpellNetherPortalEffect = 66263; // Summons Mistress Of Pain (1 At Normal And Infinity At Heroic)
|
||||
|
||||
public const uint SpellBerserk = 64238; // Unused
|
||||
|
||||
// Mistress Of Pain Spells
|
||||
public const uint SpellShivanSlash = 67098;
|
||||
public const uint SpellSpinningStrike = 66283;
|
||||
public const uint SpellMistressKiss = 66336;
|
||||
public const uint SpellFelInferno = 67047;
|
||||
public const uint SpellFelStreak = 66494;
|
||||
public const int SpellLordHittin = 66326; // Special Effect Preventing More Specific Spells Be Cast On The Same Player Within 10 Seconds
|
||||
public const uint SpellMistressKissDamageSilence = 66359;
|
||||
|
||||
// Lord Jaraxxus
|
||||
public const uint EventFelFireball = 1;
|
||||
public const uint EventFelLightning = 2;
|
||||
public const uint EventIncinerateFlesh = 3;
|
||||
public const uint EventNetherPower = 4;
|
||||
public const uint EventLegionFlame = 5;
|
||||
public const uint EventSummonoNetherPortal = 6;
|
||||
public const uint EventSummonInfernalEruption = 7;
|
||||
|
||||
// Mistress Of Pain
|
||||
public const uint EventShivanSlash = 8;
|
||||
public const uint EventSpinningStrike = 9;
|
||||
public const uint EventMistressKiss = 10;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class boss_jaraxxus : BossAI
|
||||
{
|
||||
public boss_jaraxxus(Creature creature) : base(creature, DataTypes.BossJaraxxus) { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_Reset();
|
||||
_events.ScheduleEvent(Jaraxxus.EventFelFireball, 5 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Jaraxxus.EventFelLightning, RandomHelper.URand(10 * Time.InMilliseconds, 15 * Time.InMilliseconds));
|
||||
_events.ScheduleEvent(Jaraxxus.EventIncinerateFlesh, RandomHelper.URand(20 * Time.InMilliseconds, 25 * Time.InMilliseconds));
|
||||
_events.ScheduleEvent(Jaraxxus.EventNetherPower, 40 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Jaraxxus.EventLegionFlame, 30 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Jaraxxus.EventSummonoNetherPortal, 20 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Jaraxxus.EventSummonInfernalEruption, 80 * Time.InMilliseconds);
|
||||
}
|
||||
|
||||
public override void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance.SetBossState(DataTypes.BossJaraxxus, EncounterState.Fail);
|
||||
DoCast(me, Spells.JaraxxusChains);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit who)
|
||||
{
|
||||
if (who.IsTypeId(TypeId.Player))
|
||||
{
|
||||
Talk(Jaraxxus.SayKillPlayer);
|
||||
instance.SetData(DataTypes.TributeToImmortalityEligible, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(Jaraxxus.SayDeath);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(Jaraxxus.SayAggro);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_events.ExecuteEvents(eventId =>
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case Jaraxxus.EventFelFireball:
|
||||
DoCastVictim(Jaraxxus.SpellFelFireball);
|
||||
_events.ScheduleEvent(Jaraxxus.EventFelFireball, RandomHelper.URand(10 * Time.InMilliseconds, 15 * Time.InMilliseconds));
|
||||
return;
|
||||
case Jaraxxus.EventFelLightning:
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true, -Jaraxxus.SpellLordHittin);
|
||||
if (target)
|
||||
DoCast(target, Jaraxxus.SpellFelLighting);
|
||||
_events.ScheduleEvent(Jaraxxus.EventFelLightning, RandomHelper.URand(10 * Time.InMilliseconds, 15 * Time.InMilliseconds));
|
||||
return;
|
||||
}
|
||||
case Jaraxxus.EventIncinerateFlesh:
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 1, 0.0f, true, -Jaraxxus.SpellLordHittin);
|
||||
if (target)
|
||||
{
|
||||
Talk(Jaraxxus.EmoteIncinerate, target);
|
||||
Talk(Jaraxxus.SayIncinerate);
|
||||
DoCast(target, Jaraxxus.SpellInfernalEruption);
|
||||
}
|
||||
_events.ScheduleEvent(Jaraxxus.EventIncinerateFlesh, RandomHelper.URand(20 * Time.InMilliseconds, 25 * Time.InMilliseconds));
|
||||
return;
|
||||
}
|
||||
case Jaraxxus.EventNetherPower:
|
||||
me.CastCustomSpell(Jaraxxus.SpellNetherPower, SpellValueMod.AuraStack, RaidMode(5, 10, 5, 10), me, true);
|
||||
_events.ScheduleEvent(Jaraxxus.EventNetherPower, 40 * Time.InMilliseconds);
|
||||
return;
|
||||
case Jaraxxus.EventLegionFlame:
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 1, 0.0f, true, -Jaraxxus.SpellLordHittin);
|
||||
if (target)
|
||||
{
|
||||
Talk(Jaraxxus.EmoteLegionFlame, target);
|
||||
DoCast(target, Jaraxxus.SpellLegionFlame);
|
||||
}
|
||||
_events.ScheduleEvent(Jaraxxus.EventLegionFlame, 30 * Time.InMilliseconds);
|
||||
return;
|
||||
}
|
||||
case Jaraxxus.EventSummonoNetherPortal:
|
||||
Talk(Jaraxxus.EmoteNetherPortal);
|
||||
Talk(Jaraxxus.SayMistressOfPain);
|
||||
DoCast(Jaraxxus.SpellNetherPortal);
|
||||
_events.ScheduleEvent(Jaraxxus.EventSummonoNetherPortal, 2 * Time.Minute * Time.InMilliseconds);
|
||||
return;
|
||||
case Jaraxxus.EventSummonInfernalEruption:
|
||||
Talk(Jaraxxus.EmoteInfernalEruption);
|
||||
Talk(Jaraxxus.SayInfernalEruption);
|
||||
DoCast(Jaraxxus.SpellInfernalEruption);
|
||||
_events.ScheduleEvent(Jaraxxus.EventSummonInfernalEruption, 2 * Time.Minute * Time.InMilliseconds);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_legion_flame : ScriptedAI
|
||||
{
|
||||
public npc_legion_flame(Creature creature) : base(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
_instance = creature.GetInstanceScript();
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
|
||||
me.SetInCombatWithZone();
|
||||
DoCast(Jaraxxus.SpellLegionFlameEffect);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
UpdateVictim();
|
||||
if (_instance.GetBossState(DataTypes.BossJaraxxus) != EncounterState.InProgress)
|
||||
me.DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
InstanceScript _instance;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_infernal_volcano : ScriptedAI
|
||||
{
|
||||
public npc_infernal_volcano(Creature creature) : base(creature)
|
||||
{
|
||||
_summons = new SummonList(me);
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
me.SetReactState(ReactStates.Passive);
|
||||
|
||||
if (!IsHeroic())
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
|
||||
else
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
|
||||
|
||||
_summons.DespawnAll();
|
||||
}
|
||||
|
||||
public override void IsSummonedBy(Unit summoner)
|
||||
{
|
||||
DoCast(Jaraxxus.SpellInfernalEruptionEffect);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
_summons.Summon(summoned);
|
||||
// makes immediate corpse despawn of summoned Felflame Infernals
|
||||
summoned.SetCorpseDelay(0);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
// used to despawn corpse immediately
|
||||
me.DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff) { }
|
||||
|
||||
SummonList _summons;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_fel_infernal : ScriptedAI
|
||||
{
|
||||
public npc_fel_infernal(Creature creature) : base(creature)
|
||||
{
|
||||
_instance = creature.GetInstanceScript();
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_felStreakTimer = 30 * Time.InMilliseconds;
|
||||
me.SetInCombatWithZone();
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (_instance.GetBossState(DataTypes.BossJaraxxus) != EncounterState.InProgress)
|
||||
{
|
||||
me.DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (_felStreakTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
DoCast(target, Jaraxxus.SpellFelStreak);
|
||||
_felStreakTimer = 30 * Time.InMilliseconds;
|
||||
}
|
||||
else
|
||||
_felStreakTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
uint _felStreakTimer;
|
||||
InstanceScript _instance;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_nether_portal : ScriptedAI
|
||||
{
|
||||
public npc_nether_portal(Creature creature) : base(creature)
|
||||
{
|
||||
_summons = new SummonList(me);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
me.SetReactState(ReactStates.Passive);
|
||||
|
||||
if (!IsHeroic())
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
|
||||
else
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
|
||||
|
||||
_summons.DespawnAll();
|
||||
}
|
||||
|
||||
public override void IsSummonedBy(Unit summoner)
|
||||
{
|
||||
DoCast(Jaraxxus.SpellNetherPortalEffect);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
_summons.Summon(summoned);
|
||||
// makes immediate corpse despawn of summoned Mistress of Pain
|
||||
summoned.SetCorpseDelay(0);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
// used to despawn corpse immediately
|
||||
me.DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff) { }
|
||||
|
||||
SummonList _summons;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_mistress_of_pain : ScriptedAI
|
||||
{
|
||||
public npc_mistress_of_pain(Creature creature) : base(creature)
|
||||
{
|
||||
_instance = creature.GetInstanceScript();
|
||||
_instance.SetData(DataTypes.MistressOfPainCount, DataTypes.Increase);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_events.ScheduleEvent(Jaraxxus.EventShivanSlash, 30 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Jaraxxus.EventSpinningStrike, 30 * Time.InMilliseconds);
|
||||
if (IsHeroic())
|
||||
_events.ScheduleEvent(Jaraxxus.EventMistressKiss, 15 * Time.InMilliseconds);
|
||||
me.SetInCombatWithZone();
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
_instance.SetData(DataTypes.MistressOfPainCount, DataTypes.Decrease);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (_instance.GetBossState(DataTypes.BossJaraxxus) != EncounterState.InProgress)
|
||||
{
|
||||
me.DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_events.ExecuteEvents(eventId =>
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case Jaraxxus.EventShivanSlash:
|
||||
DoCastVictim(Jaraxxus.SpellShivanSlash);
|
||||
_events.ScheduleEvent(Jaraxxus.EventShivanSlash, 30 * Time.InMilliseconds);
|
||||
return;
|
||||
case Jaraxxus.EventSpinningStrike:
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
DoCast(target, Jaraxxus.SpellSpinningStrike);
|
||||
_events.ScheduleEvent(Jaraxxus.EventSpinningStrike, 30 * Time.InMilliseconds);
|
||||
return;
|
||||
case Jaraxxus.EventMistressKiss:
|
||||
DoCast(me, Jaraxxus.SpellMistressKiss);
|
||||
_events.ScheduleEvent(Jaraxxus.EventMistressKiss, 30 * Time.InMilliseconds);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
InstanceScript _instance;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_mistress_kiss : AuraScript
|
||||
{
|
||||
public override bool Load()
|
||||
{
|
||||
return ValidateSpellInfo(Jaraxxus.SpellMistressKissDamageSilence);
|
||||
}
|
||||
|
||||
void HandleDummyTick(AuraEffect aurEff)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
Unit target = GetTarget();
|
||||
if (caster && target)
|
||||
{
|
||||
if (target.HasUnitState(UnitState.Casting))
|
||||
{
|
||||
caster.CastSpell(target, Jaraxxus.SpellMistressKissDamageSilence, true);
|
||||
target.RemoveAurasDueToSpell(GetSpellInfo().Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectPeriodic.Add(new EffectPeriodicHandler(HandleDummyTick, 0, AuraType.PeriodicDummy));
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_mistress_kiss_area : SpellScript
|
||||
{
|
||||
void FilterTargets(List<WorldObject> targets)
|
||||
{
|
||||
// get a list of players with mana
|
||||
targets.RemoveAll(unit => unit.IsTypeId(TypeId.Player) && unit.ToPlayer().getPowerType() == PowerType.Mana);
|
||||
if (targets.Empty())
|
||||
return;
|
||||
|
||||
WorldObject target = targets.SelectRandom();
|
||||
targets.Clear();
|
||||
targets.Add(target);
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
{
|
||||
GetCaster().CastSpell(GetHitUnit(), (uint)GetEffectValue(), true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(FilterTargets, 0, Targets.UnitSrcAreaEnemy));
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+409
@@ -0,0 +1,409 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
|
||||
namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
|
||||
{
|
||||
struct DataTypes
|
||||
{
|
||||
public const uint BossBeasts = 0;
|
||||
public const uint BossJaraxxus = 1;
|
||||
public const uint BossCrusaders = 2;
|
||||
public const uint BossValkiries = 3;
|
||||
public const uint BossLichKing = 4; // Not Really A Boss But Oh Well
|
||||
public const uint BossAnubarak = 5;
|
||||
public const uint MaxEncounters = 6;
|
||||
|
||||
public const uint Counter = 8;
|
||||
public const uint Event = 9;
|
||||
|
||||
public const uint EventTimer = 101;
|
||||
public const uint EventNpc = 102;
|
||||
public const uint NorthrendBeasts = 103;
|
||||
|
||||
public const uint SnoboldCount = 301;
|
||||
public const uint MistressOfPainCount = 302;
|
||||
public const uint TributeToImmortalityEligible = 303;
|
||||
|
||||
public const uint Increase = 501;
|
||||
public const uint Decrease = 502;
|
||||
}
|
||||
|
||||
struct Spells
|
||||
{
|
||||
public const uint WilfredPortal = 68424;
|
||||
public const uint JaraxxusChains = 67924;
|
||||
public const uint CorpseTeleport = 69016;
|
||||
public const uint DestroyFloorKnockup = 68193;
|
||||
}
|
||||
|
||||
struct WorldStateIds
|
||||
{
|
||||
public const uint Show = 4390;
|
||||
public const uint Count = 4389;
|
||||
}
|
||||
|
||||
enum AnnouncerMessages
|
||||
{
|
||||
Beasts = 724001,
|
||||
Jaraxxus = 724002,
|
||||
Crusaders = 724003,
|
||||
Valkiries = 724004,
|
||||
LichKing = 724005,
|
||||
Anubarak = 724006
|
||||
}
|
||||
|
||||
public struct CreatureIds
|
||||
{
|
||||
public const uint Barrent = 34816;
|
||||
public const uint Tirion = 34996;
|
||||
public const uint TirionFordring = 36095;
|
||||
public const uint ArgentMage = 36097;
|
||||
public const uint Fizzlebang = 35458;
|
||||
public const uint Garrosh = 34995;
|
||||
public const uint Varian = 34990;
|
||||
public const uint LichKing = 35877;
|
||||
|
||||
public const uint Thrall = 34994;
|
||||
public const uint Proudmoore = 34992;
|
||||
public const uint WilfredPortal = 17965;
|
||||
public const uint Trigger = 35651;
|
||||
|
||||
public const uint Icehowl = 34797;
|
||||
public const uint Gormok = 34796;
|
||||
public const uint Dreadscale = 34799;
|
||||
public const uint Acidmaw = 35144;
|
||||
|
||||
public const uint Jaraxxus = 34780;
|
||||
|
||||
public const uint ChampionsController = 34781;
|
||||
|
||||
public const uint AllianceDeathKnight = 34461;
|
||||
public const uint AllianceDruidBalance = 34460;
|
||||
public const uint AllianceDruidRestoration = 34469;
|
||||
public const uint AllianceHunter = 34467;
|
||||
public const uint AllianceMage = 34468;
|
||||
public const uint AlliancePaladinHoly = 34465;
|
||||
public const uint AlliancePaladinRetribution = 34471;
|
||||
public const uint AlliancePriestDiscipline = 34466;
|
||||
public const uint AlliancePriestShadow = 34473;
|
||||
public const uint AllianceRogue = 34472;
|
||||
public const uint AllianceShamanEnhancement = 34463;
|
||||
public const uint AllianceShamanRestoration = 34470;
|
||||
public const uint AllianceWarlock = 34474;
|
||||
public const uint AllianceWarrior = 34475;
|
||||
|
||||
public const uint HordeDeathKnight = 34458;
|
||||
public const uint HordeDruidBalance = 34451;
|
||||
public const uint HordeDruidRestoration = 34459;
|
||||
public const uint HordeHunter = 34448;
|
||||
public const uint HordeMage = 34449;
|
||||
public const uint HordePaladinHoly = 34445;
|
||||
public const uint HordePaladinRetribution = 34456;
|
||||
public const uint HordePriestDiscipline = 34447;
|
||||
public const uint HordePriestShadow = 34441;
|
||||
public const uint HordeRogue = 34454;
|
||||
public const uint HordeShamanEnhancement = 34455;
|
||||
public const uint HordeShamanRestoration = 34444;
|
||||
public const uint HordeWarlock = 34450;
|
||||
public const uint HordeWarrior = 34453;
|
||||
|
||||
public const uint Lightbane = 34497;
|
||||
public const uint Darkbane = 34496;
|
||||
|
||||
public const uint DarkEssence = 34567;
|
||||
public const uint LightEssence = 34568;
|
||||
|
||||
public const uint Anubarak = 34564;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
public const uint CrusadersCache10 = 195631;
|
||||
public const uint CrusadersCache25 = 195632;
|
||||
public const uint CrusadersCache10H = 195633;
|
||||
public const uint CrusadersCache25H = 195635;
|
||||
|
||||
// Tribute Chest (Heroic)
|
||||
// 10-Man Modes
|
||||
public const uint TributeChest10h25 = 195668; // 10man 01-24 Attempts
|
||||
public const uint TributeChest10h45 = 195667; // 10man 25-44 Attempts
|
||||
public const uint TributeChest10h50 = 195666; // 10man 45-49 Attempts
|
||||
public const uint TributeChest10h99 = 195665; // 10man 50 Attempts
|
||||
// 25-Man Modes
|
||||
public const uint TributeChest25h25 = 195672; // 25man 01-24 Attempts
|
||||
public const uint TributeChest25h45 = 195671; // 25man 25-44 Attempts
|
||||
public const uint TributeChest25h50 = 195670; // 25man 45-49 Attempts
|
||||
public const uint TributeChest25h99 = 195669; // 25man 50 Attempts
|
||||
|
||||
public const uint ArgentColiseumFloor = 195527; //20943
|
||||
public const uint MainGateDoor = 195647;
|
||||
public const uint EastPortcullis = 195648;
|
||||
public const uint WebDoor = 195485;
|
||||
public const uint PortalToDalaran = 195682;
|
||||
}
|
||||
|
||||
struct AchievementData
|
||||
{
|
||||
// Northrend Beasts
|
||||
public const uint UpperBackPain10Player = 11779;
|
||||
public const uint UpperBackPain10PlayerHeroic = 11802;
|
||||
public const uint UpperBackPain25Player = 11780;
|
||||
public const uint UpperBackPain25PlayerHeroic = 11801;
|
||||
// Lord Jaraxxus
|
||||
public const uint ThreeSixtyPainSpike10Player = 11838;
|
||||
public const uint ThreeSixtyPainSpike10PlayerHeroic = 11861;
|
||||
public const uint ThreeSixtyPainSpike25Player = 11839;
|
||||
public const uint ThreeSixtyPainSpike25PlayerHeroic = 11862;
|
||||
// Tribute
|
||||
public const uint ATributeToSkill10Player = 12344;
|
||||
public const uint ATributeToSkill25Player = 12338;
|
||||
public const uint ATributeToMadSkill10Player = 12347;
|
||||
public const uint ATributeToMadSkill25Player = 12341;
|
||||
public const uint ATributeToInsanity10Player = 12349;
|
||||
public const uint ATributeToInsanity25Player = 12343;
|
||||
public const uint ATributeToImmortalityHorde = 12358;
|
||||
public const uint ATributeToImmortalityAlliance = 12359;
|
||||
public const uint ATributeToDedicatedInsanity = 12360;
|
||||
public const uint RealmFirstGrandCrusader = 12350;
|
||||
|
||||
// Dummy Spells - Not Existing In Dbc But We Don'T Need That
|
||||
public const uint SpellWormsKilledIn10Seconds = 68523;
|
||||
public const uint SpellChampionsKilledInMinute = 68620;
|
||||
public const uint SpellDefeatFactionChampions = 68184;
|
||||
public const uint SpellTraitorKing10 = 68186;
|
||||
public const uint SpellTraitorKing25 = 68515;
|
||||
|
||||
// Timed Events
|
||||
public const uint EventStartTwinsFight = 21853;
|
||||
}
|
||||
|
||||
struct NorthrendBeasts
|
||||
{
|
||||
public const uint GormokInProgress = 1000;
|
||||
public const uint GormokDone = 1001;
|
||||
public const uint SnakesInProgress = 2000;
|
||||
public const uint DreadscaleSubmerged = 2001;
|
||||
public const uint AcidmawSubmerged = 2002;
|
||||
public const uint SnakesSpecial = 2003;
|
||||
public const uint SnakesDone = 2004;
|
||||
public const uint IcehowlInProgress = 3000;
|
||||
public const uint IcehowlDone = 3001;
|
||||
}
|
||||
|
||||
struct Texts
|
||||
{
|
||||
// Highlord Tirion Fordring - 34996
|
||||
public const uint Stage_0_01 = 0;
|
||||
public const uint Stage_0_02 = 1;
|
||||
public const uint Stage_0_04 = 2;
|
||||
public const uint Stage_0_05 = 3;
|
||||
public const uint Stage_0_06 = 4;
|
||||
public const uint Stage_0_Wipe = 5;
|
||||
public const uint Stage_1_01 = 6;
|
||||
public const uint Stage_1_07 = 7;
|
||||
public const uint Stage_1_08 = 8;
|
||||
public const uint Stage_1_11 = 9;
|
||||
public const uint Stage_2_01 = 10;
|
||||
public const uint Stage_2_03 = 11;
|
||||
public const uint Stage_2_06 = 12;
|
||||
public const uint Stage_3_01 = 13;
|
||||
public const uint Stage_3_02 = 14;
|
||||
public const uint Stage_4_01 = 15;
|
||||
public const uint Stage_4_03 = 16;
|
||||
|
||||
// Varian Wrynn
|
||||
public const uint Stage_0_03a = 0;
|
||||
public const uint Stage_1_10 = 1;
|
||||
public const uint Stage_2_02a = 2;
|
||||
public const uint Stage_2_04a = 3;
|
||||
public const uint Stage_2_05a = 4;
|
||||
public const uint Stage_3_03a = 5;
|
||||
|
||||
// Garrosh
|
||||
public const uint Stage_0_03h = 0;
|
||||
public const uint Stage_1_09 = 1;
|
||||
public const uint Stage_2_02h = 2;
|
||||
public const uint Stage_2_04h = 3;
|
||||
public const uint Stage_2_05h = 4;
|
||||
public const uint Stage_3_03h = 5;
|
||||
|
||||
// Wilfred Fizzlebang
|
||||
public const uint Stage_1_02 = 0;
|
||||
public const uint Stage_1_03 = 1;
|
||||
public const uint Stage_1_04 = 2;
|
||||
public const uint Stage_1_06 = 3;
|
||||
|
||||
// Lord Jaraxxus
|
||||
public const uint Stage_1_05 = 0;
|
||||
|
||||
// The Lich King
|
||||
public const uint Stage_4_02 = 0;
|
||||
public const uint Stage_4_05 = 1;
|
||||
public const uint Stage_4_04 = 2;
|
||||
|
||||
// Highlord Tirion Fordring - 36095
|
||||
public const uint Stage_4_06 = 0;
|
||||
public const uint Stage_4_07 = 1;
|
||||
}
|
||||
|
||||
struct MiscData
|
||||
{
|
||||
public const uint DespawnTime = 300000;
|
||||
|
||||
public const uint DisplayIdDestroyedFloor = 9060;
|
||||
|
||||
public static BossBoundaryEntry[] boundaries =
|
||||
{
|
||||
new BossBoundaryEntry(DataTypes.BossBeasts, new CircleBoundary(new Position(563.26f, 139.6f), 75.0)),
|
||||
new BossBoundaryEntry(DataTypes.BossJaraxxus, new CircleBoundary(new Position(563.26f, 139.6f), 75.0)),
|
||||
new BossBoundaryEntry(DataTypes.BossCrusaders, new CircleBoundary(new Position(563.26f, 139.6f), 75.0)),
|
||||
new BossBoundaryEntry(DataTypes.BossValkiries, new CircleBoundary(new Position(563.26f, 139.6f), 75.0)),
|
||||
new BossBoundaryEntry(DataTypes.BossAnubarak, new EllipseBoundary(new Position(746.0f, 135.0f), 100.0, 75.0))
|
||||
};
|
||||
|
||||
public static _Messages[] _GossipMessage =
|
||||
{
|
||||
new _Messages(AnnouncerMessages.Beasts, eTradeskill.GossipActionInfoDef + 1, false, DataTypes.BossBeasts),
|
||||
new _Messages(AnnouncerMessages.Jaraxxus, eTradeskill.GossipActionInfoDef + 2, false, DataTypes.BossJaraxxus),
|
||||
new _Messages(AnnouncerMessages.Crusaders, eTradeskill.GossipActionInfoDef + 3, false, DataTypes.BossCrusaders),
|
||||
new _Messages(AnnouncerMessages.Valkiries, eTradeskill.GossipActionInfoDef + 4, false, DataTypes.BossValkiries),
|
||||
new _Messages(AnnouncerMessages.LichKing, eTradeskill.GossipActionInfoDef + 5, false, DataTypes.BossAnubarak),
|
||||
new _Messages(AnnouncerMessages.Anubarak, eTradeskill.GossipActionInfoDef + 6, true, DataTypes.BossAnubarak)
|
||||
};
|
||||
|
||||
public static Position[] ToCSpawnLoc =
|
||||
{
|
||||
new Position(563.912f, 261.625f, 394.73f, 4.70437f), // 0 Center
|
||||
new Position( 575.451f, 261.496f, 394.73f, 4.6541f), // 1 Left
|
||||
new Position( 549.951f, 261.55f, 394.73f, 4.74835f) // 2 Right
|
||||
};
|
||||
|
||||
public static Position[] ToCCommonLoc =
|
||||
{
|
||||
new Position(559.257996f, 90.266197f, 395.122986f, 0), // 0 Barrent
|
||||
|
||||
new Position(563.672974f, 139.571f, 393.837006f, 0), // 1 Center
|
||||
new Position(563.833008f, 187.244995f, 394.5f, 0), // 2 Backdoor
|
||||
new Position(577.347839f, 195.338888f, 395.14f, 0), // 3 - Right
|
||||
new Position(550.955933f, 195.338888f, 395.14f, 0), // 4 - Left
|
||||
new Position(563.833008f, 195.244995f, 394.585561f, 0), // 5 - Center
|
||||
new Position(573.5f, 180.5f, 395.14f, 0), // 6 Move 0 Right
|
||||
new Position(553.5f, 180.5f, 395.14f, 0), // 7 Move 0 Left
|
||||
new Position(573.0f, 170.0f, 395.14f, 0), // 8 Move 1 Right
|
||||
new Position(555.5f, 170.0f, 395.14f, 0), // 9 Move 1 Left
|
||||
new Position(563.8f, 216.1f, 395.1f, 0), // 10 Behind the door
|
||||
|
||||
new Position(575.042358f, 195.260727f, 395.137146f, 0), // 5
|
||||
new Position(552.248901f, 195.331955f, 395.132658f, 0), // 6
|
||||
new Position(573.342285f, 195.515823f, 395.135956f, 0), // 7
|
||||
new Position(554.239929f, 195.825577f, 395.137909f, 0), // 8
|
||||
new Position(571.042358f, 195.260727f, 395.137146f, 0), // 9
|
||||
new Position(556.720581f, 195.015472f, 395.132658f, 0), // 10
|
||||
new Position(569.534119f, 195.214478f, 395.139526f, 0), // 11
|
||||
new Position(569.231201f, 195.941071f, 395.139526f, 0), // 12
|
||||
new Position(558.811610f, 195.985779f, 394.671661f, 0), // 13
|
||||
new Position(567.641724f, 195.351501f, 394.659943f, 0), // 14
|
||||
new Position(560.633972f, 195.391708f, 395.137543f, 0), // 15
|
||||
new Position(565.816956f, 195.477921f, 395.136810f, 0) // 16
|
||||
};
|
||||
|
||||
public static Position[] JaraxxusLoc =
|
||||
{
|
||||
new Position(508.104767f, 138.247345f, 395.128052f, 0), // 0 - Fizzlebang start location
|
||||
new Position(548.610596f, 139.807800f, 394.321838f, 0), // 1 - fizzlebang end
|
||||
new Position(581.854187f, 138.0f, 394.319f, 0), // 2 - Portal Right
|
||||
new Position(550.558838f, 138.0f, 394.319f, 0) // 3 - Portal Left
|
||||
};
|
||||
|
||||
public static Position[] FactionChampionLoc =
|
||||
{
|
||||
new Position(514.231f, 105.569f, 418.234f, 0), // 0 - Horde Initial Pos 0
|
||||
new Position(508.334f, 115.377f, 418.234f, 0), // 1 - Horde Initial Pos 1
|
||||
new Position(506.454f, 126.291f, 418.234f, 0), // 2 - Horde Initial Pos 2
|
||||
new Position(506.243f, 106.596f, 421.592f, 0), // 3 - Horde Initial Pos 3
|
||||
new Position(499.885f, 117.717f, 421.557f, 0), // 4 - Horde Initial Pos 4
|
||||
|
||||
new Position(613.127f, 100.443f, 419.74f, 0), // 5 - Ally Initial Pos 0
|
||||
new Position(621.126f, 128.042f, 418.231f, 0), // 6 - Ally Initial Pos 1
|
||||
new Position(618.829f, 113.606f, 418.232f, 0), // 7 - Ally Initial Pos 2
|
||||
new Position(625.845f, 112.914f, 421.575f, 0), // 8 - Ally Initial Pos 3
|
||||
new Position(615.566f, 109.653f, 418.234f, 0), // 9 - Ally Initial Pos 4
|
||||
|
||||
new Position(535.469f, 113.012f, 394.66f, 0), // 10 - Horde Final Pos 0
|
||||
new Position(526.417f, 137.465f, 394.749f, 0), // 11 - Horde Final Pos 1
|
||||
new Position(528.108f, 111.057f, 395.289f, 0), // 12 - Horde Final Pos 2
|
||||
new Position(519.92f, 134.285f, 395.289f, 0), // 13 - Horde Final Pos 3
|
||||
new Position(533.648f, 119.148f, 394.646f, 0), // 14 - Horde Final Pos 4
|
||||
new Position(531.399f, 125.63f, 394.708f, 0), // 15 - Horde Final Pos 5
|
||||
new Position(528.958f, 131.47f, 394.73f, 0), // 16 - Horde Final Pos 6
|
||||
new Position(526.309f, 116.667f, 394.833f, 0), // 17 - Horde Final Pos 7
|
||||
new Position(524.238f, 122.411f, 394.819f, 0), // 18 - Horde Final Pos 8
|
||||
new Position(521.901f, 128.488f, 394.832f, 0) // 19 - Horde Final Pos 9
|
||||
};
|
||||
|
||||
public static Position[] TwinValkyrsLoc =
|
||||
{
|
||||
new Position(586.060242f, 117.514809f, 394.41f, 0), // 0 - Dark essence 1
|
||||
new Position(541.602112f, 161.879837f, 394.41f, 0), // 1 - Dark essence 2
|
||||
new Position(541.021118f, 117.262932f, 394.41f, 0), // 2 - Light essence 1
|
||||
new Position(586.200562f, 162.145523f, 394.41f, 0) // 3 - Light essence 2
|
||||
};
|
||||
|
||||
public static Position[] LichKingLoc =
|
||||
{
|
||||
new Position(563.549f, 152.474f, 394.393f, 0), // 0 - Lich king start
|
||||
new Position(563.547f, 141.613f, 393.908f, 0) // 1 - Lich king end
|
||||
};
|
||||
|
||||
public static Position[] AnubarakLoc =
|
||||
{
|
||||
new Position(787.932556f, 133.289780f, 142.612152f, 0), // 0 - Anub'arak start location
|
||||
new Position(695.240051f, 137.834824f, 142.200000f, 0), // 1 - Anub'arak move point location
|
||||
new Position(694.886353f, 102.484665f, 142.119614f, 0), // 3 - Nerub Spawn
|
||||
new Position(694.500671f, 185.363968f, 142.117905f, 0), // 5 - Nerub Spawn
|
||||
new Position(731.987244f, 83.3824690f, 142.119614f, 0), // 2 - Nerub Spawn
|
||||
new Position(740.184509f, 193.443390f, 142.117584f, 0) // 4 - Nerub Spawn
|
||||
};
|
||||
|
||||
public static Position[] EndSpawnLoc =
|
||||
{
|
||||
new Position(648.9167f, 131.0208f, 141.6161f, 0), // 0 - Highlord Tirion Fordring
|
||||
new Position(649.1614f, 142.0399f, 141.3057f, 0), // 1 - Argent Mage
|
||||
new Position(644.6250f, 149.2743f, 140.6015f, 0) // 2 - Portal to Dalaran
|
||||
};
|
||||
}
|
||||
|
||||
struct _Messages
|
||||
{
|
||||
public _Messages(AnnouncerMessages _msg, uint _id, bool _state, uint _encounter)
|
||||
{
|
||||
msgnum = _msg;
|
||||
id = _id;
|
||||
state = _state;
|
||||
encounter = _encounter;
|
||||
}
|
||||
|
||||
public AnnouncerMessages msgnum;
|
||||
public uint id;
|
||||
public bool state;
|
||||
public uint encounter;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user