Scripts/Spells: Implemented Wind Rush Totem
Port From (https://github.com/TrinityCore/TrinityCore/commit/b1c0d069e1eba2f7b43ada8032b954bff630b68d)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
@@ -69,6 +70,7 @@ namespace Scripts.Spells.Shaman
|
||||
public const uint TotemicPowerAttackPower = 28826;
|
||||
public const uint TotemicPowerArmor = 28827;
|
||||
public const uint WindfuryAttack = 25504;
|
||||
public const uint WindRush = 192082;
|
||||
|
||||
//Misc
|
||||
public const uint HunterInsanity = 95809;
|
||||
@@ -1039,4 +1041,64 @@ namespace Scripts.Spells.Shaman
|
||||
OnEffectProc.Add(new EffectProcHandler(HandleEffectProc, 0, AuraType.Dummy));
|
||||
}
|
||||
}
|
||||
|
||||
// 192078 - Wind Rush Totem (Spell)
|
||||
[Script] // 12676 - AreaTriggerId
|
||||
class areatrigger_sha_wind_rush_totem : AreaTriggerEntityScript
|
||||
{
|
||||
public areatrigger_sha_wind_rush_totem() : base("areatrigger_sha_wind_rush_totem") { }
|
||||
|
||||
class areatrigger_sha_wind_rush_totemAI : AreaTriggerAI
|
||||
{
|
||||
static int REFRESH_TIME = 4500;
|
||||
|
||||
int _refreshTimer;
|
||||
|
||||
public areatrigger_sha_wind_rush_totemAI(AreaTrigger areatrigger) : base(areatrigger)
|
||||
{
|
||||
_refreshTimer = REFRESH_TIME;
|
||||
}
|
||||
|
||||
public override void OnUpdate(uint diff)
|
||||
{
|
||||
_refreshTimer -= (int)diff;
|
||||
if (_refreshTimer <= 0)
|
||||
{
|
||||
Unit caster = at.GetCaster();
|
||||
if (caster != null)
|
||||
{
|
||||
foreach (ObjectGuid guid in at.GetInsideUnits())
|
||||
{
|
||||
Unit unit = Global.ObjAccessor.GetUnit(caster, guid);
|
||||
if (unit != null)
|
||||
{
|
||||
if (!caster.IsFriendlyTo(unit))
|
||||
continue;
|
||||
|
||||
caster.CastSpell(unit, SpellIds.WindRush, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
_refreshTimer += REFRESH_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUnitEnter(Unit unit)
|
||||
{
|
||||
Unit caster = at.GetCaster();
|
||||
if (caster != null)
|
||||
{
|
||||
if (!caster.IsFriendlyTo(unit))
|
||||
return;
|
||||
|
||||
caster.CastSpell(unit, SpellIds.WindRush, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override AreaTriggerAI GetAI(AreaTrigger areatrigger)
|
||||
{
|
||||
return new areatrigger_sha_wind_rush_totemAI(areatrigger);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=97285;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=97285 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `action_type`, `action_param1`, `target_type`, `comment`) VALUES
|
||||
(97285, 0, 0, 0, 25, 11, 192078, 1, 'On Reset - Cast Spell Wind Rush Totem - Self');
|
||||
|
||||
UPDATE `areatrigger_template` SET `ScriptName`='areatrigger_sha_wind_rush_totem', `VerifiedBuild`=40120 WHERE `Id`=12676;
|
||||
|
||||
DELETE FROM `areatrigger_create_properties` WHERE `Id`=8537;
|
||||
INSERT INTO `areatrigger_create_properties` (`Id`, `AreaTriggerId`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `TimeToTarget`, `TimeToTargetScale`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `VerifiedBuild`) VALUES
|
||||
(8537, 12676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 40120); -- SpellId : 192078
|
||||
Reference in New Issue
Block a user