Implement generic script loaders to greatly reduce code duplication
This commit is contained in:
@@ -45,165 +45,145 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.Amanitar
|
||||
}
|
||||
|
||||
[Script]
|
||||
class boss_amanitar : CreatureScript
|
||||
class boss_amanitar : BossAI
|
||||
{
|
||||
public boss_amanitar() : base("boss_amanitar") { }
|
||||
public boss_amanitar(Creature creature) : base(creature, DataTypes.Amanitar) { }
|
||||
|
||||
class boss_amanitarAI : BossAI
|
||||
public override void Reset()
|
||||
{
|
||||
public boss_amanitarAI(Creature creature) : base(creature, DataTypes.Amanitar) { }
|
||||
_Reset();
|
||||
me.SetMeleeDamageSchool(SpellSchools.Nature);
|
||||
me.ApplySpellImmune(0, SpellImmunity.School, SpellSchoolMask.Nature, true);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
_scheduler.SetValidator(() => !me.HasUnitState(UnitState.Casting));
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), task =>
|
||||
{
|
||||
_Reset();
|
||||
me.SetMeleeDamageSchool(SpellSchools.Nature);
|
||||
me.ApplySpellImmune(0, SpellImmunity.School, SpellSchoolMask.Nature, true);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
SpawnAdds();
|
||||
task.Repeat(TimeSpan.FromSeconds(20));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(9), task =>
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
_scheduler.SetValidator(() => !me.HasUnitState(UnitState.Casting));
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), task =>
|
||||
{
|
||||
SpawnAdds();
|
||||
task.Repeat(TimeSpan.FromSeconds(20));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(9), task =>
|
||||
{
|
||||
DoCast(SelectTarget(SelectAggroTarget.Random, 0, 100, true), SpellIds.EntanglingRoots, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(15));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(14), task =>
|
||||
{
|
||||
DoCastVictim(SpellIds.Bash);
|
||||
task.Repeat(TimeSpan.FromSeconds(7), TimeSpan.FromSeconds(12));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), TimeSpan.FromSeconds(18), task =>
|
||||
{
|
||||
DoCast(SpellIds.Mini);
|
||||
task.Repeat(TimeSpan.FromSeconds(25), TimeSpan.FromSeconds(30));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(20), task =>
|
||||
{
|
||||
DoCast(SelectTarget(SelectAggroTarget.Random, 0, 100, true), SpellIds.VenomBoltVolley, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(18), TimeSpan.FromSeconds(22));
|
||||
});
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
DoCast(SelectTarget(SelectAggroTarget.Random, 0, 100, true), SpellIds.EntanglingRoots, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(15));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(14), task =>
|
||||
{
|
||||
_JustDied();
|
||||
instance.DoRemoveAurasDueToSpellOnPlayers(SpellIds.Mini);
|
||||
}
|
||||
|
||||
void SpawnAdds()
|
||||
DoCastVictim(SpellIds.Bash);
|
||||
task.Repeat(TimeSpan.FromSeconds(7), TimeSpan.FromSeconds(12));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), TimeSpan.FromSeconds(18), task =>
|
||||
{
|
||||
int u = 0;
|
||||
DoCast(SpellIds.Mini);
|
||||
task.Repeat(TimeSpan.FromSeconds(25), TimeSpan.FromSeconds(30));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(20), task =>
|
||||
{
|
||||
DoCast(SelectTarget(SelectAggroTarget.Random, 0, 100, true), SpellIds.VenomBoltVolley, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(18), TimeSpan.FromSeconds(22));
|
||||
});
|
||||
}
|
||||
|
||||
for (byte i = 0; i < 30; ++i)
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
_JustDied();
|
||||
instance.DoRemoveAurasDueToSpellOnPlayers(SpellIds.Mini);
|
||||
}
|
||||
|
||||
void SpawnAdds()
|
||||
{
|
||||
int u = 0;
|
||||
|
||||
for (byte i = 0; i < 30; ++i)
|
||||
{
|
||||
Position pos = me.GetRandomNearPosition(30.0f);
|
||||
pos.posZ = me.GetMap().GetHeight(pos.GetPositionX(), pos.GetPositionY(), MapConst.MaxHeight) + 2.0f;
|
||||
|
||||
Creature trigger = me.SummonCreature(CreatureIds.Trigger, pos);
|
||||
if (trigger)
|
||||
{
|
||||
Position pos = me.GetRandomNearPosition(30.0f);
|
||||
pos.posZ = me.GetMap().GetHeight(pos.GetPositionX(), pos.GetPositionY(), MapConst.MaxHeight) + 2.0f;
|
||||
|
||||
Creature trigger = me.SummonCreature(CreatureIds.Trigger, pos);
|
||||
if (trigger)
|
||||
Creature temp1 = trigger.FindNearestCreature(CreatureIds.HealthyMushroom, 4.0f, true);
|
||||
Creature temp2 = trigger.FindNearestCreature(CreatureIds.PoisonousMushroom, 4.0f, true);
|
||||
if (temp1 || temp2)
|
||||
{
|
||||
Creature temp1 = trigger.FindNearestCreature(CreatureIds.HealthyMushroom, 4.0f, true);
|
||||
Creature temp2 = trigger.FindNearestCreature(CreatureIds.PoisonousMushroom, 4.0f, true);
|
||||
if (temp1 || temp2)
|
||||
{
|
||||
trigger.DisappearAndDie();
|
||||
}
|
||||
else
|
||||
{
|
||||
u = 1 - u;
|
||||
trigger.DisappearAndDie();
|
||||
me.SummonCreature(u > 0 ? CreatureIds.PoisonousMushroom : CreatureIds.HealthyMushroom, pos, TempSummonType.TimedOrCorpseDespawn, 60 * Time.InMilliseconds);
|
||||
}
|
||||
trigger.DisappearAndDie();
|
||||
}
|
||||
else
|
||||
{
|
||||
u = 1 - u;
|
||||
trigger.DisappearAndDie();
|
||||
me.SummonCreature(u > 0 ? CreatureIds.PoisonousMushroom : CreatureIds.HealthyMushroom, pos, TempSummonType.TimedOrCorpseDespawn, 60 * Time.InMilliseconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
return GetInstanceAI<boss_amanitarAI>(creature);
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_amanitar_mushrooms : CreatureScript
|
||||
class npc_amanitar_mushrooms : ScriptedAI
|
||||
{
|
||||
public npc_amanitar_mushrooms() : base("npc_amanitar_mushrooms") { }
|
||||
public npc_amanitar_mushrooms(Creature creature) : base(creature) { }
|
||||
|
||||
class npc_amanitar_mushroomsAI : ScriptedAI
|
||||
public override void Reset()
|
||||
{
|
||||
public npc_amanitar_mushroomsAI(Creature creature) : base(creature) { }
|
||||
_scheduler.CancelAll();
|
||||
_scheduler.SetValidator(() => !me.HasUnitState(UnitState.Casting));
|
||||
|
||||
public override void Reset()
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(1), task =>
|
||||
{
|
||||
_scheduler.CancelAll();
|
||||
_scheduler.SetValidator(() => !me.HasUnitState(UnitState.Casting));
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(1), task =>
|
||||
{
|
||||
if (me.GetEntry() == CreatureIds.PoisonousMushroom)
|
||||
{
|
||||
DoCast(me, SpellIds.PoisonousMushroomVisualArea, true);
|
||||
DoCast(me, SpellIds.PoisonousMushroomPoisonCloud);
|
||||
}
|
||||
task.Repeat(TimeSpan.FromSeconds(7));
|
||||
});
|
||||
|
||||
me.SetDisplayId(me.GetCreatureTemplate().ModelId2);
|
||||
DoCast(SpellIds.PutridMushroom);
|
||||
|
||||
if (me.GetEntry() == CreatureIds.PoisonousMushroom)
|
||||
DoCast(SpellIds.PoisonousMushroomVisualAura);
|
||||
else
|
||||
DoCast(SpellIds.PowerMushroomVisualAura);
|
||||
}
|
||||
{
|
||||
DoCast(me, SpellIds.PoisonousMushroomVisualArea, true);
|
||||
DoCast(me, SpellIds.PoisonousMushroomPoisonCloud);
|
||||
}
|
||||
task.Repeat(TimeSpan.FromSeconds(7));
|
||||
});
|
||||
|
||||
public override void DamageTaken(Unit attacker, ref uint damage)
|
||||
{
|
||||
if (damage >= me.GetHealth() && me.GetEntry() == CreatureIds.HealthyMushroom)
|
||||
DoCast(me, SpellIds.HealthyMushroomPotentFungus, true);
|
||||
}
|
||||
me.SetDisplayId(me.GetCreatureTemplate().ModelId2);
|
||||
DoCast(SpellIds.PutridMushroom);
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
public override void AttackStart(Unit victim) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
}
|
||||
if (me.GetEntry() == CreatureIds.PoisonousMushroom)
|
||||
DoCast(SpellIds.PoisonousMushroomVisualAura);
|
||||
else
|
||||
DoCast(SpellIds.PowerMushroomVisualAura);
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void DamageTaken(Unit attacker, ref uint damage)
|
||||
{
|
||||
return new npc_amanitar_mushroomsAI(creature);
|
||||
if (damage >= me.GetHealth() && me.GetEntry() == CreatureIds.HealthyMushroom)
|
||||
DoCast(me, SpellIds.HealthyMushroomPotentFungus, true);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
public override void AttackStart(Unit victim) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,213 +54,184 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.ElderNadox
|
||||
}
|
||||
|
||||
[Script]
|
||||
class boss_elder_nadox : CreatureScript
|
||||
class boss_elder_nadox : BossAI
|
||||
{
|
||||
public boss_elder_nadox() : base("boss_elder_nadox") { }
|
||||
|
||||
class boss_elder_nadoxAI : BossAI
|
||||
public boss_elder_nadox(Creature creature) : base(creature, DataTypes.ElderNadox)
|
||||
{
|
||||
public boss_elder_nadoxAI(Creature creature) : base(creature, DataTypes.ElderNadox)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
GuardianSummoned = false;
|
||||
GuardianDied = false;
|
||||
}
|
||||
void Initialize()
|
||||
{
|
||||
GuardianSummoned = false;
|
||||
GuardianDied = false;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
}
|
||||
public override void Reset()
|
||||
{
|
||||
_Reset();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(TextIds.SayAggro);
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(TextIds.SayAggro);
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(13), task =>
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(13), task =>
|
||||
{
|
||||
DoCast(SelectTarget(SelectAggroTarget.Random, 0, 100, true), SpellIds.BroodPlague, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(15));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
|
||||
{
|
||||
/// @todo: summoned by egg
|
||||
DoCast(me, SpellIds.SummonSwarmers);
|
||||
if (RandomHelper.URand(1, 3) == 3) // 33% chance of dialog
|
||||
Talk(TextIds.SayEggSac);
|
||||
task.Repeat();
|
||||
});
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
DoCast(SelectTarget(SelectAggroTarget.Random, 0, 100, true), SpellIds.BroodPlague, true);
|
||||
task.Repeat(TimeSpan.FromSeconds(15));
|
||||
DoCast(SpellIds.HBroodRage);
|
||||
task.Repeat(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(50));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), task =>
|
||||
{
|
||||
/// @todo: summoned by egg
|
||||
DoCast(me, SpellIds.SummonSwarmers);
|
||||
if (RandomHelper.URand(1, 3) == 3) // 33% chance of dialog
|
||||
Talk(TextIds.SayEggSac);
|
||||
if (me.HasAura(SpellIds.Enrage))
|
||||
return;
|
||||
if (me.GetPositionZ() < 24.0f)
|
||||
DoCast(me, SpellIds.Enrage, true);
|
||||
task.Repeat();
|
||||
});
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
DoCast(SpellIds.HBroodRage);
|
||||
task.Repeat(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(50));
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), task =>
|
||||
{
|
||||
if (me.HasAura(SpellIds.Enrage))
|
||||
return;
|
||||
if (me.GetPositionZ() < 24.0f)
|
||||
DoCast(me, SpellIds.Enrage, true);
|
||||
task.Repeat();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public override void SummonedCreatureDies(Creature summon, Unit killer)
|
||||
{
|
||||
if (summon.GetEntry() == AKCreatureIds.AhnkaharGuardian)
|
||||
GuardianDied = true;
|
||||
}
|
||||
|
||||
public override uint GetData(uint type)
|
||||
{
|
||||
if (type == Misc.DataRespectYourElders)
|
||||
return !GuardianDied ? 1 : 0u;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit who)
|
||||
{
|
||||
if (who.IsTypeId(TypeId.Player))
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(TextIds.SayDeath);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (!GuardianSummoned && me.HealthBelowPct(50))
|
||||
{
|
||||
/// @todo: summoned by egg
|
||||
Talk(TextIds.EmoteHatches, me);
|
||||
DoCast(me, SpellIds.SummonSwarmGuard);
|
||||
GuardianSummoned = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool GuardianSummoned;
|
||||
bool GuardianDied;
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void SummonedCreatureDies(Creature summon, Unit killer)
|
||||
{
|
||||
return GetInstanceAI<boss_elder_nadoxAI>(creature, "instance_ahnkahet");
|
||||
if (summon.GetEntry() == AKCreatureIds.AhnkaharGuardian)
|
||||
GuardianDied = true;
|
||||
}
|
||||
|
||||
public override uint GetData(uint type)
|
||||
{
|
||||
if (type == Misc.DataRespectYourElders)
|
||||
return !GuardianDied ? 1 : 0u;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit who)
|
||||
{
|
||||
if (who.IsTypeId(TypeId.Player))
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(TextIds.SayDeath);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (!GuardianSummoned && me.HealthBelowPct(50))
|
||||
{
|
||||
/// @todo: summoned by egg
|
||||
Talk(TextIds.EmoteHatches, me);
|
||||
DoCast(me, SpellIds.SummonSwarmGuard);
|
||||
GuardianSummoned = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool GuardianSummoned;
|
||||
bool GuardianDied;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_ahnkahar_nerubian : CreatureScript
|
||||
class npc_ahnkahar_nerubian : ScriptedAI
|
||||
{
|
||||
public npc_ahnkahar_nerubian() : base("npc_ahnkahar_nerubian") { }
|
||||
public npc_ahnkahar_nerubian(Creature creature) : base(creature) { }
|
||||
|
||||
class npc_ahnkahar_nerubianAI : ScriptedAI
|
||||
public override void Reset()
|
||||
{
|
||||
public npc_ahnkahar_nerubianAI(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset()
|
||||
_scheduler.CancelAll();
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(13), task =>
|
||||
{
|
||||
_scheduler.CancelAll();
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(13), task =>
|
||||
{
|
||||
DoCast(me, SpellIds.Sprint);
|
||||
task.Repeat(TimeSpan.FromSeconds(20));
|
||||
});
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
DoCast(me, SpellIds.Sprint);
|
||||
task.Repeat(TimeSpan.FromSeconds(20));
|
||||
});
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
return new npc_ahnkahar_nerubianAI(creature);
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
// 56159 - Swarm
|
||||
[Script]
|
||||
class spell_ahn_kahet_swarm : SpellScriptLoader
|
||||
class spell_ahn_kahet_swarm : SpellScript
|
||||
{
|
||||
public spell_ahn_kahet_swarm() : base("spell_ahn_kahet_swarm") { }
|
||||
|
||||
class spell_ahn_kahet_swarm_SpellScript : SpellScript
|
||||
public spell_ahn_kahet_swarm()
|
||||
{
|
||||
public spell_ahn_kahet_swarm_SpellScript()
|
||||
{
|
||||
_targetCount = 0;
|
||||
}
|
||||
_targetCount = 0;
|
||||
}
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.SwarmBuff);
|
||||
}
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.SwarmBuff);
|
||||
}
|
||||
|
||||
void CountTargets(List<WorldObject> targets)
|
||||
{
|
||||
_targetCount = targets.Count;
|
||||
}
|
||||
void CountTargets(List<WorldObject> targets)
|
||||
{
|
||||
_targetCount = targets.Count;
|
||||
}
|
||||
|
||||
void HandleDummy(uint effIndex)
|
||||
void HandleDummy(uint effIndex)
|
||||
{
|
||||
if (_targetCount != 0)
|
||||
{
|
||||
if (_targetCount != 0)
|
||||
{ Aura aura = GetCaster().GetAura(SpellIds.SwarmBuff);
|
||||
if (aura != null)
|
||||
{
|
||||
aura.SetStackAmount((byte)_targetCount);
|
||||
aura.RefreshDuration();
|
||||
}
|
||||
else
|
||||
GetCaster().CastCustomSpell(SpellIds.SwarmBuff, SpellValueMod.AuraStack, _targetCount, GetCaster(), TriggerCastFlags.FullMask);
|
||||
Aura aura = GetCaster().GetAura(SpellIds.SwarmBuff);
|
||||
if (aura != null)
|
||||
{
|
||||
aura.SetStackAmount((byte)_targetCount);
|
||||
aura.RefreshDuration();
|
||||
}
|
||||
else
|
||||
GetCaster().RemoveAurasDueToSpell(SpellIds.SwarmBuff);
|
||||
GetCaster().CastCustomSpell(SpellIds.SwarmBuff, SpellValueMod.AuraStack, _targetCount, GetCaster(), TriggerCastFlags.FullMask);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(CountTargets, 0, Targets.UnitSrcAreaAlly));
|
||||
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
||||
}
|
||||
|
||||
int _targetCount;
|
||||
else
|
||||
GetCaster().RemoveAurasDueToSpell(SpellIds.SwarmBuff);
|
||||
}
|
||||
|
||||
public override SpellScript GetSpellScript()
|
||||
public override void Register()
|
||||
{
|
||||
return new spell_ahn_kahet_swarm_SpellScript();
|
||||
OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(CountTargets, 0, Targets.UnitSrcAreaAlly));
|
||||
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
||||
}
|
||||
|
||||
int _targetCount;
|
||||
}
|
||||
|
||||
[Script]
|
||||
|
||||
@@ -56,240 +56,233 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
|
||||
}
|
||||
|
||||
[Script]
|
||||
class boss_volazj : CreatureScript
|
||||
class boss_volazj : ScriptedAI
|
||||
{
|
||||
public boss_volazj() : base("boss_volazj") { }
|
||||
|
||||
class boss_volazjAI : ScriptedAI
|
||||
public boss_volazj(Creature creature) : base(creature)
|
||||
{
|
||||
public boss_volazjAI(Creature creature) : base(creature)
|
||||
{
|
||||
Summons = new SummonList(me);
|
||||
Summons = new SummonList(me);
|
||||
|
||||
Initialize();
|
||||
instance = creature.GetInstanceScript();
|
||||
Initialize();
|
||||
instance = creature.GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiMindFlayTimer = 8 * Time.InMilliseconds;
|
||||
uiShadowBoltVolleyTimer = 5 * Time.InMilliseconds;
|
||||
uiShiverTimer = 15 * Time.InMilliseconds;
|
||||
// Used for Insanity handling
|
||||
insanityHandled = 0;
|
||||
}
|
||||
|
||||
// returns the percentage of health after taking the given damage.
|
||||
uint GetHealthPct(uint damage)
|
||||
{
|
||||
if (damage > me.GetHealth())
|
||||
return 0;
|
||||
return (uint)(100 * (me.GetHealth() - damage) / me.GetMaxHealth());
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit pAttacker, ref uint damage)
|
||||
{
|
||||
if (me.HasFlag(UnitFields.Flags, UnitFlags.NotSelectable))
|
||||
damage = 0;
|
||||
|
||||
if ((GetHealthPct(0) >= 66 && GetHealthPct(damage) < 66) ||
|
||||
(GetHealthPct(0) >= 33 && GetHealthPct(damage) < 33))
|
||||
{
|
||||
me.InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SpellIds.Insanity, false);
|
||||
}
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
public override void SpellHitTarget(Unit target, SpellInfo spell)
|
||||
{
|
||||
if (spell.Id == SpellIds.Insanity)
|
||||
{
|
||||
uiMindFlayTimer = 8 * Time.InMilliseconds;
|
||||
uiShadowBoltVolleyTimer = 5 * Time.InMilliseconds;
|
||||
uiShiverTimer = 15 * Time.InMilliseconds;
|
||||
// Used for Insanity handling
|
||||
insanityHandled = 0;
|
||||
}
|
||||
|
||||
// returns the percentage of health after taking the given damage.
|
||||
uint GetHealthPct(uint damage)
|
||||
{
|
||||
if (damage > me.GetHealth())
|
||||
return 0;
|
||||
return (uint)(100 * (me.GetHealth() - damage) / me.GetMaxHealth());
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit pAttacker, ref uint damage)
|
||||
{
|
||||
if (me.HasFlag(UnitFields.Flags, UnitFlags.NotSelectable))
|
||||
damage = 0;
|
||||
|
||||
if ((GetHealthPct(0) >= 66 && GetHealthPct(damage) < 66) ||
|
||||
(GetHealthPct(0) >= 33 && GetHealthPct(damage) < 33))
|
||||
// Not good target or too many players
|
||||
if (target.GetTypeId() != TypeId.Player || insanityHandled > 4)
|
||||
return;
|
||||
// First target - start channel visual and set self as unnattackable
|
||||
if (insanityHandled == 0)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SpellIds.Insanity, false);
|
||||
// Channel visual
|
||||
DoCast(me, SpellIds.InsanityVisual, true);
|
||||
// Unattackable
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.SetControlled(true, UnitState.Stunned);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpellHitTarget(Unit target, SpellInfo spell)
|
||||
{
|
||||
if (spell.Id == SpellIds.Insanity)
|
||||
{
|
||||
// Not good target or too many players
|
||||
if (target.GetTypeId() != TypeId.Player || insanityHandled > 4)
|
||||
return;
|
||||
// First target - start channel visual and set self as unnattackable
|
||||
if (insanityHandled == 0)
|
||||
{
|
||||
// Channel visual
|
||||
DoCast(me, SpellIds.InsanityVisual, true);
|
||||
// Unattackable
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.SetControlled(true, UnitState.Stunned);
|
||||
}
|
||||
// phase the player
|
||||
target.CastSpell(target, SpellIds.InsanityTarget + insanityHandled, true);
|
||||
|
||||
// phase the player
|
||||
target.CastSpell(target, SpellIds.InsanityTarget + insanityHandled, true);
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.InsanityTarget + insanityHandled);
|
||||
if (spellInfo == null)
|
||||
return;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.InsanityTarget + insanityHandled);
|
||||
if (spellInfo == null)
|
||||
return;
|
||||
|
||||
// summon twisted party members for this target
|
||||
var players = me.GetMap().GetPlayers();
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (!player || !player.IsAlive())
|
||||
continue;
|
||||
// Summon clone
|
||||
Unit summon = me.SummonCreature(AKCreatureIds.TwistedVisage, me.GetPositionX(), me.GetPositionY(), me.GetPositionZ(), me.GetOrientation(), TempSummonType.CorpseDespawn, 0);
|
||||
if (summon)
|
||||
{
|
||||
// clone
|
||||
player.CastSpell(summon, SpellIds.ClonePlayer, true);
|
||||
// phase the summon
|
||||
summon.SetInPhase((uint)spellInfo.GetEffect(0).MiscValueB, true, true);
|
||||
}
|
||||
}
|
||||
++insanityHandled;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetPlayersPhase()
|
||||
{
|
||||
// summon twisted party members for this target
|
||||
var players = me.GetMap().GetPlayers();
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (!player || !player.IsAlive())
|
||||
continue;
|
||||
// Summon clone
|
||||
Unit summon = me.SummonCreature(AKCreatureIds.TwistedVisage, me.GetPositionX(), me.GetPositionY(), me.GetPositionZ(), me.GetOrientation(), TempSummonType.CorpseDespawn, 0);
|
||||
if (summon)
|
||||
{
|
||||
// clone
|
||||
player.CastSpell(summon, SpellIds.ClonePlayer, true);
|
||||
// phase the summon
|
||||
summon.SetInPhase((uint)spellInfo.GetEffect(0).MiscValueB, true, true);
|
||||
}
|
||||
}
|
||||
++insanityHandled;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetPlayersPhase()
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
foreach (var player in players)
|
||||
{
|
||||
for (uint index = 0; index <= 4; ++index)
|
||||
player.RemoveAurasDueToSpell(SpellIds.InsanityTarget + index);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
|
||||
instance.SetBossState(DataTypes.HeraldVolazj, EncounterState.NotStarted);
|
||||
instance.DoStopCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievQuickDemiseStartEvent);
|
||||
|
||||
// Visible for all players in insanity
|
||||
me.SetInPhase(169, true, true);
|
||||
for (uint i = 173; i <= 177; ++i)
|
||||
me.SetInPhase(i, true, true);
|
||||
|
||||
ResetPlayersPhase();
|
||||
|
||||
// Cleanup
|
||||
Summons.DespawnAll();
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.SetControlled(false, UnitState.Stunned);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
Talk(TextIds.SayAggro);
|
||||
|
||||
instance.SetBossState(DataTypes.HeraldVolazj, EncounterState.InProgress);
|
||||
instance.DoStartCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievQuickDemiseStartEvent);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
Summons.Summon(summon);
|
||||
}
|
||||
|
||||
public override void SummonedCreatureDespawn(Creature summon)
|
||||
{
|
||||
uint nextPhase = 0;
|
||||
Summons.Despawn(summon);
|
||||
|
||||
// Check if all summons in this phase killed
|
||||
foreach (var guid in Summons)
|
||||
{
|
||||
Creature visage = ObjectAccessor.GetCreature(me, guid);
|
||||
if (visage)
|
||||
{
|
||||
// Not all are dead
|
||||
if (visage.IsInPhase(summon))
|
||||
return;
|
||||
else
|
||||
{
|
||||
nextPhase = visage.GetPhases().First();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Roll Insanity
|
||||
var players = me.GetMap().GetPlayers();
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
for (uint index = 0; index <= 4; ++index)
|
||||
player.RemoveAurasDueToSpell(SpellIds.InsanityTarget + index);
|
||||
player.CastSpell(player, SpellIds.InsanityTarget + nextPhase - 173, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (insanityHandled != 0)
|
||||
{
|
||||
Initialize();
|
||||
|
||||
instance.SetBossState(DataTypes.HeraldVolazj, EncounterState.NotStarted);
|
||||
instance.DoStopCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievQuickDemiseStartEvent);
|
||||
|
||||
// Visible for all players in insanity
|
||||
me.SetInPhase(169, true, true);
|
||||
for (uint i = 173; i <= 177; ++i)
|
||||
me.SetInPhase(i, true, true);
|
||||
|
||||
ResetPlayersPhase();
|
||||
|
||||
// Cleanup
|
||||
Summons.DespawnAll();
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.SetControlled(false, UnitState.Stunned);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
Talk(TextIds.SayAggro);
|
||||
|
||||
instance.SetBossState(DataTypes.HeraldVolazj, EncounterState.InProgress);
|
||||
instance.DoStartCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievQuickDemiseStartEvent);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
Summons.Summon(summon);
|
||||
}
|
||||
|
||||
public override void SummonedCreatureDespawn(Creature summon)
|
||||
{
|
||||
uint nextPhase = 0;
|
||||
Summons.Despawn(summon);
|
||||
|
||||
// Check if all summons in this phase killed
|
||||
foreach (var guid in Summons)
|
||||
{
|
||||
Creature visage = ObjectAccessor.GetCreature(me, guid);
|
||||
if (visage)
|
||||
{
|
||||
// Not all are dead
|
||||
if (visage.IsInPhase(summon))
|
||||
return;
|
||||
else
|
||||
{
|
||||
nextPhase = visage.GetPhases().First();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Roll Insanity
|
||||
var players = me.GetMap().GetPlayers();
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
for (uint index = 0; index <= 4; ++index)
|
||||
player.RemoveAurasDueToSpell(SpellIds.InsanityTarget + index);
|
||||
player.CastSpell(player, SpellIds.InsanityTarget + nextPhase - 173, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
if (!Summons.Empty())
|
||||
return;
|
||||
|
||||
if (insanityHandled != 0)
|
||||
{
|
||||
if (!Summons.Empty())
|
||||
return;
|
||||
|
||||
insanityHandled = 0;
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.SetControlled(false, UnitState.Stunned);
|
||||
me.RemoveAurasDueToSpell(SpellIds.InsanityVisual);
|
||||
}
|
||||
|
||||
if (uiMindFlayTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SpellIds.MindFlay);
|
||||
uiMindFlayTimer = 20 * Time.InMilliseconds;
|
||||
} else uiMindFlayTimer -= diff;
|
||||
|
||||
if (uiShadowBoltVolleyTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SpellIds.ShadowBoltVolley);
|
||||
uiShadowBoltVolleyTimer = 5 * Time.InMilliseconds;
|
||||
} else uiShadowBoltVolleyTimer -= diff;
|
||||
|
||||
if (uiShiverTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0);
|
||||
if (target)
|
||||
DoCast(target, SpellIds.Shiver);
|
||||
uiShiverTimer = 15 * Time.InMilliseconds;
|
||||
} else uiShiverTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
insanityHandled = 0;
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.SetControlled(false, UnitState.Stunned);
|
||||
me.RemoveAurasDueToSpell(SpellIds.InsanityVisual);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
if (uiMindFlayTimer <= diff)
|
||||
{
|
||||
Talk(TextIds.SayDeath);
|
||||
|
||||
instance.SetBossState(DataTypes.HeraldVolazj, EncounterState.Done);
|
||||
|
||||
Summons.DespawnAll();
|
||||
ResetPlayersPhase();
|
||||
DoCastVictim(SpellIds.MindFlay);
|
||||
uiMindFlayTimer = 20 * Time.InMilliseconds;
|
||||
}
|
||||
else uiMindFlayTimer -= diff;
|
||||
|
||||
public override void KilledUnit(Unit who)
|
||||
if (uiShadowBoltVolleyTimer <= diff)
|
||||
{
|
||||
if (who.IsTypeId(TypeId.Player))
|
||||
Talk(TextIds.SaySlay);
|
||||
DoCastVictim(SpellIds.ShadowBoltVolley);
|
||||
uiShadowBoltVolleyTimer = 5 * Time.InMilliseconds;
|
||||
}
|
||||
else uiShadowBoltVolleyTimer -= diff;
|
||||
|
||||
InstanceScript instance;
|
||||
if (uiShiverTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0);
|
||||
if (target)
|
||||
DoCast(target, SpellIds.Shiver);
|
||||
uiShiverTimer = 15 * Time.InMilliseconds;
|
||||
}
|
||||
else uiShiverTimer -= diff;
|
||||
|
||||
uint uiMindFlayTimer;
|
||||
uint uiShadowBoltVolleyTimer;
|
||||
uint uiShiverTimer;
|
||||
uint insanityHandled;
|
||||
SummonList Summons;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
return GetInstanceAI<boss_volazjAI>(creature);
|
||||
Talk(TextIds.SayDeath);
|
||||
|
||||
instance.SetBossState(DataTypes.HeraldVolazj, EncounterState.Done);
|
||||
|
||||
Summons.DespawnAll();
|
||||
ResetPlayersPhase();
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit who)
|
||||
{
|
||||
if (who.IsTypeId(TypeId.Player))
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
uint uiMindFlayTimer;
|
||||
uint uiShadowBoltVolleyTimer;
|
||||
uint uiShiverTimer;
|
||||
uint insanityHandled;
|
||||
SummonList Summons;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,527 +58,497 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.JedogaShadowseeker
|
||||
}
|
||||
|
||||
[Script]
|
||||
class boss_jedoga_shadowseeker : CreatureScript
|
||||
public class boss_jedoga_shadowseeker : ScriptedAI
|
||||
{
|
||||
public boss_jedoga_shadowseeker() : base("boss_jedoga_shadowseeker") { }
|
||||
|
||||
public class boss_jedoga_shadowseekerAI : ScriptedAI
|
||||
public boss_jedoga_shadowseeker(Creature creature) : base(creature)
|
||||
{
|
||||
public boss_jedoga_shadowseekerAI(Creature creature) : base(creature)
|
||||
instance = creature.GetInstanceScript();
|
||||
bFirstTime = true;
|
||||
bPreDone = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiOpFerTimer = RandomHelper.URand(15 * Time.InMilliseconds, 20 * Time.InMilliseconds);
|
||||
|
||||
uiCycloneTimer = 3 * Time.InMilliseconds;
|
||||
uiBoltTimer = 7 * Time.InMilliseconds;
|
||||
uiThunderTimer = 12 * Time.InMilliseconds;
|
||||
|
||||
bOpFerok = false;
|
||||
bOpFerokFail = false;
|
||||
bOnGround = false;
|
||||
bCanDown = false;
|
||||
volunteerWork = true;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
|
||||
DoCast(SpellIds.RandomLightningVisual);
|
||||
|
||||
if (!bFirstTime)
|
||||
instance.SetBossState(DataTypes.JedogaShadowseeker, EncounterState.Fail);
|
||||
|
||||
instance.SetGuidData(DataTypes.PlJedogaTarget, ObjectGuid.Empty);
|
||||
instance.SetGuidData(DataTypes.AddJedogaVictim, ObjectGuid.Empty);
|
||||
instance.SetData(DataTypes.JedogaResetInitiands, 0);
|
||||
MoveUp();
|
||||
|
||||
bFirstTime = false;
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
if (instance == null || (who.GetTypeId() == TypeId.Unit && who.GetEntry() == AKCreatureIds.JedogaController))
|
||||
return;
|
||||
|
||||
Talk(TextIds.SayAggro);
|
||||
me.SetInCombatWithZone();
|
||||
instance.SetBossState(DataTypes.JedogaShadowseeker, EncounterState.InProgress);
|
||||
}
|
||||
|
||||
public override void AttackStart(Unit who)
|
||||
{
|
||||
if (!who || (who.GetTypeId() == TypeId.Unit && who.GetEntry() == AKCreatureIds.JedogaController))
|
||||
return;
|
||||
|
||||
base.AttackStart(who);
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit Victim)
|
||||
{
|
||||
if (!Victim || !Victim.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
Talk(TextIds.SayDeath);
|
||||
instance.SetBossState(DataTypes.JedogaShadowseeker, EncounterState.Done);
|
||||
}
|
||||
|
||||
public override void DoAction(int action)
|
||||
{
|
||||
if (action == Misc.ActionInitiateKilled)
|
||||
volunteerWork = false;
|
||||
}
|
||||
|
||||
public override uint GetData(uint type)
|
||||
{
|
||||
if (type == Misc.DataVolunteerWork)
|
||||
return volunteerWork ? 1 : 0u;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void MoveInLineOfSight(Unit who)
|
||||
{
|
||||
if (instance == null || !who || (who.IsTypeId(TypeId.Unit) && who.GetEntry() == AKCreatureIds.JedogaController))
|
||||
return;
|
||||
|
||||
if (!bPreDone && who.IsTypeId(TypeId.Player) && me.GetDistance(who) < 100.0f)
|
||||
{
|
||||
instance = creature.GetInstanceScript();
|
||||
bFirstTime = true;
|
||||
bPreDone = false;
|
||||
Talk(TextIds.SayPreaching);
|
||||
bPreDone = true;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress || !bOnGround)
|
||||
return;
|
||||
|
||||
if (!me.GetVictim() && me.CanCreatureAttack(who))
|
||||
{
|
||||
uiOpFerTimer = RandomHelper.URand(15 * Time.InMilliseconds, 20 * Time.InMilliseconds);
|
||||
|
||||
uiCycloneTimer = 3 * Time.InMilliseconds;
|
||||
uiBoltTimer = 7 * Time.InMilliseconds;
|
||||
uiThunderTimer = 12 * Time.InMilliseconds;
|
||||
|
||||
bOpFerok = false;
|
||||
bOpFerokFail = false;
|
||||
bOnGround = false;
|
||||
bCanDown = false;
|
||||
volunteerWork = true;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
|
||||
DoCast(SpellIds.RandomLightningVisual);
|
||||
|
||||
if (!bFirstTime)
|
||||
instance.SetBossState(DataTypes.JedogaShadowseeker, EncounterState.Fail);
|
||||
|
||||
instance.SetGuidData(DataTypes.PlJedogaTarget, ObjectGuid.Empty);
|
||||
instance.SetGuidData(DataTypes.AddJedogaVictim, ObjectGuid.Empty);
|
||||
instance.SetData(DataTypes.JedogaResetInitiands, 0);
|
||||
MoveUp();
|
||||
|
||||
bFirstTime = false;
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
if (instance == null || (who.GetTypeId() == TypeId.Unit && who.GetEntry() == AKCreatureIds.JedogaController))
|
||||
return;
|
||||
|
||||
Talk(TextIds.SayAggro);
|
||||
me.SetInCombatWithZone();
|
||||
instance.SetBossState(DataTypes.JedogaShadowseeker, EncounterState.InProgress);
|
||||
}
|
||||
|
||||
public override void AttackStart(Unit who)
|
||||
{
|
||||
if (!who || (who.GetTypeId() == TypeId.Unit && who.GetEntry() == AKCreatureIds.JedogaController))
|
||||
return;
|
||||
|
||||
base.AttackStart(who);
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit Victim)
|
||||
{
|
||||
if (!Victim || !Victim.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
Talk(TextIds.SayDeath);
|
||||
instance.SetBossState(DataTypes.JedogaShadowseeker, EncounterState.Done);
|
||||
}
|
||||
|
||||
public override void DoAction(int action)
|
||||
{
|
||||
if (action == Misc.ActionInitiateKilled)
|
||||
volunteerWork = false;
|
||||
}
|
||||
|
||||
public override uint GetData(uint type)
|
||||
{
|
||||
if (type == Misc.DataVolunteerWork)
|
||||
return volunteerWork ? 1 : 0u;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void MoveInLineOfSight(Unit who)
|
||||
{
|
||||
if (instance == null || !who || (who.IsTypeId(TypeId.Unit) && who.GetEntry() == AKCreatureIds.JedogaController))
|
||||
return;
|
||||
|
||||
if (!bPreDone && who.IsTypeId(TypeId.Player) && me.GetDistance(who) < 100.0f)
|
||||
float attackRadius = me.GetAttackDistance(who);
|
||||
if (me.IsWithinDistInMap(who, attackRadius) && me.IsWithinLOSInMap(who))
|
||||
{
|
||||
Talk(TextIds.SayPreaching);
|
||||
bPreDone = true;
|
||||
}
|
||||
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress || !bOnGround)
|
||||
return;
|
||||
|
||||
if (!me.GetVictim() && me.CanCreatureAttack(who))
|
||||
{
|
||||
float attackRadius = me.GetAttackDistance(who);
|
||||
if (me.IsWithinDistInMap(who, attackRadius) && me.IsWithinLOSInMap(who))
|
||||
if (!me.GetVictim())
|
||||
{
|
||||
if (!me.GetVictim())
|
||||
{
|
||||
who.RemoveAurasByType(AuraType.ModStealth);
|
||||
AttackStart(who);
|
||||
}
|
||||
else
|
||||
{
|
||||
who.SetInCombatWith(me);
|
||||
me.AddThreat(who, 0.0f);
|
||||
}
|
||||
who.RemoveAurasByType(AuraType.ModStealth);
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MoveDown()
|
||||
{
|
||||
bOpFerokFail = false;
|
||||
|
||||
instance.SetData(DataTypes.JedogaTriggerSwitch, 0);
|
||||
me.GetMotionMaster().MovePoint(1, Misc.JedogaPosition[1]);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
|
||||
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
|
||||
|
||||
bOnGround = true;
|
||||
|
||||
if (UpdateVictim())
|
||||
{
|
||||
AttackStart(me.GetVictim());
|
||||
me.GetMotionMaster().MoveChase(me.GetVictim());
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit target = Global.ObjAccessor.GetUnit(me, instance.GetGuidData(DataTypes.PlJedogaTarget));
|
||||
if (target)
|
||||
{
|
||||
AttackStart(target);
|
||||
instance.SetData(DataTypes.JedogaResetInitiands, 0);
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress)
|
||||
EnterCombat(target);
|
||||
}
|
||||
else if (!me.IsInCombat())
|
||||
EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
|
||||
void MoveUp()
|
||||
{
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
|
||||
me.AttackStop();
|
||||
me.RemoveAllAuras();
|
||||
me.LoadCreaturesAddon();
|
||||
me.GetMotionMaster().MovePoint(0, Misc.JedogaPosition[0]);
|
||||
|
||||
instance.SetData(DataTypes.JedogaTriggerSwitch, 1);
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress)
|
||||
GetVictimForSacrifice();
|
||||
|
||||
bOnGround = false;
|
||||
uiOpFerTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
|
||||
void GetVictimForSacrifice()
|
||||
{
|
||||
ObjectGuid victim = instance.GetGuidData(DataTypes.AddJedogaInitiand);
|
||||
if (!victim.IsEmpty())
|
||||
{
|
||||
Talk(TextIds.SaySacrifice1);
|
||||
instance.SetGuidData(DataTypes.AddJedogaVictim, victim);
|
||||
}
|
||||
else
|
||||
bCanDown = true;
|
||||
}
|
||||
|
||||
void Sacrifice()
|
||||
{
|
||||
Talk(TextIds.SaySacrifice2);
|
||||
|
||||
me.InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SpellIds.GiftOfTheHerald, false);
|
||||
|
||||
bOpFerok = false;
|
||||
bCanDown = true;
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress && instance.GetData(DataTypes.AllInitiandDead) != 0)
|
||||
MoveDown();
|
||||
|
||||
if (bOpFerok && !bOnGround && !bCanDown)
|
||||
Sacrifice();
|
||||
|
||||
if (bOpFerokFail && !bOnGround && !bCanDown)
|
||||
bCanDown = true;
|
||||
|
||||
if (bCanDown)
|
||||
{
|
||||
MoveDown();
|
||||
bCanDown = false;
|
||||
}
|
||||
|
||||
if (bOnGround)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiCycloneTimer <= diff)
|
||||
{
|
||||
DoCast(me, SpellIds.CycloneStrike, false);
|
||||
uiCycloneTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
else uiCycloneTimer -= diff;
|
||||
|
||||
if (uiBoltTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 100, true);
|
||||
if (target)
|
||||
me.CastSpell(target, SpellIds.LightningBolt, false);
|
||||
|
||||
uiBoltTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
else uiBoltTimer -= diff;
|
||||
|
||||
if (uiThunderTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 100, true);
|
||||
if (target)
|
||||
me.CastSpell(target, SpellIds.Thundershock, false);
|
||||
|
||||
uiThunderTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
else uiThunderTimer -= diff;
|
||||
|
||||
if (uiOpFerTimer <= diff)
|
||||
MoveUp();
|
||||
else
|
||||
uiOpFerTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
{
|
||||
who.SetInCombatWith(me);
|
||||
me.AddThreat(who, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
uint uiOpFerTimer;
|
||||
uint uiCycloneTimer;
|
||||
uint uiBoltTimer;
|
||||
uint uiThunderTimer;
|
||||
|
||||
bool bPreDone;
|
||||
public bool bOpFerok;
|
||||
bool bOnGround;
|
||||
public bool bOpFerokFail;
|
||||
bool bCanDown;
|
||||
bool volunteerWork;
|
||||
bool bFirstTime;
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
void MoveDown()
|
||||
{
|
||||
return GetInstanceAI<boss_jedoga_shadowseekerAI>(creature);
|
||||
bOpFerokFail = false;
|
||||
|
||||
instance.SetData(DataTypes.JedogaTriggerSwitch, 0);
|
||||
me.GetMotionMaster().MovePoint(1, Misc.JedogaPosition[1]);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
|
||||
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
|
||||
|
||||
bOnGround = true;
|
||||
|
||||
if (UpdateVictim())
|
||||
{
|
||||
AttackStart(me.GetVictim());
|
||||
me.GetMotionMaster().MoveChase(me.GetVictim());
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit target = Global.ObjAccessor.GetUnit(me, instance.GetGuidData(DataTypes.PlJedogaTarget));
|
||||
if (target)
|
||||
{
|
||||
AttackStart(target);
|
||||
instance.SetData(DataTypes.JedogaResetInitiands, 0);
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress)
|
||||
EnterCombat(target);
|
||||
}
|
||||
else if (!me.IsInCombat())
|
||||
EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
|
||||
void MoveUp()
|
||||
{
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
|
||||
me.AttackStop();
|
||||
me.RemoveAllAuras();
|
||||
me.LoadCreaturesAddon();
|
||||
me.GetMotionMaster().MovePoint(0, Misc.JedogaPosition[0]);
|
||||
|
||||
instance.SetData(DataTypes.JedogaTriggerSwitch, 1);
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress)
|
||||
GetVictimForSacrifice();
|
||||
|
||||
bOnGround = false;
|
||||
uiOpFerTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
|
||||
void GetVictimForSacrifice()
|
||||
{
|
||||
ObjectGuid victim = instance.GetGuidData(DataTypes.AddJedogaInitiand);
|
||||
if (!victim.IsEmpty())
|
||||
{
|
||||
Talk(TextIds.SaySacrifice1);
|
||||
instance.SetGuidData(DataTypes.AddJedogaVictim, victim);
|
||||
}
|
||||
else
|
||||
bCanDown = true;
|
||||
}
|
||||
|
||||
void Sacrifice()
|
||||
{
|
||||
Talk(TextIds.SaySacrifice2);
|
||||
|
||||
me.InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SpellIds.GiftOfTheHerald, false);
|
||||
|
||||
bOpFerok = false;
|
||||
bCanDown = true;
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress && instance.GetData(DataTypes.AllInitiandDead) != 0)
|
||||
MoveDown();
|
||||
|
||||
if (bOpFerok && !bOnGround && !bCanDown)
|
||||
Sacrifice();
|
||||
|
||||
if (bOpFerokFail && !bOnGround && !bCanDown)
|
||||
bCanDown = true;
|
||||
|
||||
if (bCanDown)
|
||||
{
|
||||
MoveDown();
|
||||
bCanDown = false;
|
||||
}
|
||||
|
||||
if (bOnGround)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiCycloneTimer <= diff)
|
||||
{
|
||||
DoCast(me, SpellIds.CycloneStrike, false);
|
||||
uiCycloneTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
else uiCycloneTimer -= diff;
|
||||
|
||||
if (uiBoltTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 100, true);
|
||||
if (target)
|
||||
me.CastSpell(target, SpellIds.LightningBolt, false);
|
||||
|
||||
uiBoltTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
else uiBoltTimer -= diff;
|
||||
|
||||
if (uiThunderTimer <= diff)
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 100, true);
|
||||
if (target)
|
||||
me.CastSpell(target, SpellIds.Thundershock, false);
|
||||
|
||||
uiThunderTimer = RandomHelper.URand(15 * Time.InMilliseconds, 30 * Time.InMilliseconds);
|
||||
}
|
||||
else uiThunderTimer -= diff;
|
||||
|
||||
if (uiOpFerTimer <= diff)
|
||||
MoveUp();
|
||||
else
|
||||
uiOpFerTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
uint uiOpFerTimer;
|
||||
uint uiCycloneTimer;
|
||||
uint uiBoltTimer;
|
||||
uint uiThunderTimer;
|
||||
|
||||
bool bPreDone;
|
||||
public bool bOpFerok;
|
||||
bool bOnGround;
|
||||
public bool bOpFerokFail;
|
||||
bool bCanDown;
|
||||
bool volunteerWork;
|
||||
bool bFirstTime;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_jedoga_twilight_volunteer : CreatureScript
|
||||
class npc_jedoga_twilight_volunteer : ScriptedAI
|
||||
{
|
||||
public npc_jedoga_twilight_volunteer() : base("npc_jedoga_initiand") { }
|
||||
|
||||
class npc_jedoga_twilight_volunteerAI : ScriptedAI
|
||||
public npc_jedoga_twilight_volunteer(Creature creature) : base(creature)
|
||||
{
|
||||
public npc_jedoga_twilight_volunteerAI(Creature creature) : base(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature.GetInstanceScript();
|
||||
}
|
||||
Initialize();
|
||||
instance = creature.GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
void Initialize()
|
||||
{
|
||||
bWalking = false;
|
||||
bCheckTimer = 2 * Time.InMilliseconds;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress)
|
||||
{
|
||||
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoCast(me, SpellIds.SphereVisual, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
if (!killer || instance == null)
|
||||
return;
|
||||
|
||||
if (bWalking)
|
||||
{
|
||||
Creature boss = ObjectAccessor.GetCreature(me, instance.GetGuidData(DataTypes.JedogaShadowseeker));
|
||||
if (boss)
|
||||
{
|
||||
if (!boss.GetAI<boss_jedoga_shadowseeker>().bOpFerok)
|
||||
boss.GetAI<boss_jedoga_shadowseeker>().bOpFerokFail = true;
|
||||
|
||||
if (killer.IsTypeId(TypeId.Player))
|
||||
boss.GetAI().DoAction(Misc.ActionInitiateKilled);
|
||||
}
|
||||
|
||||
instance.SetGuidData(DataTypes.AddJedogaVictim, ObjectGuid.Empty);
|
||||
|
||||
bWalking = false;
|
||||
bCheckTimer = 2 * Time.InMilliseconds;
|
||||
}
|
||||
if (killer.IsTypeId(TypeId.Player))
|
||||
instance.SetGuidData(DataTypes.PlJedogaTarget, killer.GetGUID());
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void AttackStart(Unit victim)
|
||||
{
|
||||
if ((instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress) || !victim)
|
||||
return;
|
||||
|
||||
base.AttackStart(victim);
|
||||
}
|
||||
|
||||
public override void MoveInLineOfSight(Unit who)
|
||||
{
|
||||
if ((instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress) || !who)
|
||||
return;
|
||||
|
||||
base.MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
public override void MovementInform(MovementGeneratorType uiType, uint uiPointId)
|
||||
{
|
||||
if (uiType != MovementGeneratorType.Point || instance == null)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
{
|
||||
Initialize();
|
||||
case 1:
|
||||
{
|
||||
Creature boss = me.GetMap().GetCreature(instance.GetGuidData(DataTypes.JedogaShadowseeker));
|
||||
if (boss)
|
||||
{
|
||||
boss.GetAI<boss_jedoga_shadowseeker>().bOpFerok = true;
|
||||
boss.GetAI<boss_jedoga_shadowseeker>().bOpFerokFail = false;
|
||||
me.KillSelf();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress)
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (bCheckTimer <= diff)
|
||||
{
|
||||
if (me.GetGUID() == instance.GetGuidData(DataTypes.AddJedogaVictim) && !bWalking)
|
||||
{
|
||||
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
|
||||
float distance = me.GetDistance(Misc.JedogaPosition[1]);
|
||||
|
||||
if (distance < 9.0f)
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 0.5f);
|
||||
else if (distance < 15.0f)
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 0.75f);
|
||||
else if (distance < 20.0f)
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 1.0f);
|
||||
|
||||
me.GetMotionMaster().Clear(false);
|
||||
me.GetMotionMaster().MovePoint(1, Misc.JedogaPosition[1]);
|
||||
bWalking = true;
|
||||
}
|
||||
else
|
||||
if (!bWalking)
|
||||
{
|
||||
DoCast(me, SpellIds.SphereVisual, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
if (!killer || instance == null)
|
||||
return;
|
||||
|
||||
if (bWalking)
|
||||
{
|
||||
Creature boss = ObjectAccessor.GetCreature(me, instance.GetGuidData(DataTypes.JedogaShadowseeker));
|
||||
if (boss)
|
||||
{
|
||||
if (!boss.GetAI<boss_jedoga_shadowseeker.boss_jedoga_shadowseekerAI>().bOpFerok)
|
||||
boss.GetAI<boss_jedoga_shadowseeker.boss_jedoga_shadowseekerAI>().bOpFerokFail = true;
|
||||
|
||||
if (killer.IsTypeId(TypeId.Player))
|
||||
boss.GetAI().DoAction(Misc.ActionInitiateKilled);
|
||||
}
|
||||
|
||||
instance.SetGuidData(DataTypes.AddJedogaVictim, ObjectGuid.Empty);
|
||||
|
||||
bWalking = false;
|
||||
}
|
||||
if (killer.IsTypeId(TypeId.Player))
|
||||
instance.SetGuidData(DataTypes.PlJedogaTarget, killer.GetGUID());
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void AttackStart(Unit victim)
|
||||
{
|
||||
if ((instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress) || !victim)
|
||||
return;
|
||||
|
||||
base.AttackStart(victim);
|
||||
}
|
||||
|
||||
public override void MoveInLineOfSight(Unit who)
|
||||
{
|
||||
if ((instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress) || !who)
|
||||
return;
|
||||
|
||||
base.MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
public override void MovementInform(MovementGeneratorType uiType, uint uiPointId)
|
||||
{
|
||||
if (uiType != MovementGeneratorType.Point || instance == null)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Creature boss = me.GetMap().GetCreature(instance.GetGuidData(DataTypes.JedogaShadowseeker));
|
||||
if (boss)
|
||||
{
|
||||
boss.GetAI<boss_jedoga_shadowseeker.boss_jedoga_shadowseekerAI>().bOpFerok = true;
|
||||
boss.GetAI<boss_jedoga_shadowseeker.boss_jedoga_shadowseekerAI>().bOpFerokFail = false;
|
||||
me.KillSelf();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (bCheckTimer <= diff)
|
||||
{
|
||||
if (me.GetGUID() == instance.GetGuidData(DataTypes.AddJedogaVictim) && !bWalking)
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress && me.HasAura(SpellIds.SphereVisual))
|
||||
{
|
||||
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
|
||||
float distance = me.GetDistance(Misc.JedogaPosition[1]);
|
||||
|
||||
if (distance < 9.0f)
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 0.5f);
|
||||
else if (distance < 15.0f)
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 0.75f);
|
||||
else if (distance < 20.0f)
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 1.0f);
|
||||
|
||||
me.GetMotionMaster().Clear(false);
|
||||
me.GetMotionMaster().MovePoint(1, Misc.JedogaPosition[1]);
|
||||
bWalking = true;
|
||||
}
|
||||
if (!bWalking)
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress && !me.HasAura(SpellIds.SphereVisual))
|
||||
{
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) != EncounterState.InProgress && me.HasAura(SpellIds.SphereVisual))
|
||||
{
|
||||
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
}
|
||||
if (instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress && !me.HasAura(SpellIds.SphereVisual))
|
||||
{
|
||||
DoCast(me, SpellIds.SphereVisual, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
}
|
||||
DoCast(me, SpellIds.SphereVisual, false);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
|
||||
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
|
||||
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
|
||||
}
|
||||
bCheckTimer = 2 * Time.InMilliseconds;
|
||||
}
|
||||
else bCheckTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
bCheckTimer = 2 * Time.InMilliseconds;
|
||||
}
|
||||
else bCheckTimer -= diff;
|
||||
|
||||
InstanceScript instance;
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
uint bCheckTimer;
|
||||
bool bWalking;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return GetInstanceAI<npc_jedoga_twilight_volunteerAI>(creature);
|
||||
}
|
||||
InstanceScript instance;
|
||||
|
||||
uint bCheckTimer;
|
||||
bool bWalking;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_jedoga_controller : CreatureScript
|
||||
class npc_jedoga_controller : ScriptedAI
|
||||
{
|
||||
public npc_jedoga_controller() : base("npc_jedogas_aufseher_trigger") { }
|
||||
|
||||
class npc_jedoga_controllerAI : ScriptedAI
|
||||
public npc_jedoga_controller(Creature creature) : base(creature)
|
||||
{
|
||||
public npc_jedoga_controllerAI(Creature creature) : base(creature)
|
||||
{
|
||||
instance = creature.GetInstanceScript();
|
||||
bRemoved = false;
|
||||
bRemoved2 = false;
|
||||
bCast = false;
|
||||
bCast2 = false;
|
||||
instance = creature.GetInstanceScript();
|
||||
bRemoved = false;
|
||||
bRemoved2 = false;
|
||||
bCast = false;
|
||||
bCast2 = false;
|
||||
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
public override void Reset() { }
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void AttackStart(Unit victim) { }
|
||||
|
||||
public override void MoveInLineOfSight(Unit who) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!bRemoved && me.GetPositionX() > 440.0f)
|
||||
{
|
||||
if (instance.GetBossState(DataTypes.PrinceTaldaram) == EncounterState.Done)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
bRemoved = true;
|
||||
return;
|
||||
}
|
||||
if (!bCast)
|
||||
{
|
||||
//DoCast(me, JedogaShadowseekerConst.SpellBeamVisualJedogasAufseher1, false);
|
||||
bCast = true;
|
||||
}
|
||||
}
|
||||
if (!bRemoved2 && me.GetPositionX() < 440.0f)
|
||||
{
|
||||
if (!bCast2 && instance.GetData(DataTypes.JedogaTriggerSwitch) != 0)
|
||||
{
|
||||
//DoCast(me, JedogaShadowseekerConst.SpellBeamVisualJedogasAufseher2, false);
|
||||
bCast2 = true;
|
||||
}
|
||||
if (bCast2 && instance.GetData(DataTypes.JedogaTriggerSwitch) == 0)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
bCast2 = false;
|
||||
}
|
||||
if (!bRemoved2 && instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.Done)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
bRemoved2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
bool bRemoved;
|
||||
bool bRemoved2;
|
||||
bool bCast;
|
||||
bool bCast2;
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void Reset() { }
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void AttackStart(Unit victim) { }
|
||||
|
||||
public override void MoveInLineOfSight(Unit who) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
return GetInstanceAI<npc_jedoga_controllerAI>(creature);
|
||||
if (!bRemoved && me.GetPositionX() > 440.0f)
|
||||
{
|
||||
if (instance.GetBossState(DataTypes.PrinceTaldaram) == EncounterState.Done)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
bRemoved = true;
|
||||
return;
|
||||
}
|
||||
if (!bCast)
|
||||
{
|
||||
//DoCast(me, JedogaShadowseekerConst.SpellBeamVisualJedogasAufseher1, false);
|
||||
bCast = true;
|
||||
}
|
||||
}
|
||||
if (!bRemoved2 && me.GetPositionX() < 440.0f)
|
||||
{
|
||||
if (!bCast2 && instance.GetData(DataTypes.JedogaTriggerSwitch) != 0)
|
||||
{
|
||||
//DoCast(me, JedogaShadowseekerConst.SpellBeamVisualJedogasAufseher2, false);
|
||||
bCast2 = true;
|
||||
}
|
||||
if (bCast2 && instance.GetData(DataTypes.JedogaTriggerSwitch) == 0)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
bCast2 = false;
|
||||
}
|
||||
if (!bRemoved2 && instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.Done)
|
||||
{
|
||||
me.InterruptNonMeleeSpells(true);
|
||||
bRemoved2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript instance;
|
||||
|
||||
bool bRemoved;
|
||||
bool bRemoved2;
|
||||
bool bCast;
|
||||
bool bCast2;
|
||||
}
|
||||
|
||||
[Script]
|
||||
|
||||
@@ -82,303 +82,283 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.PrinceTaldaram
|
||||
}
|
||||
|
||||
[Script]
|
||||
class boss_prince_taldaram : CreatureScript
|
||||
public class boss_prince_taldaram : BossAI
|
||||
{
|
||||
public boss_prince_taldaram() : base("boss_prince_taldaram") { }
|
||||
|
||||
public class boss_prince_taldaramAI : BossAI
|
||||
public boss_prince_taldaram(Creature creature) : base(creature, DataTypes.PrinceTaldaram)
|
||||
{
|
||||
public boss_prince_taldaramAI(Creature creature) : base(creature, DataTypes.PrinceTaldaram)
|
||||
me.SetDisableGravity(true);
|
||||
_embraceTakenDamage = 0;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_Reset();
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_embraceTargetGUID.Clear();
|
||||
_embraceTakenDamage = 0;
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(TextIds.SayAggro);
|
||||
_events.ScheduleEvent(Misc.EventBloodthirst, 10000);
|
||||
_events.ScheduleEvent(Misc.EventVanish, RandomHelper.URand(25000, 35000));
|
||||
_events.ScheduleEvent(Misc.EventConjureFlameSpheres, 5000);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
base.JustSummoned(summon);
|
||||
|
||||
switch (summon.GetEntry())
|
||||
{
|
||||
me.SetDisableGravity(true);
|
||||
_embraceTakenDamage = 0;
|
||||
case CreatureIds.FlameSphere1:
|
||||
case CreatureIds.FlameSphere2:
|
||||
case CreatureIds.FlameSphere3:
|
||||
summon.GetAI().SetGUID(_flameSphereTargetGUID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_events.ExecuteEvents(eventId =>
|
||||
{
|
||||
_Reset();
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_embraceTargetGUID.Clear();
|
||||
_embraceTakenDamage = 0;
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(TextIds.SayAggro);
|
||||
_events.ScheduleEvent(Misc.EventBloodthirst, 10000);
|
||||
_events.ScheduleEvent(Misc.EventVanish, RandomHelper.URand(25000, 35000));
|
||||
_events.ScheduleEvent(Misc.EventConjureFlameSpheres, 5000);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
base.JustSummoned(summon);
|
||||
|
||||
switch (summon.GetEntry())
|
||||
switch (eventId)
|
||||
{
|
||||
case CreatureIds.FlameSphere1:
|
||||
case CreatureIds.FlameSphere2:
|
||||
case CreatureIds.FlameSphere3:
|
||||
summon.GetAI().SetGUID(_flameSphereTargetGUID);
|
||||
case Misc.EventBloodthirst:
|
||||
DoCast(me, SpellIds.Bloodthirst);
|
||||
_events.ScheduleEvent(Misc.EventBloodthirst, 10000);
|
||||
break;
|
||||
case Misc.EventConjureFlameSpheres:
|
||||
// random target?
|
||||
Unit victim = me.GetVictim();
|
||||
if (victim)
|
||||
{
|
||||
_flameSphereTargetGUID = victim.GetGUID();
|
||||
DoCast(victim, SpellIds.ConjureFlameSphere);
|
||||
}
|
||||
_events.ScheduleEvent(Misc.EventConjureFlameSpheres, 15000);
|
||||
break;
|
||||
case Misc.EventVanish:
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
uint targets = 0;
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player && player.IsAlive())
|
||||
++targets;
|
||||
}
|
||||
|
||||
if (targets > 2)
|
||||
{
|
||||
Talk(TextIds.SayVanish);
|
||||
DoCast(me, SpellIds.Vanish);
|
||||
me.SetInCombatState(true); // Prevents the boss from resetting
|
||||
_events.DelayEvents(500);
|
||||
_events.ScheduleEvent(Misc.EventJustVanished, 500);
|
||||
Unit embraceTarget = SelectTarget(SelectAggroTarget.Random, 0, 100.0f, true);
|
||||
if (embraceTarget)
|
||||
_embraceTargetGUID = embraceTarget.GetGUID();
|
||||
}
|
||||
_events.ScheduleEvent(Misc.EventVanish, RandomHelper.URand(25000, 35000));
|
||||
break;
|
||||
}
|
||||
case Misc.EventJustVanished:
|
||||
{
|
||||
Unit embraceTarget = GetEmbraceTarget();
|
||||
if (embraceTarget)
|
||||
{
|
||||
me.GetMotionMaster().Clear();
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 2.0f);
|
||||
me.GetMotionMaster().MoveChase(embraceTarget);
|
||||
}
|
||||
_events.ScheduleEvent(Misc.EventVanished, 1300);
|
||||
}
|
||||
break;
|
||||
case Misc.EventVanished:
|
||||
{
|
||||
Unit embraceTarget = GetEmbraceTarget();
|
||||
if (embraceTarget)
|
||||
DoCast(embraceTarget, SpellIds.EmbraceOfTheVampyr);
|
||||
Talk(TextIds.SayFeed);
|
||||
me.GetMotionMaster().Clear();
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 1.0f);
|
||||
me.GetMotionMaster().MoveChase(me.GetVictim());
|
||||
_events.ScheduleEvent(Misc.EventFeeding, 20000);
|
||||
}
|
||||
break;
|
||||
case Misc.EventFeeding:
|
||||
_embraceTargetGUID.Clear();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit doneBy, ref uint damage)
|
||||
{
|
||||
Unit embraceTarget = GetEmbraceTarget();
|
||||
|
||||
if (embraceTarget && embraceTarget.IsAlive())
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me.HasUnitState(UnitState.Casting))
|
||||
return;
|
||||
|
||||
_events.ExecuteEvents(eventId =>
|
||||
_embraceTakenDamage += damage;
|
||||
if (_embraceTakenDamage > DungeonMode<uint>(Misc.DataEmbraceDmg, Misc.DataEmbraceDmgH))
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case Misc.EventBloodthirst:
|
||||
DoCast(me, SpellIds.Bloodthirst);
|
||||
_events.ScheduleEvent(Misc.EventBloodthirst, 10000);
|
||||
break;
|
||||
case Misc.EventConjureFlameSpheres:
|
||||
// random target?
|
||||
Unit victim = me.GetVictim();
|
||||
if (victim)
|
||||
{
|
||||
_flameSphereTargetGUID = victim.GetGUID();
|
||||
DoCast(victim, SpellIds.ConjureFlameSphere);
|
||||
}
|
||||
_events.ScheduleEvent(Misc.EventConjureFlameSpheres, 15000);
|
||||
break;
|
||||
case Misc.EventVanish:
|
||||
{
|
||||
var players = me.GetMap().GetPlayers();
|
||||
uint targets = 0;
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player && player.IsAlive())
|
||||
++targets;
|
||||
}
|
||||
|
||||
if (targets > 2)
|
||||
{
|
||||
Talk(TextIds.SayVanish);
|
||||
DoCast(me, SpellIds.Vanish);
|
||||
me.SetInCombatState(true); // Prevents the boss from resetting
|
||||
_events.DelayEvents(500);
|
||||
_events.ScheduleEvent(Misc.EventJustVanished, 500);
|
||||
Unit embraceTarget = SelectTarget(SelectAggroTarget.Random, 0, 100.0f, true);
|
||||
if (embraceTarget)
|
||||
_embraceTargetGUID = embraceTarget.GetGUID();
|
||||
}
|
||||
_events.ScheduleEvent(Misc.EventVanish, RandomHelper.URand(25000, 35000));
|
||||
break;
|
||||
}
|
||||
case Misc.EventJustVanished:
|
||||
{
|
||||
Unit embraceTarget = GetEmbraceTarget();
|
||||
if (embraceTarget)
|
||||
{
|
||||
me.GetMotionMaster().Clear();
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 2.0f);
|
||||
me.GetMotionMaster().MoveChase(embraceTarget);
|
||||
}
|
||||
_events.ScheduleEvent(Misc.EventVanished, 1300);
|
||||
}
|
||||
break;
|
||||
case Misc.EventVanished:
|
||||
{
|
||||
Unit embraceTarget = GetEmbraceTarget();
|
||||
if (embraceTarget)
|
||||
DoCast(embraceTarget, SpellIds.EmbraceOfTheVampyr);
|
||||
Talk(TextIds.SayFeed);
|
||||
me.GetMotionMaster().Clear();
|
||||
me.SetSpeedRate(UnitMoveType.Walk, 1.0f);
|
||||
me.GetMotionMaster().MoveChase(me.GetVictim());
|
||||
_events.ScheduleEvent(Misc.EventFeeding, 20000);
|
||||
}
|
||||
break;
|
||||
case Misc.EventFeeding:
|
||||
_embraceTargetGUID.Clear();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit doneBy, ref uint damage)
|
||||
{
|
||||
Unit embraceTarget = GetEmbraceTarget();
|
||||
|
||||
if (embraceTarget && embraceTarget.IsAlive())
|
||||
{
|
||||
_embraceTakenDamage += damage;
|
||||
if (_embraceTakenDamage > DungeonMode<uint>(Misc.DataEmbraceDmg, Misc.DataEmbraceDmgH))
|
||||
{
|
||||
_embraceTargetGUID.Clear();
|
||||
me.CastStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
Talk(TextIds.SayDeath);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit victim)
|
||||
{
|
||||
if (!victim.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
if (victim.GetGUID() == _embraceTargetGUID)
|
||||
_embraceTargetGUID.Clear();
|
||||
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
public bool CheckSpheres()
|
||||
{
|
||||
for (byte i = 0; i < 2; ++i)
|
||||
{
|
||||
if (instance.GetData(DataTypes.Sphere1 + i) == 0)
|
||||
return false;
|
||||
me.CastStop();
|
||||
}
|
||||
|
||||
RemovePrison();
|
||||
return true;
|
||||
}
|
||||
|
||||
Unit GetEmbraceTarget()
|
||||
{
|
||||
if (!_embraceTargetGUID.IsEmpty())
|
||||
return Global.ObjAccessor.GetUnit(me, _embraceTargetGUID);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
void RemovePrison()
|
||||
{
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.RemoveAurasDueToSpell(SpellIds.BeamVisual);
|
||||
me.SetHomePosition(me.GetPositionX(), me.GetPositionY(), Misc.DataGroundPositionZ, me.GetOrientation());
|
||||
DoCast(SpellIds.HoverFall);
|
||||
me.SetDisableGravity(false);
|
||||
me.GetMotionMaster().MoveLand(0, me.GetHomePosition());
|
||||
Talk(TextIds.SayWarning);
|
||||
instance.HandleGameObject(instance.GetGuidData(DataTypes.PrinceTaldaramPlatform), true);
|
||||
}
|
||||
|
||||
ObjectGuid _flameSphereTargetGUID;
|
||||
ObjectGuid _embraceTargetGUID;
|
||||
uint _embraceTakenDamage;
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
return GetInstanceAI<boss_prince_taldaramAI>(creature);
|
||||
Talk(TextIds.SayDeath);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
public override void KilledUnit(Unit victim)
|
||||
{
|
||||
if (!victim.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
if (victim.GetGUID() == _embraceTargetGUID)
|
||||
_embraceTargetGUID.Clear();
|
||||
|
||||
Talk(TextIds.SaySlay);
|
||||
}
|
||||
|
||||
public bool CheckSpheres()
|
||||
{
|
||||
for (byte i = 0; i < 2; ++i)
|
||||
{
|
||||
if (instance.GetData(DataTypes.Sphere1 + i) == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
RemovePrison();
|
||||
return true;
|
||||
}
|
||||
|
||||
Unit GetEmbraceTarget()
|
||||
{
|
||||
if (!_embraceTargetGUID.IsEmpty())
|
||||
return Global.ObjAccessor.GetUnit(me, _embraceTargetGUID);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
void RemovePrison()
|
||||
{
|
||||
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
me.RemoveAurasDueToSpell(SpellIds.BeamVisual);
|
||||
me.SetHomePosition(me.GetPositionX(), me.GetPositionY(), Misc.DataGroundPositionZ, me.GetOrientation());
|
||||
DoCast(SpellIds.HoverFall);
|
||||
me.SetDisableGravity(false);
|
||||
me.GetMotionMaster().MoveLand(0, me.GetHomePosition());
|
||||
Talk(TextIds.SayWarning);
|
||||
instance.HandleGameObject(instance.GetGuidData(DataTypes.PrinceTaldaramPlatform), true);
|
||||
}
|
||||
|
||||
ObjectGuid _flameSphereTargetGUID;
|
||||
ObjectGuid _embraceTargetGUID;
|
||||
uint _embraceTakenDamage;
|
||||
}
|
||||
|
||||
|
||||
[Script] // 30106, 31686, 31687 - Flame Sphere
|
||||
class npc_prince_taldaram_flame_sphere : CreatureScript
|
||||
class npc_prince_taldaram_flame_sphere : ScriptedAI
|
||||
{
|
||||
public npc_prince_taldaram_flame_sphere() : base("npc_prince_taldaram_flame_sphere") { }
|
||||
|
||||
class npc_prince_taldaram_flame_sphereAI : ScriptedAI
|
||||
public npc_prince_taldaram_flame_sphere(Creature creature) : base(creature)
|
||||
{
|
||||
public npc_prince_taldaram_flame_sphereAI(Creature creature) : base(creature)
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
DoCast(me, SpellIds.FlameSphereSpawnEffect, true);
|
||||
DoCast(me, SpellIds.FlameSphereVisual, true);
|
||||
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_events.Reset();
|
||||
_events.ScheduleEvent(Misc.EventStartMove, 3 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Misc.EventDespawn, 13 * Time.InMilliseconds);
|
||||
}
|
||||
|
||||
public override void SetGUID(ObjectGuid guid, int id = 0)
|
||||
{
|
||||
_flameSphereTargetGUID = guid;
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void MoveInLineOfSight(Unit who) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
_events.ExecuteEvents(eventId =>
|
||||
{
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
DoCast(me, SpellIds.FlameSphereSpawnEffect, true);
|
||||
DoCast(me, SpellIds.FlameSphereVisual, true);
|
||||
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_events.Reset();
|
||||
_events.ScheduleEvent(Misc.EventStartMove, 3 * Time.InMilliseconds);
|
||||
_events.ScheduleEvent(Misc.EventDespawn, 13 * Time.InMilliseconds);
|
||||
}
|
||||
|
||||
public override void SetGUID(ObjectGuid guid, int id = 0)
|
||||
{
|
||||
_flameSphereTargetGUID = guid;
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void MoveInLineOfSight(Unit who) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
_events.ExecuteEvents(eventId =>
|
||||
switch (eventId)
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case Misc.EventStartMove:
|
||||
case Misc.EventStartMove:
|
||||
{
|
||||
DoCast(me, SpellIds.FlameSpherePeriodic, true);
|
||||
|
||||
/// @todo: find correct values
|
||||
float angleOffset = 0.0f;
|
||||
float distOffset = Misc.DataSphereDistance;
|
||||
|
||||
switch (me.GetEntry())
|
||||
{
|
||||
DoCast(me, SpellIds.FlameSpherePeriodic, true);
|
||||
|
||||
/// @todo: find correct values
|
||||
float angleOffset = 0.0f;
|
||||
float distOffset = Misc.DataSphereDistance;
|
||||
|
||||
switch (me.GetEntry())
|
||||
{
|
||||
case CreatureIds.FlameSphere1:
|
||||
break;
|
||||
case CreatureIds.FlameSphere2:
|
||||
angleOffset = Misc.DataSphereAngleOffset;
|
||||
break;
|
||||
case CreatureIds.FlameSphere3:
|
||||
angleOffset = -Misc.DataSphereAngleOffset;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
Unit sphereTarget = Global.ObjAccessor.GetUnit(me, _flameSphereTargetGUID);
|
||||
if (!sphereTarget)
|
||||
case CreatureIds.FlameSphere1:
|
||||
break;
|
||||
case CreatureIds.FlameSphere2:
|
||||
angleOffset = Misc.DataSphereAngleOffset;
|
||||
break;
|
||||
case CreatureIds.FlameSphere3:
|
||||
angleOffset = -Misc.DataSphereAngleOffset;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
float angle = me.GetAngle(sphereTarget) + angleOffset;
|
||||
float x = me.GetPositionX() + distOffset * (float)Math.Cos(angle);
|
||||
float y = me.GetPositionY() + distOffset * (float)Math.Sin(angle);
|
||||
|
||||
/// @todo: correct speed
|
||||
me.GetMotionMaster().MovePoint(0, x, y, me.GetPositionZ());
|
||||
break;
|
||||
}
|
||||
case Misc.EventDespawn:
|
||||
DoCast(me, SpellIds.FlameSphereDeathEffect, true);
|
||||
me.DespawnOrUnsummon(1000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ObjectGuid _flameSphereTargetGUID;
|
||||
Unit sphereTarget = Global.ObjAccessor.GetUnit(me, _flameSphereTargetGUID);
|
||||
if (!sphereTarget)
|
||||
return;
|
||||
|
||||
float angle = me.GetAngle(sphereTarget) + angleOffset;
|
||||
float x = me.GetPositionX() + distOffset * (float)Math.Cos(angle);
|
||||
float y = me.GetPositionY() + distOffset * (float)Math.Sin(angle);
|
||||
|
||||
/// @todo: correct speed
|
||||
me.GetMotionMaster().MovePoint(0, x, y, me.GetPositionZ());
|
||||
break;
|
||||
}
|
||||
case Misc.EventDespawn:
|
||||
DoCast(me, SpellIds.FlameSphereDeathEffect, true);
|
||||
me.DespawnOrUnsummon(1000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return new npc_prince_taldaram_flame_sphereAI(creature);
|
||||
}
|
||||
ObjectGuid _flameSphereTargetGUID;
|
||||
}
|
||||
|
||||
|
||||
[Script] // 193093, 193094 - Ancient Nerubian Device
|
||||
class go_prince_taldaram_sphere : GameObjectScript
|
||||
{
|
||||
@@ -408,69 +388,49 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.PrinceTaldaram
|
||||
break;
|
||||
}
|
||||
|
||||
PrinceTaldaram.GetAI<boss_prince_taldaram.boss_prince_taldaramAI>().CheckSpheres();
|
||||
PrinceTaldaram.GetAI<boss_prince_taldaram>().CheckSpheres();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Script] // 55931 - Conjure Flame Sphere
|
||||
class spell_prince_taldaram_conjure_flame_sphere : SpellScriptLoader
|
||||
class spell_prince_taldaram_conjure_flame_sphere : SpellScript
|
||||
{
|
||||
public spell_prince_taldaram_conjure_flame_sphere() : base("spell_prince_taldaram_conjure_flame_sphere") { }
|
||||
|
||||
class spell_prince_taldaram_conjure_flame_sphere_SpellScript : SpellScript
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.FlameSphereSummon1, SpellIds.FlameSphereSummon2, SpellIds.FlameSphereSummon3);
|
||||
}
|
||||
return ValidateSpellInfo(SpellIds.FlameSphereSummon1, SpellIds.FlameSphereSummon2, SpellIds.FlameSphereSummon3);
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
caster.CastSpell(caster, SpellIds.FlameSphereSummon1, true);
|
||||
void HandleScript(uint effIndex)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
caster.CastSpell(caster, SpellIds.FlameSphereSummon1, true);
|
||||
|
||||
if (caster.GetMap().IsHeroic())
|
||||
{
|
||||
caster.CastSpell(caster, SpellIds.FlameSphereSummon2, true);
|
||||
caster.CastSpell(caster, SpellIds.FlameSphereSummon3, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
if (caster.GetMap().IsHeroic())
|
||||
{
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.Dummy));
|
||||
caster.CastSpell(caster, SpellIds.FlameSphereSummon2, true);
|
||||
caster.CastSpell(caster, SpellIds.FlameSphereSummon3, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override SpellScript GetSpellScript()
|
||||
public override void Register()
|
||||
{
|
||||
return new spell_prince_taldaram_conjure_flame_sphere_SpellScript();
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.Dummy));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Script] // 55895, 59511, 59512 - Flame Sphere Summon
|
||||
class spell_prince_taldaram_flame_sphere_summon : SpellScriptLoader
|
||||
class spell_prince_taldaram_flame_sphere_summon : SpellScript
|
||||
{
|
||||
public spell_prince_taldaram_flame_sphere_summon() : base("spell_prince_taldaram_flame_sphere_summon") { }
|
||||
|
||||
class spell_prince_taldaram_flame_sphere_summon_SpellScript : SpellScript
|
||||
void SetDest(ref SpellDestination dest)
|
||||
{
|
||||
void SetDest(ref SpellDestination dest)
|
||||
{
|
||||
dest.RelocateOffset(new Position(0.0f, 0.0f, 5.5f, 0.0f));
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnDestinationTargetSelect.Add(new DestinationTargetSelectHandler(SetDest, 0, Targets.DestCaster));
|
||||
}
|
||||
dest.RelocateOffset(new Position(0.0f, 0.0f, 5.5f, 0.0f));
|
||||
}
|
||||
|
||||
public override SpellScript GetSpellScript()
|
||||
public override void Register()
|
||||
{
|
||||
return new spell_prince_taldaram_flame_sphere_summon_SpellScript();
|
||||
OnDestinationTargetSelect.Add(new DestinationTargetSelectHandler(SetDest, 0, Targets.DestCaster));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,59 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Scripts.Northrend.AzjolNerub.Ahnkahet
|
||||
{
|
||||
struct DataTypes
|
||||
{
|
||||
// Encounter States/Boss GUIDs
|
||||
public const uint ElderNadox = 0;
|
||||
public const uint PrinceTaldaram = 1;
|
||||
public const uint JedogaShadowseeker = 2;
|
||||
public const uint Amanitar = 3;
|
||||
public const uint HeraldVolazj = 4;
|
||||
|
||||
// Additional Data
|
||||
public const uint Sphere1 = 5;
|
||||
public const uint Sphere2 = 6;
|
||||
public const uint PrinceTaldaramPlatform = 7;
|
||||
public const uint PlJedogaTarget = 8;
|
||||
public const uint AddJedogaVictim = 9;
|
||||
public const uint AddJedogaInitiand = 10;
|
||||
public const uint JedogaTriggerSwitch = 11;
|
||||
public const uint JedogaResetInitiands = 12;
|
||||
public const uint AllInitiandDead = 13;
|
||||
}
|
||||
|
||||
struct AKCreatureIds
|
||||
{
|
||||
public const uint ElderNadox = 29309;
|
||||
public const uint PrinceTaldaram = 29308;
|
||||
public const uint JedogaShadowseeker = 29310;
|
||||
public const uint Amanitar = 30258;
|
||||
public const uint HeraldVolazj = 29311;
|
||||
|
||||
// Elder Nadox
|
||||
public const uint AhnkaharGuardian = 30176;
|
||||
public const uint AhnkaharSwarmer = 30178;
|
||||
|
||||
// Jedoga Shadowseeker
|
||||
public const uint Initiand = 30114;
|
||||
public const uint JedogaController = 30181;
|
||||
|
||||
// Herald Volazj
|
||||
//public const uint TwistedVisage1 = 30621,
|
||||
//public const uint TwistedVisage2 = 30622,
|
||||
//public const uint TwistedVisage3 = 30623,
|
||||
//public const uint TwistedVisage4 = 30624,
|
||||
public const uint TwistedVisage = 30625;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
public const uint PrinceTaldaramGate = 192236;
|
||||
public const uint PrinceTaldaramPlatform = 193564;
|
||||
public const uint Sphere1 = 193093;
|
||||
public const uint Sphere2 = 193094;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class instance_ahnkahet : InstanceMapScript
|
||||
{
|
||||
@@ -151,7 +204,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet
|
||||
case DataTypes.Sphere1:
|
||||
case DataTypes.Sphere2:
|
||||
return SpheresState[type - DataTypes.Sphere1];
|
||||
case DataTypes.AllInitiandDead:
|
||||
case DataTypes.AllInitiandDead:
|
||||
foreach (ObjectGuid guid in InitiandGUIDs)
|
||||
{
|
||||
Creature cr = instance.GetCreature(guid);
|
||||
@@ -278,57 +331,4 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet
|
||||
return new instance_ahnkahet_InstanceScript(map);
|
||||
}
|
||||
}
|
||||
|
||||
struct DataTypes
|
||||
{
|
||||
// Encounter States/Boss GUIDs
|
||||
public const uint ElderNadox = 0;
|
||||
public const uint PrinceTaldaram = 1;
|
||||
public const uint JedogaShadowseeker = 2;
|
||||
public const uint Amanitar = 3;
|
||||
public const uint HeraldVolazj = 4;
|
||||
|
||||
// Additional Data
|
||||
public const uint Sphere1 = 5;
|
||||
public const uint Sphere2 = 6;
|
||||
public const uint PrinceTaldaramPlatform = 7;
|
||||
public const uint PlJedogaTarget = 8;
|
||||
public const uint AddJedogaVictim = 9;
|
||||
public const uint AddJedogaInitiand = 10;
|
||||
public const uint JedogaTriggerSwitch = 11;
|
||||
public const uint JedogaResetInitiands = 12;
|
||||
public const uint AllInitiandDead = 13;
|
||||
}
|
||||
|
||||
struct AKCreatureIds
|
||||
{
|
||||
public const uint ElderNadox = 29309;
|
||||
public const uint PrinceTaldaram = 29308;
|
||||
public const uint JedogaShadowseeker = 29310;
|
||||
public const uint Amanitar = 30258;
|
||||
public const uint HeraldVolazj = 29311;
|
||||
|
||||
// Elder Nadox
|
||||
public const uint AhnkaharGuardian = 30176;
|
||||
public const uint AhnkaharSwarmer = 30178;
|
||||
|
||||
// Jedoga Shadowseeker
|
||||
public const uint Initiand = 30114;
|
||||
public const uint JedogaController = 30181;
|
||||
|
||||
// Herald Volazj
|
||||
//public const uint TwistedVisage1 = 30621,
|
||||
//public const uint TwistedVisage2 = 30622,
|
||||
//public const uint TwistedVisage3 = 30623,
|
||||
//public const uint TwistedVisage4 = 30624,
|
||||
public const uint TwistedVisage = 30625;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
public const uint PrinceTaldaramGate = 192236;
|
||||
public const uint PrinceTaldaramPlatform = 193564;
|
||||
public const uint Sphere1 = 193093;
|
||||
public const uint Sphere2 = 193094;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -22,41 +22,6 @@ using Game.Scripting;
|
||||
|
||||
namespace Scripts.Northrend.AzjolNerub.AzjolNerub
|
||||
{
|
||||
[Script]
|
||||
class instance_azjol_nerub : InstanceMapScript
|
||||
{
|
||||
public instance_azjol_nerub() : base(nameof(instance_azjol_nerub), 601) { }
|
||||
|
||||
class instance_azjol_nerub_InstanceScript : InstanceScript
|
||||
{
|
||||
public instance_azjol_nerub_InstanceScript(Map map) : base(map)
|
||||
{
|
||||
SetHeaders(ANInstanceMisc.DataHeader);
|
||||
SetBossNumber(ANInstanceMisc.EncounterCount);
|
||||
LoadBossBoundaries(ANInstanceMisc.boundaries);
|
||||
LoadDoorData(ANInstanceMisc.doorData);
|
||||
LoadObjectData(ANInstanceMisc.creatureData, ANInstanceMisc.gameobjectData);
|
||||
}
|
||||
|
||||
public override void OnUnitDeath(Unit who)
|
||||
{
|
||||
base.OnUnitDeath(who);
|
||||
Creature creature = who.ToCreature();
|
||||
if (!creature || creature.IsCritter() || creature.IsControlledByPlayer())
|
||||
return;
|
||||
|
||||
Creature gatewatcher = GetCreature(ANDataTypes.KrikthirTheGatewatcher);
|
||||
if (gatewatcher)
|
||||
gatewatcher.GetAI().DoAction(-ANInstanceMisc.ActionGatewatcherGreet);
|
||||
}
|
||||
}
|
||||
|
||||
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||
{
|
||||
return new instance_azjol_nerub_InstanceScript(map);
|
||||
}
|
||||
}
|
||||
|
||||
struct ANDataTypes
|
||||
{
|
||||
// Encounter States/Boss Guids
|
||||
@@ -128,4 +93,39 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub
|
||||
new BossBoundaryEntry(ANDataTypes.Anubarak, new CircleBoundary(new Position(550.6178f, 253.5917f), 26.0f))
|
||||
};
|
||||
}
|
||||
|
||||
[Script]
|
||||
class instance_azjol_nerub : InstanceMapScript
|
||||
{
|
||||
public instance_azjol_nerub() : base(nameof(instance_azjol_nerub), 601) { }
|
||||
|
||||
class instance_azjol_nerub_InstanceScript : InstanceScript
|
||||
{
|
||||
public instance_azjol_nerub_InstanceScript(Map map) : base(map)
|
||||
{
|
||||
SetHeaders(ANInstanceMisc.DataHeader);
|
||||
SetBossNumber(ANInstanceMisc.EncounterCount);
|
||||
LoadBossBoundaries(ANInstanceMisc.boundaries);
|
||||
LoadDoorData(ANInstanceMisc.doorData);
|
||||
LoadObjectData(ANInstanceMisc.creatureData, ANInstanceMisc.gameobjectData);
|
||||
}
|
||||
|
||||
public override void OnUnitDeath(Unit who)
|
||||
{
|
||||
base.OnUnitDeath(who);
|
||||
Creature creature = who.ToCreature();
|
||||
if (!creature || creature.IsCritter() || creature.IsControlledByPlayer())
|
||||
return;
|
||||
|
||||
Creature gatewatcher = GetCreature(ANDataTypes.KrikthirTheGatewatcher);
|
||||
if (gatewatcher)
|
||||
gatewatcher.GetAI().DoAction(-ANInstanceMisc.ActionGatewatcherGreet);
|
||||
}
|
||||
}
|
||||
|
||||
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||
{
|
||||
return new instance_azjol_nerub_InstanceScript(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user