Scripts/RLP: Added initial spawns and some cosmetic spells
Port From (https://github.com/TrinityCore/TrinityCore/commit/486152e1631a28c72148a9d6eb2526a31602d599)
This commit is contained in:
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2012-2020 CypherCore <http://github.com/CypherCore>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using Framework.Constants;
|
||||||
|
using Game.Maps;
|
||||||
|
using Game.Scripting;
|
||||||
|
|
||||||
|
namespace Scripts.DragonIsles.RubyLifePools
|
||||||
|
{
|
||||||
|
struct DataTypes
|
||||||
|
{
|
||||||
|
// Encounters
|
||||||
|
public const uint MelidrussaChillworn = 0;
|
||||||
|
public const uint KokiaBlazehoof = 1;
|
||||||
|
public const uint KyrakkaAndErkhartStormvein = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct CreatureIds
|
||||||
|
{
|
||||||
|
// Bosses
|
||||||
|
public const uint MelidrussaChillworn = 188252;
|
||||||
|
public const uint KokiaBlazehoof = 189232;
|
||||||
|
public const uint Kyrakka = 190484;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct GameObjectIds
|
||||||
|
{
|
||||||
|
public const uint FireWall = 377194;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Script]
|
||||||
|
class instance_ruby_life_pools : InstanceMapScript
|
||||||
|
{
|
||||||
|
public static ObjectData[] creatureData =
|
||||||
|
{
|
||||||
|
new ObjectData(CreatureIds.MelidrussaChillworn, DataTypes.MelidrussaChillworn),
|
||||||
|
new ObjectData(CreatureIds.KokiaBlazehoof, DataTypes.KokiaBlazehoof),
|
||||||
|
new ObjectData(CreatureIds.Kyrakka, DataTypes.KyrakkaAndErkhartStormvein),
|
||||||
|
};
|
||||||
|
|
||||||
|
public static DoorData[] doorData =
|
||||||
|
{
|
||||||
|
new DoorData(GameObjectIds.FireWall, DataTypes.KokiaBlazehoof, DoorType.Passage),
|
||||||
|
};
|
||||||
|
|
||||||
|
public static DungeonEncounterData[] encounters =
|
||||||
|
{
|
||||||
|
new DungeonEncounterData(DataTypes.MelidrussaChillworn, 2609 ),
|
||||||
|
new DungeonEncounterData(DataTypes.KokiaBlazehoof, 2606 ),
|
||||||
|
new DungeonEncounterData(DataTypes.KyrakkaAndErkhartStormvein, 2623 )
|
||||||
|
};
|
||||||
|
|
||||||
|
public instance_ruby_life_pools() : base(nameof(instance_ruby_life_pools), 2521) { }
|
||||||
|
|
||||||
|
class instance_ruby_life_pools_InstanceMapScript : InstanceScript
|
||||||
|
{
|
||||||
|
public instance_ruby_life_pools_InstanceMapScript(InstanceMap map) : base(map)
|
||||||
|
{
|
||||||
|
SetHeaders("RLP");
|
||||||
|
SetBossNumber(3);
|
||||||
|
LoadObjectData(creatureData, null);
|
||||||
|
LoadDoorData(doorData);
|
||||||
|
LoadDungeonEncounterData(encounters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||||
|
{
|
||||||
|
return new instance_ruby_life_pools_InstanceMapScript(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2012-2020 CypherCore <http://github.com/CypherCore>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using Framework.Constants;
|
||||||
|
using Game.Entities;
|
||||||
|
using Game.Scripting;
|
||||||
|
using Game.Spells;
|
||||||
|
|
||||||
|
namespace Scripts.DragonIsles.RubyLifePools
|
||||||
|
{
|
||||||
|
struct SpellIds
|
||||||
|
{
|
||||||
|
// Flashfrost Chillweaver
|
||||||
|
public const uint IceShield = 372749;
|
||||||
|
|
||||||
|
// Primal Juggernaut
|
||||||
|
public const uint Excavate = 373497;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 371652 - Executed
|
||||||
|
class spell_ruby_life_pools_executed : AuraScript
|
||||||
|
{
|
||||||
|
void HandleEffectApply(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||||
|
{
|
||||||
|
Unit target = GetTarget();
|
||||||
|
target.SetUnitFlag3(UnitFlags3.FakeDead);
|
||||||
|
target.SetUnitFlag2(UnitFlags2.FeignDeath);
|
||||||
|
target.SetUnitFlag(UnitFlags.PreventEmotesFromChatText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectApply.Add(new EffectApplyHandler(HandleEffectApply, 0, AuraType.ModStun, AuraEffectHandleModes.Real));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 384933 - Ice Shield
|
||||||
|
class spell_ruby_life_pools_ice_shield : AuraScript
|
||||||
|
{
|
||||||
|
void HandleEffectPeriodic(AuraEffect aurEff)
|
||||||
|
{
|
||||||
|
Aura iceShield = GetTarget()?.GetAura(SpellIds.IceShield);
|
||||||
|
iceShield?.RefreshDuration();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectPeriodic.Add(new EffectPeriodicHandler(HandleEffectPeriodic, 0, AuraType.PeriodicDummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 372793 - Excavate
|
||||||
|
class spell_ruby_life_pools_excavate : AuraScript
|
||||||
|
{
|
||||||
|
void HandleEffectPeriodic(AuraEffect aurEff)
|
||||||
|
{
|
||||||
|
GetCaster()?.CastSpell(GetTarget(), SpellIds.Excavate, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectPeriodic.Add(new EffectPeriodicHandler(HandleEffectPeriodic, 0, AuraType.PeriodicDummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 395029 - Storm Infusion
|
||||||
|
class spell_ruby_life_pools_storm_infusion : SpellScript
|
||||||
|
{
|
||||||
|
void SetDest(ref SpellDestination dest)
|
||||||
|
{
|
||||||
|
dest.RelocateOffset(new Position(9.0f, 0.0f, 4.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnDestinationTargetSelect.Add(new DestinationTargetSelectHandler(SetDest, 1, Targets.DestDest));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user