Rename of some files, and added one zone
This commit is contained in:
+2
-2
@@ -21,9 +21,9 @@ using Game.Scripting;
|
||||
namespace Scripts.Kalimdor
|
||||
{
|
||||
[Script]
|
||||
public class RageFireChasm : InstanceMapScript
|
||||
public class instance_ragefire_chasm : InstanceMapScript
|
||||
{
|
||||
public RageFireChasm() : base("instance_ragefire_chasm", 389) { }
|
||||
public instance_ragefire_chasm() : base("instance_ragefire_chasm", 389) { }
|
||||
|
||||
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||
{
|
||||
@@ -0,0 +1,378 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Framework.Constants;
|
||||
using Game.Scripting;
|
||||
using Game;
|
||||
|
||||
namespace Scripts.Kalimdor.ZoneAshenvale
|
||||
{
|
||||
struct CreatureIds
|
||||
{
|
||||
//RuulSnowhoof
|
||||
public const uint ThistlefurUrsa = 3921;
|
||||
public const uint ThistlefurTotemic = 3922;
|
||||
public const uint ThistlefurPathfinder = 3926;
|
||||
|
||||
//Muglash
|
||||
public const uint WrathRider = 3713;
|
||||
public const uint WrathSorceress = 3717;
|
||||
public const uint WrathRazortail = 3712;
|
||||
public const uint WrathPriestess = 3944;
|
||||
public const uint WrathMyrmidon = 3711;
|
||||
public const uint WrathSeawitch = 3715;
|
||||
public const uint Vorsha = 12940;
|
||||
public const uint Muglash = 12717;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
//RuulSnowhoof
|
||||
public const uint Cage = 178147;
|
||||
|
||||
//Muglash
|
||||
public const uint NagaBrazier = 178247;
|
||||
|
||||
//KingoftheFoulweald
|
||||
public const uint Banner = 178205;
|
||||
}
|
||||
|
||||
struct QuestIds
|
||||
{
|
||||
//RuulSnowhoof
|
||||
public const uint FreedomToRuul = 6482;
|
||||
|
||||
//Muglash
|
||||
public const uint Vorsha = 6641;
|
||||
}
|
||||
|
||||
struct TextIds
|
||||
{
|
||||
//Muglash
|
||||
public const uint SayMugStart1 = 0;
|
||||
public const uint SayMugStart2 = 1;
|
||||
public const uint SayMugBrazier = 2;
|
||||
public const uint SayMugBrazierWait = 3;
|
||||
public const uint SayMugOnGuard = 4;
|
||||
public const uint SayMugRest = 5;
|
||||
public const uint SayMugDone = 6;
|
||||
public const uint SayMugGratitude = 7;
|
||||
public const uint SayMugPatrol = 8;
|
||||
public const uint SayMugReturn = 9;
|
||||
}
|
||||
|
||||
struct Misc
|
||||
{
|
||||
//RuulSnowhoof
|
||||
public const uint FactionQuest = 113;
|
||||
public static Position[] RuulSnowhoofSummonsCoord =
|
||||
{
|
||||
new Position(3449.218018f, -587.825073f, 174.978867f, 4.714445f),
|
||||
new Position(3446.384521f, -587.830872f, 175.186279f, 4.714445f),
|
||||
new Position(3444.218994f, -587.835327f, 175.380600f, 4.714445f),
|
||||
new Position(3508.344482f, -492.024261f, 186.929031f, 4.145029f),
|
||||
new Position(3506.265625f, -490.531006f, 186.740128f, 4.239277f),
|
||||
new Position(3503.682373f, -489.393799f, 186.629684f, 4.349232f)
|
||||
};
|
||||
|
||||
//Muglash
|
||||
public static Position[] FirstNagaCoord =
|
||||
{
|
||||
new Position(3603.504150f, 1122.631104f, 1.635f, 0.0f), // rider
|
||||
new Position(3589.293945f, 1148.664063f, 5.565f, 0.0f), // sorceress
|
||||
new Position(3609.925537f, 1168.759521f, -1.168f, 0.0f) // razortail
|
||||
};
|
||||
|
||||
public static Position[] SecondNagaCoord =
|
||||
{
|
||||
new Position(3609.925537f, 1168.759521f, -1.168f, 0.0f), // witch
|
||||
new Position(3645.652100f, 1139.425415f, 1.322f, 0.0f), // priest
|
||||
new Position(3583.602051f, 1128.405762f, 2.347f, 0.0f) // myrmidon
|
||||
};
|
||||
public static Position VorshaCoord = new Position(3633.056885f, 1172.924072f, -5.388f, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
[Script]
|
||||
class npc_ruul_snowhoof : CreatureScript
|
||||
{
|
||||
public npc_ruul_snowhoof() : base("npc_ruul_snowhoof") { }
|
||||
|
||||
class npc_ruul_snowhoofAI : npc_escortAI
|
||||
{
|
||||
public npc_ruul_snowhoofAI(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
GameObject cage = me.FindNearestGameObject(GameObjectIds.Cage, 20);
|
||||
if (cage)
|
||||
cage.SetGoState(GameObjectState.Ready);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
summoned.GetAI().AttackStart(me);
|
||||
}
|
||||
|
||||
public override void sQuestAccept(Player player, Quest quest)
|
||||
{
|
||||
if (quest.Id == QuestIds.FreedomToRuul)
|
||||
{
|
||||
me.SetFaction(Misc.FactionQuest);
|
||||
base.Start(true, false, player.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
public override void WaypointReached(uint waypointId)
|
||||
{
|
||||
Player player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me.SetUInt32Value(UnitFields.Bytes1, 0);
|
||||
GameObject cage = me.FindNearestGameObject(GameObjectIds.Cage, 20);
|
||||
if (cage)
|
||||
cage.SetGoState(GameObjectState.Active);
|
||||
break;
|
||||
case 13:
|
||||
me.SummonCreature(CreatureIds.ThistlefurTotemic, Misc.RuulSnowhoofSummonsCoord[0], TempSummonType.DeadDespawn, 60000);
|
||||
me.SummonCreature(CreatureIds.ThistlefurUrsa, Misc.RuulSnowhoofSummonsCoord[1], TempSummonType.DeadDespawn, 60000);
|
||||
me.SummonCreature(CreatureIds.ThistlefurPathfinder, Misc.RuulSnowhoofSummonsCoord[2], TempSummonType.DeadDespawn, 60000);
|
||||
break;
|
||||
case 19:
|
||||
me.SummonCreature(CreatureIds.ThistlefurTotemic, Misc.RuulSnowhoofSummonsCoord[3], TempSummonType.DeadDespawn, 60000);
|
||||
me.SummonCreature(CreatureIds.ThistlefurUrsa, Misc.RuulSnowhoofSummonsCoord[4], TempSummonType.DeadDespawn, 60000);
|
||||
me.SummonCreature(CreatureIds.ThistlefurPathfinder, Misc.RuulSnowhoofSummonsCoord[5], TempSummonType.DeadDespawn, 60000);
|
||||
break;
|
||||
case 21:
|
||||
player.GroupEventHappens(QuestIds.FreedomToRuul, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
}
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return new npc_ruul_snowhoofAI(creature);
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_muglash : CreatureScript
|
||||
{
|
||||
public npc_muglash() : base("npc_muglash") { }
|
||||
|
||||
public class npc_muglashAI : npc_escortAI
|
||||
{
|
||||
public npc_muglashAI(Creature creature) : base(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
eventTimer = 10000;
|
||||
waveId = 0;
|
||||
_isBrazierExtinguished = false;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
Player player = GetPlayerForEscort();
|
||||
if (player)
|
||||
{
|
||||
if (HasEscortState(eEscortState.Paused))
|
||||
{
|
||||
if (Convert.ToBoolean(RandomHelper.URand(0, 1)))
|
||||
Talk(TextIds.SayMugOnGuard, player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
if (HasEscortState(eEscortState.Escorting))
|
||||
{
|
||||
Player player = GetPlayerForEscort();
|
||||
if (player)
|
||||
player.FailQuest(QuestIds.Vorsha);
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
summoned.GetAI().AttackStart(me);
|
||||
}
|
||||
|
||||
public override void sQuestAccept(Player player, Quest quest)
|
||||
{
|
||||
if (quest.Id == QuestIds.Vorsha)
|
||||
{
|
||||
Talk(TextIds.SayMugStart1);
|
||||
me.SetFaction(Misc.FactionQuest);
|
||||
base.Start(true, false, player.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
public override void WaypointReached(uint waypointId)
|
||||
{
|
||||
Player player = GetPlayerForEscort();
|
||||
if (player)
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
Talk(TextIds.SayMugStart2, player);
|
||||
break;
|
||||
case 24:
|
||||
Talk(TextIds.SayMugBrazier, player);
|
||||
|
||||
GameObject go = GetClosestGameObjectWithEntry(me, GameObjectIds.NagaBrazier, SharedConst.InteractionDistance * 2);
|
||||
if (go)
|
||||
{
|
||||
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
|
||||
SetEscortPaused(true);
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
Talk(TextIds.SayMugGratitude);
|
||||
player.GroupEventHappens(QuestIds.Vorsha, me);
|
||||
break;
|
||||
case 26:
|
||||
Talk(TextIds.SayMugPatrol);
|
||||
break;
|
||||
case 27:
|
||||
Talk(TextIds.SayMugReturn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoWaveSummon()
|
||||
{
|
||||
switch (waveId)
|
||||
{
|
||||
case 1:
|
||||
me.SummonCreature(CreatureIds.WrathRider, Misc.FirstNagaCoord[0], TempSummonType.TimedDespawnOOC, 60000);
|
||||
me.SummonCreature(CreatureIds.WrathSorceress, Misc.FirstNagaCoord[1], TempSummonType.TimedDespawnOOC, 60000);
|
||||
me.SummonCreature(CreatureIds.WrathRazortail, Misc.FirstNagaCoord[2], TempSummonType.TimedDespawnOOC, 60000);
|
||||
break;
|
||||
case 2:
|
||||
me.SummonCreature(CreatureIds.WrathPriestess, Misc.SecondNagaCoord[0], TempSummonType.TimedDespawnOOC, 60000);
|
||||
me.SummonCreature(CreatureIds.WrathMyrmidon, Misc.SecondNagaCoord[1], TempSummonType.TimedDespawnOOC, 60000);
|
||||
me.SummonCreature(CreatureIds.WrathSeawitch, Misc.SecondNagaCoord[2], TempSummonType.TimedDespawnOOC, 60000);
|
||||
break;
|
||||
case 3:
|
||||
me.SummonCreature(CreatureIds.Vorsha, Misc.VorshaCoord, TempSummonType.TimedDespawnOOC, 60000);
|
||||
break;
|
||||
case 4:
|
||||
SetEscortPaused(false);
|
||||
Talk(TextIds.SayMugDone);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
base.UpdateAI(diff);
|
||||
|
||||
if (!me.GetVictim())
|
||||
{
|
||||
if (HasEscortState(eEscortState.Paused) && _isBrazierExtinguished)
|
||||
{
|
||||
if (eventTimer < diff)
|
||||
{
|
||||
++waveId;
|
||||
DoWaveSummon();
|
||||
eventTimer = 10000;
|
||||
}
|
||||
else
|
||||
eventTimer -= diff;
|
||||
}
|
||||
return;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
uint eventTimer;
|
||||
byte waveId;
|
||||
|
||||
public bool _isBrazierExtinguished { get; set; }
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return new npc_muglashAI(creature);
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_naga_brazier : GameObjectScript
|
||||
{
|
||||
public go_naga_brazier() : base("go_naga_brazier") { }
|
||||
|
||||
public override bool OnGossipHello(Player player, GameObject go)
|
||||
{
|
||||
Creature creature = ScriptedAI.GetClosestCreatureWithEntry(go, CreatureIds.Muglash, SharedConst.InteractionDistance * 2);
|
||||
if (creature)
|
||||
{
|
||||
npc_muglash.npc_muglashAI pEscortAI = creature.GetAI<npc_muglash.npc_muglashAI>();
|
||||
if (pEscortAI != null)
|
||||
{
|
||||
creature.GetAI().Talk(TextIds.SayMugBrazierWait);
|
||||
|
||||
pEscortAI._isBrazierExtinguished = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_destroy_karangs_banner : SpellScriptLoader
|
||||
{
|
||||
public spell_destroy_karangs_banner() : base("spell_destroy_karangs_banner") { }
|
||||
|
||||
class spell_destroy_karangs_banner_SpellScript : SpellScript
|
||||
{
|
||||
void HandleAfterCast()
|
||||
{
|
||||
GameObject banner = GetCaster().FindNearestGameObject(GameObjectIds.Banner, GetSpellInfo().GetMaxRange(true));
|
||||
if (banner)
|
||||
banner.Delete();
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
AfterCast.Add(new CastHandler(HandleAfterCast));
|
||||
}
|
||||
}
|
||||
|
||||
public override SpellScript GetSpellScript()
|
||||
{
|
||||
return new spell_destroy_karangs_banner_SpellScript();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@
|
||||
<Compile Include="EasternKingdoms\Deadmines\InstanceDeadmines.cs" />
|
||||
<Compile Include="EasternKingdoms\TheStockade\BossHogger.cs" />
|
||||
<Compile Include="EasternKingdoms\TheStockade\InstanceTheStockade.cs" />
|
||||
<Compile Include="Kalimdor\ZoneAshenvale.cs" />
|
||||
<Compile Include="Northrend\AzjolNerub\AzjolNerub\BossAnubarak.cs" />
|
||||
<Compile Include="Northrend\AzjolNerub\AzjolNerub\BossKrikthirTheGatewatcher.cs" />
|
||||
<Compile Include="Northrend\AzjolNerub\AzjolNerub\BossNadronox.cs" />
|
||||
@@ -84,8 +85,8 @@
|
||||
<Compile Include="EasternKingdoms\Karazhan\OperaEvent.cs" />
|
||||
<Compile Include="EasternKingdoms\ScarletEnclave\Chapter1.cs" />
|
||||
<Compile Include="EasternKingdoms\EversongWoods.cs" />
|
||||
<Compile Include="Kalimdor\Durotar.cs" />
|
||||
<Compile Include="Kalimdor\RageFireChasm.cs" />
|
||||
<Compile Include="Kalimdor\ZoneDurotar.cs" />
|
||||
<Compile Include="Kalimdor\RagefireChasm\InstanceRageFireChasm.cs" />
|
||||
<Compile Include="Northrend\AzjolNerub\Ahnkahet\BossAmanitar.cs" />
|
||||
<Compile Include="Northrend\AzjolNerub\Ahnkahet\BossElderNadox.cs" />
|
||||
<Compile Include="Northrend\AzjolNerub\Ahnkahet\BossHeraldVolazj.cs" />
|
||||
|
||||
Reference in New Issue
Block a user