More Scripts done.
This commit is contained in:
@@ -1526,7 +1526,7 @@ namespace Game.Entities
|
||||
|
||||
public MovementForces GetMovementForces() { return _movementForces; }
|
||||
|
||||
void ApplyMovementForce(ObjectGuid id, Vector3 origin, float magnitude, MovementForceType type, Vector3 direction, ObjectGuid transportGuid = default)
|
||||
public void ApplyMovementForce(ObjectGuid id, Vector3 origin, float magnitude, MovementForceType type, Vector3 direction = default, ObjectGuid transportGuid = default)
|
||||
{
|
||||
if (_movementForces == null)
|
||||
_movementForces = new MovementForces();
|
||||
@@ -1562,7 +1562,7 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveMovementForce(ObjectGuid id)
|
||||
public void RemoveMovementForce(ObjectGuid id)
|
||||
{
|
||||
if (_movementForces == null)
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,697 +0,0 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Game.BattleFields
|
||||
{
|
||||
static class WGConst
|
||||
{
|
||||
public const uint MapId = 571; // Northrend
|
||||
|
||||
public const byte MaxOutsideNpcs = 14;
|
||||
public const byte OutsideAllianceNpc = 7;
|
||||
public const byte MaxWorkshops = 6;
|
||||
|
||||
#region Data
|
||||
public static BfWGCoordGY[] WGGraveyard =
|
||||
{
|
||||
new BfWGCoordGY(5104.750f, 2300.940f, 368.579f, 0.733038f, 1329, WGGossipText.GYNE, TeamId.Neutral),
|
||||
new BfWGCoordGY(5099.120f, 3466.036f, 368.484f, 5.317802f, 1330, WGGossipText.GYNW, TeamId.Neutral),
|
||||
new BfWGCoordGY(4314.648f, 2408.522f, 392.642f, 6.268125f, 1333, WGGossipText.GYSE, TeamId.Neutral),
|
||||
new BfWGCoordGY(4331.716f, 3235.695f, 390.251f, 0.008500f, 1334, WGGossipText.GYSW, TeamId.Neutral),
|
||||
new BfWGCoordGY(5537.986f, 2897.493f, 517.057f, 4.819249f, 1285, WGGossipText.GYKeep, TeamId.Neutral),
|
||||
new BfWGCoordGY(5032.454f, 3711.382f, 372.468f, 3.971623f, 1331, WGGossipText.GYHorde, TeamId.Horde),
|
||||
new BfWGCoordGY(5140.790f, 2179.120f, 390.950f, 1.972220f, 1332, WGGossipText.GYAlliance, TeamId.Alliance),
|
||||
};
|
||||
|
||||
public static WorldStates[] ClockWorldState = { WorldStates.BattlefieldWgTimeBattleEnd, WorldStates.BattlefieldWgTimeNextBattle };
|
||||
public static uint[] WintergraspFaction = { 1732, 1735, 35 };
|
||||
|
||||
public static Position WintergraspStalkerPos = new(4948.985f, 2937.789f, 550.5172f, 1.815142f);
|
||||
|
||||
public static Position RelicPos = new(5440.379f, 2840.493f, 430.2816f, -1.832595f);
|
||||
public static Quaternion RelicRot = new(0.0f, 0.0f, -0.7933531f, 0.6087617f);
|
||||
|
||||
//Destructible (Wall, Tower..)
|
||||
public static WintergraspBuildingSpawnData[] WGGameObjectBuilding =
|
||||
{
|
||||
// Wall (Not spawned in db)
|
||||
// Entry WS X Y Z O rX rY rZ rW Type
|
||||
new WintergraspBuildingSpawnData(190219, 3749, 5371.457f, 3047.472f, 407.5710f, 3.14159300f, 0.0f, 0.0f, -1.000000000f, 0.00000000f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190220, 3750, 5331.264f, 3047.105f, 407.9228f, 0.05235888f, 0.0f, 0.0f, 0.026176450f, 0.99965730f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191795, 3764, 5385.841f, 2909.490f, 409.7127f, 0.00872424f, 0.0f, 0.0f, 0.004362106f, 0.99999050f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191796, 3772, 5384.452f, 2771.835f, 410.2704f, 3.14159300f, 0.0f, 0.0f, -1.000000000f, 0.00000000f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191799, 3762, 5371.436f, 2630.610f, 408.8163f, 3.13285800f, 0.0f, 0.0f, 0.999990500f, 0.00436732f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191800, 3766, 5301.838f, 2909.089f, 409.8661f, 0.00872424f, 0.0f, 0.0f, 0.004362106f, 0.99999050f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191801, 3770, 5301.063f, 2771.411f, 409.9014f, 3.14159300f, 0.0f, 0.0f, -1.000000000f, 0.00000000f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191802, 3751, 5280.197f, 2995.583f, 408.8249f, 1.61442800f, 0.0f, 0.0f, 0.722363500f, 0.69151360f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191803, 3752, 5279.136f, 2956.023f, 408.6041f, 1.57079600f, 0.0f, 0.0f, 0.707106600f, 0.70710690f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191804, 3767, 5278.685f, 2882.513f, 409.5388f, 1.57079600f, 0.0f, 0.0f, 0.707106600f, 0.70710690f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191806, 3769, 5279.502f, 2798.945f, 409.9983f, 1.57079600f, 0.0f, 0.0f, 0.707106600f, 0.70710690f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191807, 3759, 5279.937f, 2724.766f, 409.9452f, 1.56207000f, 0.0f, 0.0f, 0.704014800f, 0.71018530f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191808, 3760, 5279.601f, 2683.786f, 409.8488f, 1.55334100f, 0.0f, 0.0f, 0.700908700f, 0.71325110f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191809, 3761, 5330.955f, 2630.777f, 409.2826f, 3.13285800f, 0.0f, 0.0f, 0.999990500f, 0.00436732f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190369, 3753, 5256.085f, 2933.963f, 409.3571f, 3.13285800f, 0.0f, 0.0f, 0.999990500f, 0.00436732f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190370, 3758, 5257.463f, 2747.327f, 409.7427f, -3.13285800f, 0.0f, 0.0f, -0.999990500f, 0.00436732f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190371, 3754, 5214.960f, 2934.089f, 409.1905f, -0.00872424f, 0.0f, 0.0f, -0.004362106f, 0.99999050f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190372, 3757, 5215.821f, 2747.566f, 409.1884f, -3.13285800f, 0.0f, 0.0f, -0.999990500f, 0.00436732f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190374, 3755, 5162.273f, 2883.043f, 410.2556f, 1.57952200f, 0.0f, 0.0f, 0.710185100f, 0.70401500f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(190376, 3756, 5163.724f, 2799.838f, 409.2270f, 1.57952200f, 0.0f, 0.0f, 0.710185100f, 0.70401500f, WGGameObjectBuildingType.Wall),
|
||||
|
||||
// Tower of keep (Not spawned in db)
|
||||
new WintergraspBuildingSpawnData(190221, 3711, 5281.154f, 3044.588f, 407.8434f, 3.115388f, 0.0f, 0.0f, 0.9999142f, 0.013101960f, WGGameObjectBuildingType.KeepTower), // NW
|
||||
new WintergraspBuildingSpawnData(190373, 3713, 5163.757f, 2932.228f, 409.1904f, 3.124123f, 0.0f, 0.0f, 0.9999619f, 0.008734641f, WGGameObjectBuildingType.KeepTower), // SW
|
||||
new WintergraspBuildingSpawnData(190377, 3714, 5166.397f, 2748.368f, 409.1884f, -1.570796f, 0.0f, 0.0f, -0.7071066f, 0.707106900f, WGGameObjectBuildingType.KeepTower), // SE
|
||||
new WintergraspBuildingSpawnData(190378, 3712, 5281.192f, 2632.479f, 409.0985f, -1.588246f, 0.0f, 0.0f, -0.7132492f, 0.700910500f, WGGameObjectBuildingType.KeepTower), // NE
|
||||
|
||||
// Wall (with passage) (Not spawned in db)
|
||||
new WintergraspBuildingSpawnData(191797, 3765, 5343.290f, 2908.860f, 409.5757f, 0.00872424f, 0.0f, 0.0f, 0.004362106f, 0.9999905f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191798, 3771, 5342.719f, 2771.386f, 409.6249f, 3.14159300f, 0.0f, 0.0f, -1.000000000f, 0.0000000f, WGGameObjectBuildingType.Wall),
|
||||
new WintergraspBuildingSpawnData(191805, 3768, 5279.126f, 2840.797f, 409.7826f, 1.57952200f, 0.0f, 0.0f, 0.710185100f, 0.7040150f, WGGameObjectBuildingType.Wall),
|
||||
|
||||
// South tower (Not spawned in db)
|
||||
new WintergraspBuildingSpawnData(190356, 3704, 4557.173f, 3623.943f, 395.8828f, 1.675516f, 0.0f, 0.0f, 0.7431450f, 0.669130400f, WGGameObjectBuildingType.Tower), // W
|
||||
new WintergraspBuildingSpawnData(190357, 3705, 4398.172f, 2822.497f, 405.6270f, -3.124123f, 0.0f, 0.0f, -0.9999619f, 0.008734641f, WGGameObjectBuildingType.Tower), // S
|
||||
new WintergraspBuildingSpawnData(190358, 3706, 4459.105f, 1944.326f, 434.9912f, -2.002762f, 0.0f, 0.0f, -0.8422165f, 0.539139500f, WGGameObjectBuildingType.Tower), // E
|
||||
|
||||
// Door of forteress (Not spawned in db)
|
||||
new WintergraspBuildingSpawnData(WGGameObjects.FortressGate, 3763, 5162.991f, 2841.232f, 410.1892f, -3.132858f, 0.0f, 0.0f, -0.9999905f, 0.00436732f, WGGameObjectBuildingType.Door),
|
||||
|
||||
// Last door (Not spawned in db)
|
||||
new WintergraspBuildingSpawnData(WGGameObjects.VaultGate, 3773, 5397.108f, 2841.54f, 425.9014f, 3.141593f, 0.0f, 0.0f, -1.0f, 0.0f, WGGameObjectBuildingType.DoorLast),
|
||||
};
|
||||
|
||||
public static StaticWintergraspTowerInfo[] TowerData =
|
||||
{
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.FortressNW, WintergraspText.NwKeeptowerDamage, WintergraspText.NwKeeptowerDestroy),
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.FortressSW,WintergraspText.SwKeeptowerDamage,WintergraspText.SwKeeptowerDestroy),
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.FortressSE,WintergraspText.SeKeeptowerDamage,WintergraspText.SeKeeptowerDestroy),
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.FortressNE,WintergraspText.NeKeeptowerDamage,WintergraspText.NeKeeptowerDestroy),
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.Shadowsight,WintergraspText.WesternTowerDamage,WintergraspText.WesternTowerDestroy),
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.WintersEdge,WintergraspText.SouthernTowerDamage,WintergraspText.SouthernTowerDestroy),
|
||||
new StaticWintergraspTowerInfo(WintergraspTowerIds.Flamewatch,WintergraspText.EasternTowerDamage,WintergraspText.EasternTowerDestroy)
|
||||
};
|
||||
|
||||
public static Position[] WGTurret =
|
||||
{
|
||||
new Position(5391.19f, 3060.8f, 419.616f, 1.69557f),
|
||||
new Position(5266.75f, 2976.5f, 421.067f, 3.20354f),
|
||||
new Position(5234.86f, 2948.8f, 420.88f, 1.61311f),
|
||||
new Position(5323.05f, 2923.7f, 421.645f, 1.5817f),
|
||||
new Position(5363.82f, 2923.87f, 421.709f, 1.60527f),
|
||||
new Position(5264.04f, 2861.34f, 421.587f, 3.21142f),
|
||||
new Position(5264.68f, 2819.78f, 421.656f, 3.15645f),
|
||||
new Position(5322.16f, 2756.69f, 421.646f, 4.69978f),
|
||||
new Position(5363.78f, 2756.77f, 421.629f, 4.78226f),
|
||||
new Position(5236.2f, 2732.68f, 421.649f, 4.72336f),
|
||||
new Position(5265.02f, 2704.63f, 421.7f, 3.12507f),
|
||||
new Position(5350.87f, 2616.03f, 421.243f, 4.72729f),
|
||||
new Position(5390.95f, 2615.5f, 421.126f, 4.6409f),
|
||||
new Position(5148.8f, 2820.24f, 421.621f, 3.16043f),
|
||||
new Position(5147.98f, 2861.93f, 421.63f, 3.18792f),
|
||||
};
|
||||
|
||||
public static WintergraspGameObjectData[] WGPortalDefenderData =
|
||||
{
|
||||
// Player teleporter
|
||||
new WintergraspGameObjectData(5153.408f, 2901.349f, 409.1913f, -0.06981169f, 0.0f, 0.0f, -0.03489876f, 0.9993908f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5268.698f, 2666.421f, 409.0985f, -0.71558490f, 0.0f, 0.0f, -0.35020730f, 0.9366722f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5197.050f, 2944.814f, 409.1913f, 2.33874000f, 0.0f, 0.0f, 0.92050460f, 0.3907318f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5196.671f, 2737.345f, 409.1892f, -2.93213900f, 0.0f, 0.0f, -0.99452110f, 0.1045355f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5314.580f, 3055.852f, 408.8620f, 0.54105060f, 0.0f, 0.0f, 0.26723770f, 0.9636307f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5391.277f, 2828.094f, 418.6752f, -2.16420600f, 0.0f, 0.0f, -0.88294700f, 0.4694727f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5153.931f, 2781.671f, 409.2455f, 1.65806200f, 0.0f, 0.0f, 0.73727700f, 0.6755905f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5311.445f, 2618.931f, 409.0916f, -2.37364400f, 0.0f, 0.0f, -0.92718320f, 0.3746083f, 190763, 191575),
|
||||
new WintergraspGameObjectData(5269.208f, 3013.838f, 408.8276f, -1.76278200f, 0.0f, 0.0f, -0.77162460f, 0.6360782f, 190763, 191575),
|
||||
|
||||
new WintergraspGameObjectData(5401.634f, 2853.667f, 418.6748f, 2.63544400f, 0.0f, 0.0f, 0.96814730f, 0.2503814f, 192819, 192819), // return portal inside fortress, neutral
|
||||
|
||||
// Vehicle teleporter
|
||||
new WintergraspGameObjectData(5314.515f, 2703.687f, 408.5502f, -0.89011660f, 0.0f, 0.0f, -0.43051050f, 0.9025856f, 192951, 192951),
|
||||
new WintergraspGameObjectData(5316.252f, 2977.042f, 408.5385f, -0.82030330f, 0.0f, 0.0f, -0.39874840f, 0.9170604f, 192951, 192951)
|
||||
};
|
||||
|
||||
public static WintergraspTowerData[] AttackTowers =
|
||||
{
|
||||
//West Tower
|
||||
new WintergraspTowerData()
|
||||
{
|
||||
towerEntry = 190356,
|
||||
GameObject = new WintergraspGameObjectData[]
|
||||
{
|
||||
new WintergraspGameObjectData(4559.113f, 3606.216f, 419.9992f, 4.799657f, 0.0f, 0.0f, -0.67558960f, 0.73727790f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4539.420f, 3622.490f, 420.0342f, 3.211419f, 0.0f, 0.0f, -0.99939060f, 0.03490613f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4555.258f, 3641.648f, 419.9740f, 1.675514f, 0.0f, 0.0f, 0.74314400f, 0.66913150f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4574.872f, 3625.911f, 420.0792f, 0.087266f, 0.0f, 0.0f, 0.04361916f, 0.99904820f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4433.899f, 3534.142f, 360.2750f, 4.433136f, 0.0f, 0.0f, -0.79863550f, 0.60181500f, 192269, 192278), // Flag near workshop
|
||||
new WintergraspGameObjectData(4572.933f, 3475.519f, 363.0090f, 1.422443f, 0.0f, 0.0f, 0.65275960f, 0.75756520f, 192269, 192277) // Flag near bridge
|
||||
},
|
||||
CreatureBottom = new WintergraspObjectPositionData[]
|
||||
{
|
||||
new WintergraspObjectPositionData(4418.688477f, 3506.251709f, 358.975494f, 4.293305f, WGNpcs.GuardH, WGNpcs.GuardA), // Roaming Guard
|
||||
}
|
||||
},
|
||||
|
||||
//South Tower
|
||||
new WintergraspTowerData()
|
||||
{
|
||||
towerEntry = 190357,
|
||||
GameObject = new WintergraspGameObjectData[]
|
||||
{
|
||||
new WintergraspGameObjectData(4416.004f, 2822.666f, 429.8512f, 6.2657330f, 0.0f, 0.0f, -0.00872612f, 0.99996190f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4398.819f, 2804.698f, 429.7920f, 4.6949370f, 0.0f, 0.0f, -0.71325020f, 0.70090960f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4387.622f, 2719.566f, 389.9351f, 4.7385700f, 0.0f, 0.0f, -0.69779010f, 0.71630230f, 192366, 192414), // Flag near tower
|
||||
new WintergraspGameObjectData(4464.124f, 2855.453f, 406.1106f, 0.8290324f, 0.0f, 0.0f, 0.40274720f, 0.91531130f, 192366, 192429), // Flag near tower
|
||||
new WintergraspGameObjectData(4526.457f, 2810.181f, 391.1997f, 3.2899610f, 0.0f, 0.0f, -0.99724960f, 0.07411628f, 192269, 192278) // Flag near bridge
|
||||
},
|
||||
CreatureBottom = new WintergraspObjectPositionData[]
|
||||
{
|
||||
new WintergraspObjectPositionData(4452.859863f, 2808.870117f, 402.604004f, 6.056290f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4455.899902f, 2835.958008f, 401.122559f, 0.034907f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4412.649414f, 2953.792236f, 374.799957f, 0.980838f, WGNpcs.GuardH, WGNpcs.GuardA), // Roaming Guard
|
||||
new WintergraspObjectPositionData(4362.089844f, 2811.510010f, 407.337006f, 3.193950f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4412.290039f, 2753.790039f, 401.015015f, 5.829400f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4421.939941f, 2773.189941f, 400.894989f, 5.707230f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
}
|
||||
},
|
||||
|
||||
//East Tower
|
||||
new WintergraspTowerData()
|
||||
{
|
||||
towerEntry = 190358,
|
||||
GameObject = new WintergraspGameObjectData[]
|
||||
{
|
||||
new WintergraspGameObjectData(4466.793f, 1960.418f, 459.1437f, 1.151916f, 0.0f, 0.0f, 0.5446386f, 0.8386708f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4475.351f, 1937.031f, 459.0702f, 5.846854f, 0.0f, 0.0f, -0.2164392f, 0.9762961f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4451.758f, 1928.104f, 459.0759f, 4.276057f, 0.0f, 0.0f, -0.8433914f, 0.5372996f, 192488, 192501), // Flag on tower
|
||||
new WintergraspGameObjectData(4442.987f, 1951.898f, 459.0930f, 2.740162f, 0.0f, 0.0f, 0.9799242f, 0.1993704f, 192488, 192501) // Flag on tower
|
||||
},
|
||||
CreatureBottom = new WintergraspObjectPositionData[]
|
||||
{
|
||||
new WintergraspObjectPositionData(4501.060059f, 1990.280029f, 431.157013f, 1.029740f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4463.830078f, 2015.180054f, 430.299988f, 1.431170f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4494.580078f, 1943.760010f, 435.627014f, 6.195920f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4450.149902f, 1897.579956f, 435.045013f, 4.398230f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
new WintergraspObjectPositionData(4428.870117f, 1906.869995f, 432.648010f, 3.996800f, WGNpcs.GuardH, WGNpcs.GuardA), // Standing Guard
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static WintergraspTowerCannonData[] TowerCannon =
|
||||
{
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190221,
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(5255.88f, 3047.63f, 438.499f, 3.13677f),
|
||||
new Position(5280.9f, 3071.32f, 438.499f, 1.62879f),
|
||||
},
|
||||
},
|
||||
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190373,
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(5138.59f, 2935.16f, 439.845f, 3.11723f),
|
||||
new Position(5163.06f, 2959.52f, 439.846f, 1.47258f),
|
||||
},
|
||||
},
|
||||
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190377,
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(5163.84f, 2723.74f, 439.844f, 1.3994f),
|
||||
new Position(5139.69f, 2747.4f, 439.844f, 3.17221f),
|
||||
},
|
||||
},
|
||||
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190378,
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(5278.21f, 2607.23f, 439.755f, 4.71944f),
|
||||
new Position(5255.01f, 2631.98f, 439.755f, 3.15257f),
|
||||
},
|
||||
},
|
||||
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190356,
|
||||
TowerCannonBottom = new Position[]
|
||||
{
|
||||
new Position(4537.380371f, 3599.531738f, 402.886993f, 3.998462f),
|
||||
new Position(4581.497559f, 3604.087158f, 402.886963f, 5.651723f),
|
||||
},
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(4469.448242f, 1966.623779f, 465.647217f, 1.153573f),
|
||||
new Position(4581.895996f, 3626.438477f, 426.539062f, 0.117806f),
|
||||
},
|
||||
},
|
||||
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190357,
|
||||
TowerCannonBottom = new Position[]
|
||||
{
|
||||
new Position(4421.640137f, 2799.935791f, 412.630920f, 5.459298f),
|
||||
new Position(4420.263184f, 2845.340332f, 412.630951f, 0.742197f),
|
||||
},
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(4423.430664f, 2822.762939f, 436.283142f, 6.223487f),
|
||||
new Position(4397.825684f, 2847.629639f, 436.283325f, 1.579430f),
|
||||
new Position(4398.814941f, 2797.266357f, 436.283051f, 4.703747f),
|
||||
},
|
||||
},
|
||||
|
||||
new WintergraspTowerCannonData()
|
||||
{
|
||||
towerEntry = 190358,
|
||||
TowerCannonBottom = new Position[]
|
||||
{
|
||||
new Position(4448.138184f, 1974.998779f, 441.995911f, 1.967238f),
|
||||
new Position(4448.713379f, 1955.148682f, 441.995178f, 0.380733f),
|
||||
},
|
||||
TurretTop = new Position[]
|
||||
{
|
||||
new Position(4469.448242f, 1966.623779f, 465.647217f, 1.153573f),
|
||||
new Position(4481.996582f, 1933.658325f, 465.647186f, 5.873029f),
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
public static StaticWintergraspWorkshopInfo[] WorkshopData =
|
||||
{
|
||||
new StaticWintergraspWorkshopInfo()
|
||||
{
|
||||
WorkshopId = WGWorkshopIds.Ne,
|
||||
WorldStateId = WorldStates.BattlefieldWgWorkshopNe,
|
||||
AllianceCaptureTextId = WintergraspText.SunkenRingCaptureAlliance,
|
||||
AllianceAttackTextId = WintergraspText.SunkenRingAttackAlliance,
|
||||
HordeCaptureTextId = WintergraspText.SunkenRingCaptureHorde,
|
||||
HordeAttackTextId = WintergraspText.SunkenRingAttackHorde
|
||||
},
|
||||
new StaticWintergraspWorkshopInfo()
|
||||
{
|
||||
WorkshopId = WGWorkshopIds.Nw,
|
||||
WorldStateId = WorldStates.BattlefieldWgWorkshopNw,
|
||||
AllianceCaptureTextId = WintergraspText.BrokenTempleCaptureAlliance,
|
||||
AllianceAttackTextId = WintergraspText.BrokenTempleAttackAlliance,
|
||||
HordeCaptureTextId = WintergraspText.BrokenTempleCaptureHorde,
|
||||
HordeAttackTextId = WintergraspText.BrokenTempleAttackHorde
|
||||
},
|
||||
new StaticWintergraspWorkshopInfo()
|
||||
{
|
||||
WorkshopId = WGWorkshopIds.Se,
|
||||
WorldStateId = WorldStates.BattlefieldWgWorkshopSe,
|
||||
AllianceCaptureTextId = WintergraspText.EastsparkCaptureAlliance,
|
||||
AllianceAttackTextId = WintergraspText.EastsparkAttackAlliance,
|
||||
HordeCaptureTextId = WintergraspText.EastsparkCaptureHorde,
|
||||
HordeAttackTextId = WintergraspText.EastsparkAttackHorde
|
||||
},
|
||||
|
||||
new StaticWintergraspWorkshopInfo()
|
||||
{
|
||||
WorkshopId = WGWorkshopIds.Sw,
|
||||
WorldStateId = WorldStates.BattlefieldWgWorkshopSw,
|
||||
AllianceCaptureTextId = WintergraspText.WestsparkCaptureAlliance,
|
||||
AllianceAttackTextId = WintergraspText.WestsparkAttackAlliance,
|
||||
HordeCaptureTextId = WintergraspText.WestsparkCaptureHorde,
|
||||
HordeAttackTextId = WintergraspText.WestsparkAttackHorde
|
||||
},
|
||||
|
||||
// KEEP WORKSHOPS - It can't be taken, so it doesn't have a textids
|
||||
new StaticWintergraspWorkshopInfo()
|
||||
{
|
||||
WorkshopId = WGWorkshopIds.KeepWest,
|
||||
WorldStateId = WorldStates.BattlefieldWgWorkshopKW
|
||||
},
|
||||
|
||||
new StaticWintergraspWorkshopInfo()
|
||||
{
|
||||
WorkshopId = WGWorkshopIds.KeepEast,
|
||||
WorldStateId = WorldStates.BattlefieldWgWorkshopKE
|
||||
}
|
||||
};
|
||||
#endregion
|
||||
}
|
||||
|
||||
struct WGData
|
||||
{
|
||||
public const int DamagedTowerDef = 0;
|
||||
public const int BrokenTowerDef = 1;
|
||||
public const int DamagedTowerAtt = 2;
|
||||
public const int BrokenTowerAtt = 3;
|
||||
public const int MaxVehicleA = 4;
|
||||
public const int MaxVehicleH = 5;
|
||||
public const int VehicleA = 6;
|
||||
public const int VehicleH = 7;
|
||||
public const int Max = 8;
|
||||
}
|
||||
|
||||
struct WGAchievements
|
||||
{
|
||||
public const uint WinWg = 1717;
|
||||
public const uint WinWg100 = 1718; // @Todo: Has To Be Implemented
|
||||
public const uint WgGnomeslaughter = 1723; // @Todo: Has To Be Implemented
|
||||
public const uint WgTowerDestroy = 1727;
|
||||
public const uint DestructionDerbyA = 1737; // @Todo: Has To Be Implemented
|
||||
public const uint WgTowerCannonKill = 1751; // @Todo: Has To Be Implemented
|
||||
public const uint WgMasterA = 1752; // @Todo: Has To Be Implemented
|
||||
public const uint WinWgTimer10 = 1755;
|
||||
public const uint StoneKeeper50 = 2085; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper100 = 2086; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper250 = 2087; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper500 = 2088; // @Todo: Has To Be Implemented
|
||||
public const uint StoneKeeper1000 = 2089; // @Todo: Has To Be Implemented
|
||||
public const uint WgRanger = 2199; // @Todo: Has To Be Implemented
|
||||
public const uint DestructionDerbyH = 2476; // @Todo: Has To Be Implemented
|
||||
public const uint WgMasterH = 2776; // @Todo: Has To Be Implemented
|
||||
}
|
||||
|
||||
struct WGSpells
|
||||
{
|
||||
// Wartime Auras
|
||||
public const uint Recruit = 37795;
|
||||
public const uint Corporal = 33280;
|
||||
public const uint Lieutenant = 55629;
|
||||
public const uint Tenacity = 58549;
|
||||
public const uint TenacityVehicle = 59911;
|
||||
public const uint TowerControl = 62064;
|
||||
public const uint SpiritualImmunity = 58729;
|
||||
public const uint GreatHonor = 58555;
|
||||
public const uint GreaterHonor = 58556;
|
||||
public const uint GreatestHonor = 58557;
|
||||
public const uint AllianceFlag = 14268;
|
||||
public const uint HordeFlag = 14267;
|
||||
public const uint GrabPassenger = 61178;
|
||||
|
||||
// Reward Spells
|
||||
public const uint VictoryReward = 56902;
|
||||
public const uint DefeatReward = 58494;
|
||||
public const uint DamagedTower = 59135;
|
||||
public const uint DestroyedTower = 59136;
|
||||
public const uint DamagedBuilding = 59201;
|
||||
public const uint IntactBuilding = 59203;
|
||||
|
||||
public const uint TeleportBridge = 59096;
|
||||
public const uint TeleportFortress = 60035;
|
||||
|
||||
public const uint TeleportDalaran = 53360;
|
||||
public const uint VictoryAura = 60044;
|
||||
|
||||
// Other Spells
|
||||
public const uint WintergraspWater = 36444;
|
||||
public const uint EssenceOfWintergrasp = 58045;
|
||||
public const uint WintergraspRestrictedFlightArea = 91604;
|
||||
|
||||
// Phasing Spells
|
||||
public const uint HordeControlsFactoryPhaseShift = 56618; // Adds Phase 16
|
||||
public const uint AllianceControlsFactoryPhaseShift = 56617; // Adds Phase 32
|
||||
|
||||
public const uint HordeControlPhaseShift = 55773; // Adds Phase 64
|
||||
public const uint AllianceControlPhaseShift = 55774; // Adds Phase 128
|
||||
}
|
||||
|
||||
struct WGNpcs
|
||||
{
|
||||
public const uint GuardH = 30739;
|
||||
public const uint GuardA = 30740;
|
||||
public const uint Stalker = 15214;
|
||||
|
||||
public const uint TaunkaSpiritGuide = 31841; // Horde Spirit Guide For Wintergrasp
|
||||
public const uint DwarvenSpiritGuide = 31842; // Alliance Spirit Guide For Wintergrasp
|
||||
|
||||
public const uint SiegeEngineAlliance = 28312;
|
||||
public const uint SiegeEngineHorde = 32627;
|
||||
public const uint Catapult = 27881;
|
||||
public const uint Demolisher = 28094;
|
||||
public const uint TowerCannon = 28366;
|
||||
}
|
||||
|
||||
struct WGGameObjects
|
||||
{
|
||||
public const uint FactoryBannerNe = 190475;
|
||||
public const uint FactoryBannerNw = 190487;
|
||||
public const uint FactoryBannerSe = 194959;
|
||||
public const uint FactoryBannerSw = 194962;
|
||||
|
||||
public const uint TitanSRelic = 192829;
|
||||
|
||||
public const uint FortressTower1 = 190221;
|
||||
public const uint FortressTower2 = 190373;
|
||||
public const uint FortressTower3 = 190377;
|
||||
public const uint FortressTower4 = 190378;
|
||||
|
||||
public const uint ShadowsightTower = 190356;
|
||||
public const uint WinterSEdgeTower = 190357;
|
||||
public const uint FlamewatchTower = 190358;
|
||||
|
||||
public const uint FortressGate = 190375;
|
||||
public const uint VaultGate = 191810;
|
||||
|
||||
public const uint KeepCollisionWall = 194323;
|
||||
}
|
||||
|
||||
struct WintergraspTowerIds
|
||||
{
|
||||
public const byte FortressNW = 0;
|
||||
public const byte FortressSW = 1;
|
||||
public const byte FortressSE = 2;
|
||||
public const byte FortressNE = 3;
|
||||
public const byte Shadowsight = 4;
|
||||
public const byte WintersEdge = 5;
|
||||
public const byte Flamewatch = 6;
|
||||
}
|
||||
|
||||
struct WGWorkshopIds
|
||||
{
|
||||
public const byte Se = 0;
|
||||
public const byte Sw = 1;
|
||||
public const byte Ne = 2;
|
||||
public const byte Nw = 3;
|
||||
public const byte KeepWest = 4;
|
||||
public const byte KeepEast = 5;
|
||||
}
|
||||
|
||||
struct WGGossipText
|
||||
{
|
||||
public const int GYNE = 20071;
|
||||
public const int GYNW = 20072;
|
||||
public const int GYSE = 20074;
|
||||
public const int GYSW = 20073;
|
||||
public const int GYKeep = 20070;
|
||||
public const int GYHorde = 20075;
|
||||
public const int GYAlliance = 20076;
|
||||
}
|
||||
|
||||
struct WGGraveyardId
|
||||
{
|
||||
public const uint WorkshopNE = 0;
|
||||
public const uint WorkshopNW = 1;
|
||||
public const uint WorkshopSE = 2;
|
||||
public const uint WorkshopSW = 3;
|
||||
public const uint Keep = 4;
|
||||
public const uint Horde = 5;
|
||||
public const uint Alliance = 6;
|
||||
public const uint Max = 7;
|
||||
}
|
||||
|
||||
struct WintergraspQuests
|
||||
{
|
||||
public const uint VictoryAlliance = 13181;
|
||||
public const uint VictoryHorde = 13183;
|
||||
public const uint CreditTowersDestroyed = 35074;
|
||||
public const uint CreditDefendSiege = 31284;
|
||||
}
|
||||
|
||||
struct WintergraspText
|
||||
{
|
||||
// Invisible Stalker
|
||||
public const byte SouthernTowerDamage = 1;
|
||||
public const byte SouthernTowerDestroy = 2;
|
||||
public const byte EasternTowerDamage = 3;
|
||||
public const byte EasternTowerDestroy = 4;
|
||||
public const byte WesternTowerDamage = 5;
|
||||
public const byte WesternTowerDestroy = 6;
|
||||
public const byte NwKeeptowerDamage = 7;
|
||||
public const byte NwKeeptowerDestroy = 8;
|
||||
public const byte SeKeeptowerDamage = 9;
|
||||
public const byte SeKeeptowerDestroy = 10;
|
||||
public const byte BrokenTempleAttackAlliance = 11;
|
||||
public const byte BrokenTempleCaptureAlliance = 12;
|
||||
public const byte BrokenTempleAttackHorde = 13;
|
||||
public const byte BrokenTempleCaptureHorde = 14;
|
||||
public const byte EastsparkAttackAlliance = 15;
|
||||
public const byte EastsparkCaptureAlliance = 16;
|
||||
public const byte EastsparkAttackHorde = 17;
|
||||
public const byte EastsparkCaptureHorde = 18;
|
||||
public const byte SunkenRingAttackAlliance = 19;
|
||||
public const byte SunkenRingCaptureAlliance = 20;
|
||||
public const byte SunkenRingAttackHorde = 21;
|
||||
public const byte SunkenRingCaptureHorde = 22;
|
||||
public const byte WestsparkAttackAlliance = 23;
|
||||
public const byte WestsparkCaptureAlliance = 24;
|
||||
public const byte WestsparkAttackHorde = 25;
|
||||
public const byte WestsparkCaptureHorde = 26;
|
||||
|
||||
public const byte StartGrouping = 27;
|
||||
public const byte StartBattle = 28;
|
||||
public const byte FortressDefendAlliance = 29;
|
||||
public const byte FortressCaptureAlliance = 30;
|
||||
public const byte FortressDefendHorde = 31;
|
||||
public const byte FortressCaptureHorde = 32;
|
||||
|
||||
public const byte NeKeeptowerDamage = 33;
|
||||
public const byte NeKeeptowerDestroy = 34;
|
||||
public const byte SwKeeptowerDamage = 35;
|
||||
public const byte SwKeeptowerDestroy = 36;
|
||||
|
||||
public const byte RankCorporal = 37;
|
||||
public const byte RankFirstLieutenant = 38;
|
||||
}
|
||||
|
||||
enum WGGameObjectState
|
||||
{
|
||||
None,
|
||||
NeutralIntact,
|
||||
NeutralDamage,
|
||||
NeutralDestroy,
|
||||
HordeIntact,
|
||||
HordeDamage,
|
||||
HordeDestroy,
|
||||
AllianceIntact,
|
||||
AllianceDamage,
|
||||
AllianceDestroy
|
||||
}
|
||||
|
||||
enum WGGameObjectBuildingType
|
||||
{
|
||||
Door,
|
||||
Titanrelic,
|
||||
Wall,
|
||||
DoorLast,
|
||||
KeepTower,
|
||||
Tower
|
||||
}
|
||||
|
||||
//Data Structs
|
||||
struct BfWGCoordGY
|
||||
{
|
||||
public BfWGCoordGY(float x, float y, float z, float o, uint graveyardId, int textId, uint startControl)
|
||||
{
|
||||
pos = new Position(x, y, z, o);
|
||||
GraveyardID = graveyardId;
|
||||
TextId = textId;
|
||||
StartControl = startControl;
|
||||
}
|
||||
|
||||
public Position pos;
|
||||
public uint GraveyardID;
|
||||
public int TextId;// for gossip menu
|
||||
public uint StartControl;
|
||||
}
|
||||
|
||||
struct WintergraspBuildingSpawnData
|
||||
{
|
||||
public WintergraspBuildingSpawnData(uint entry, uint worldstate, float x, float y, float z, float o, float rX, float rY, float rZ, float rW, WGGameObjectBuildingType type)
|
||||
{
|
||||
Entry = entry;
|
||||
WorldState = worldstate;
|
||||
Pos = new Position(x, y, z, o);
|
||||
Rot = new Quaternion(rX, rY, rZ, rW);
|
||||
BuildingType = type;
|
||||
}
|
||||
|
||||
public uint Entry;
|
||||
public uint WorldState;
|
||||
public Position Pos;
|
||||
public Quaternion Rot;
|
||||
public WGGameObjectBuildingType BuildingType;
|
||||
}
|
||||
|
||||
struct WintergraspGameObjectData
|
||||
{
|
||||
public WintergraspGameObjectData(float x, float y, float z, float o, float rX, float rY, float rZ, float rW, uint hordeEntry, uint allianceEntry)
|
||||
{
|
||||
Pos = new Position(x, y, z, o);
|
||||
Rot = new Quaternion(rX, rY, rZ, rW);
|
||||
HordeEntry = hordeEntry;
|
||||
AllianceEntry = allianceEntry;
|
||||
}
|
||||
|
||||
public Position Pos;
|
||||
public Quaternion Rot;
|
||||
public uint HordeEntry;
|
||||
public uint AllianceEntry;
|
||||
}
|
||||
|
||||
class WintergraspTowerData
|
||||
{
|
||||
public uint towerEntry; // Gameobject id of tower
|
||||
public WintergraspGameObjectData[] GameObject = new WintergraspGameObjectData[6]; // Gameobject position and entry (Horde/Alliance)
|
||||
|
||||
// Creature: Turrets and Guard // @todo: Killed on Tower destruction ? Tower damage ? Requires confirming
|
||||
public WintergraspObjectPositionData[] CreatureBottom = new WintergraspObjectPositionData[9];
|
||||
}
|
||||
|
||||
struct WintergraspObjectPositionData
|
||||
{
|
||||
public WintergraspObjectPositionData(float x, float y, float z, float o, uint hordeEntry, uint allianceEntry)
|
||||
{
|
||||
Pos = new Position(x, y, z, o);
|
||||
HordeEntry = hordeEntry;
|
||||
AllianceEntry = allianceEntry;
|
||||
}
|
||||
|
||||
public Position Pos;
|
||||
public uint HordeEntry;
|
||||
public uint AllianceEntry;
|
||||
}
|
||||
|
||||
class WintergraspTowerCannonData
|
||||
{
|
||||
public WintergraspTowerCannonData()
|
||||
{
|
||||
TowerCannonBottom = System.Array.Empty<Position>();
|
||||
TurretTop = System.Array.Empty<Position>();
|
||||
}
|
||||
|
||||
public uint towerEntry;
|
||||
public Position[] TowerCannonBottom;
|
||||
public Position[] TurretTop;
|
||||
}
|
||||
|
||||
class StaticWintergraspWorkshopInfo
|
||||
{
|
||||
public byte WorkshopId;
|
||||
public WorldStates WorldStateId;
|
||||
public byte AllianceCaptureTextId;
|
||||
public byte AllianceAttackTextId;
|
||||
public byte HordeCaptureTextId;
|
||||
public byte HordeAttackTextId;
|
||||
}
|
||||
|
||||
class StaticWintergraspTowerInfo
|
||||
{
|
||||
public StaticWintergraspTowerInfo(byte towerId, byte damagedTextId, byte destroyedTextId)
|
||||
{
|
||||
TowerId = towerId;
|
||||
DamagedTextId = damagedTextId;
|
||||
DestroyedTextId = destroyedTextId;
|
||||
}
|
||||
|
||||
public byte TowerId;
|
||||
public byte DamagedTextId;
|
||||
public byte DestroyedTextId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
|
||||
namespace Scripts.Draenor.ZoneAssaultOnTheDarkPortal
|
||||
{
|
||||
struct SpellIds
|
||||
{
|
||||
public const uint DarkPortalRunAway = 158985;
|
||||
}
|
||||
|
||||
[Script] // 621 - Dark Portal: Run away
|
||||
class scene_dark_portal_run_away : SceneScript
|
||||
{
|
||||
public scene_dark_portal_run_away() : base("scene_dark_portal_run_away") { }
|
||||
|
||||
public override void OnSceneComplete(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
|
||||
{
|
||||
player.RemoveAurasDueToSpell(SpellIds.DarkPortalRunAway);
|
||||
PhasingHandler.OnConditionChange(player);
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 34420 - The Cost of War
|
||||
class quest_the_cost_of_war : QuestScript
|
||||
{
|
||||
public quest_the_cost_of_war() : base("quest_the_cost_of_war") { }
|
||||
|
||||
public override void OnQuestStatusChange(Player player, Quest quest, QuestStatus oldStatus, QuestStatus newStatus)
|
||||
{
|
||||
if (newStatus == QuestStatus.None)
|
||||
{
|
||||
player.RemoveAurasDueToSpell(SpellIds.DarkPortalRunAway);
|
||||
PhasingHandler.OnConditionChange(player);
|
||||
}
|
||||
else if (newStatus == QuestStatus.Incomplete)
|
||||
{
|
||||
player.CastSpell(player, SpellIds.DarkPortalRunAway, TriggerCastFlags.FullMask);
|
||||
PhasingHandler.OnConditionChange(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
|
||||
namespace Scripts.Draenor
|
||||
namespace Scripts.Draenor.ZoneDraenorShadowmoonValley
|
||||
{
|
||||
// 79243 - Baros Alexston
|
||||
struct MiscConst
|
||||
@@ -25,13 +24,14 @@ namespace Scripts.Draenor
|
||||
public const uint SpellQuest34586Killcredit = 161033;
|
||||
public const uint SpellCreateGarrisonShadowmoonValleyAlliance = 156020;
|
||||
public const uint SpellDespawnAllSummonsGarrisonIntroOnly = 160938;
|
||||
|
||||
public static Position GarrisonLevelOneCreationPlayerPosition = new Position(1904.58f, 312.906f, 88.9542f, 4.303615f);
|
||||
}
|
||||
|
||||
|
||||
[Script]
|
||||
class npc_baros_alexston : ScriptedAI
|
||||
{
|
||||
Position GarrisonLevelOneCreationPlayerPosition = new(1904.58f, 312.906f, 88.9542f, 4.303615f);
|
||||
|
||||
public npc_baros_alexston(Creature creature) : base(creature) { }
|
||||
|
||||
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
@@ -42,7 +42,7 @@ namespace Scripts.Draenor
|
||||
player.CastSpell(player, MiscConst.SpellQuest34586Killcredit, true);
|
||||
player.CastSpell(player, MiscConst.SpellCreateGarrisonShadowmoonValleyAlliance, true);
|
||||
player.CastSpell(player, MiscConst.SpellDespawnAllSummonsGarrisonIntroOnly, true);
|
||||
player.NearTeleportTo(MiscConst.GarrisonLevelOneCreationPlayerPosition);
|
||||
player.NearTeleportTo(GarrisonLevelOneCreationPlayerPosition);
|
||||
|
||||
PhasingHandler.OnConditionChange(player);
|
||||
}
|
||||
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
|
||||
namespace Scripts.DragonIsles.AberrusTheShadowedCrucible
|
||||
{
|
||||
//uint EncounterCount = 9;
|
||||
|
||||
struct DataTypes
|
||||
{
|
||||
// Encounters
|
||||
public const uint KazzaraTheHellforged = 0;
|
||||
public const uint TheAmalgamationChamber = 1;
|
||||
public const uint TheForgottenExperiments = 2;
|
||||
public const uint AssaultOfTheZaqali = 3;
|
||||
public const uint RashokTheElder = 4;
|
||||
public const uint ZskarnTheVigilantSteward = 5;
|
||||
public const uint Magmorax = 6;
|
||||
public const uint EchoOfNeltharion = 7;
|
||||
public const uint ScalecommanderSarkareth = 8;
|
||||
|
||||
// Additional public const uint
|
||||
public const uint KazzaraGate = 9;
|
||||
|
||||
// Misc
|
||||
public const uint KazzaraIntroDone = 10;
|
||||
}
|
||||
|
||||
struct CreatureIds
|
||||
{
|
||||
// public const uint Bosses
|
||||
public const uint BossKazzaraTheHellforged = 201261;
|
||||
|
||||
public const uint BossEternalBlaze = 201773;
|
||||
public const uint BossEssenceOfShadow = 201774;
|
||||
public const uint BossShadowflameAmalgamation = 201934;
|
||||
|
||||
public const uint BossNeldris = 200912;
|
||||
public const uint BossThadrion = 200913;
|
||||
public const uint BossRionthus = 200918;
|
||||
|
||||
public const uint BossWarlordKagni = 199659;
|
||||
public const uint BossRashokTheElder = 201320;
|
||||
public const uint BossZskarnTheVigilantSteward = 202637;
|
||||
public const uint BossMagmorax = 201579;
|
||||
public const uint BossEchoOfNeltharion = 204223;
|
||||
public const uint BossScalecommanderSarkareth = 205319;
|
||||
|
||||
// Misc
|
||||
public const uint SabellianAtAberrusEntrance = 201575;
|
||||
public const uint ScalecommanderSarkarethAtKazzara = 202416;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
public const uint KazzaraDoor = 398742;
|
||||
public const uint KazzaraGate = 397996;
|
||||
public const uint InvisibleDoor = 398588;
|
||||
}
|
||||
|
||||
struct MiscConst
|
||||
{
|
||||
public const int ActionStartKazzaraIntro = 0;
|
||||
|
||||
public const uint SpellAberrusEntranceRpConversation3 = 403409; // Winglord Dezran, Sarkareth and Zskarn (Kazzara Summon)
|
||||
}
|
||||
|
||||
[Script]
|
||||
class instance_aberrus_the_shadowed_crucible : InstanceMapScript
|
||||
{
|
||||
static ObjectData[] creatureData =
|
||||
{
|
||||
new(CreatureIds.BossKazzaraTheHellforged, DataTypes.KazzaraTheHellforged),
|
||||
new(CreatureIds.BossShadowflameAmalgamation, DataTypes.TheAmalgamationChamber),
|
||||
new(CreatureIds.BossRionthus, DataTypes.TheForgottenExperiments),
|
||||
new(CreatureIds.BossWarlordKagni, DataTypes.AssaultOfTheZaqali),
|
||||
new(CreatureIds.BossRashokTheElder, DataTypes.RashokTheElder),
|
||||
new(CreatureIds.BossZskarnTheVigilantSteward, DataTypes.ZskarnTheVigilantSteward),
|
||||
new(CreatureIds.BossMagmorax, DataTypes.Magmorax),
|
||||
new(CreatureIds.BossEchoOfNeltharion, DataTypes.EchoOfNeltharion),
|
||||
new(CreatureIds.BossScalecommanderSarkareth, DataTypes.ScalecommanderSarkareth)
|
||||
};
|
||||
|
||||
static DoorData[] doorData =
|
||||
{
|
||||
new (GameObjectIds.KazzaraDoor, DataTypes.KazzaraTheHellforged, DoorType.Room)
|
||||
};
|
||||
|
||||
static ObjectData[] objData =
|
||||
{
|
||||
new (GameObjectIds.KazzaraGate, DataTypes.KazzaraGate)
|
||||
};
|
||||
|
||||
static DungeonEncounterData[] encounters =
|
||||
{
|
||||
new(DataTypes.KazzaraTheHellforged, 2688),
|
||||
new(DataTypes.TheAmalgamationChamber, 2687),
|
||||
new(DataTypes.TheForgottenExperiments, 2693),
|
||||
new(DataTypes.AssaultOfTheZaqali, 2682),
|
||||
new(DataTypes.RashokTheElder, 2680),
|
||||
new(DataTypes.ZskarnTheVigilantSteward, 2689),
|
||||
new(DataTypes.Magmorax, 2683),
|
||||
new(DataTypes.EchoOfNeltharion, 2684),
|
||||
new(DataTypes.ScalecommanderSarkareth, 2685)
|
||||
};
|
||||
|
||||
public instance_aberrus_the_shadowed_crucible() : base(nameof(instance_aberrus_the_shadowed_crucible), 2569) { }
|
||||
|
||||
class instance_aberrus_the_shadowed_crucible_InstanceMapScript : InstanceScript
|
||||
{
|
||||
byte _deadSunderedMobs;
|
||||
bool _kazzaraIntroDone;
|
||||
|
||||
public instance_aberrus_the_shadowed_crucible_InstanceMapScript(InstanceMap map) : base(map)
|
||||
{
|
||||
SetHeaders("Aberrus");
|
||||
SetBossNumber(9);
|
||||
LoadObjectData(creatureData, objData);
|
||||
LoadDoorData(doorData);
|
||||
LoadDungeonEncounterData(encounters);
|
||||
|
||||
_kazzaraIntroDone = false;
|
||||
_deadSunderedMobs = 0;
|
||||
}
|
||||
|
||||
public override uint GetData(uint dataId)
|
||||
{
|
||||
switch (dataId)
|
||||
{
|
||||
case DataTypes.KazzaraIntroDone:
|
||||
return _kazzaraIntroDone ? 1 : 0u;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void SetData(uint dataId, uint value)
|
||||
{
|
||||
switch (dataId)
|
||||
{
|
||||
case DataTypes.KazzaraIntroDone:
|
||||
_kazzaraIntroDone = true; // no need to pass value, it will never reset to false
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUnitDeath(Unit unit)
|
||||
{
|
||||
Creature creature = unit.ToCreature();
|
||||
if (creature == null)
|
||||
return;
|
||||
|
||||
if (creature.HasStringId("sundered_mob"))
|
||||
{
|
||||
if (_deadSunderedMobs >= 6)
|
||||
return;
|
||||
|
||||
_deadSunderedMobs++;
|
||||
if (_deadSunderedMobs >= 6)
|
||||
{
|
||||
Creature sarkareth = creature.FindNearestCreature(CreatureIds.ScalecommanderSarkarethAtKazzara, 300.0f);
|
||||
if (sarkareth == null)
|
||||
return;
|
||||
|
||||
sarkareth.CastSpell(null, MiscConst.SpellAberrusEntranceRpConversation3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||
{
|
||||
return new instance_aberrus_the_shadowed_crucible_InstanceMapScript(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Scripts.DragonIsles.AberrusTheShadowedCrucible.KazzaraTheHellforged
|
||||
{
|
||||
struct SpellIds
|
||||
{
|
||||
// Sundered NPCs
|
||||
public const uint Fear = 220540;
|
||||
|
||||
// Kazzara
|
||||
public const uint DreadLanding = 411872;
|
||||
public const uint KazzaraIntro = 410541;
|
||||
}
|
||||
|
||||
[Script] // 201261 - Kazzara the Hellforged
|
||||
class boss_kazzara_the_hellforged : BossAI
|
||||
{
|
||||
public boss_kazzara_the_hellforged(Creature creature) : base(creature, DataTypes.KazzaraTheHellforged) { }
|
||||
|
||||
public override void JustAppeared()
|
||||
{
|
||||
if (instance.GetData(DataTypes.KazzaraIntroDone) == 0)
|
||||
{
|
||||
me.SetUninteractible(true);
|
||||
me.SetImmuneToAll(true);
|
||||
me.SetVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoAction(int actionId)
|
||||
{
|
||||
switch (actionId)
|
||||
{
|
||||
case MiscConst.ActionStartKazzaraIntro:
|
||||
{
|
||||
GameObject gate = instance.GetGameObject(DataTypes.KazzaraGate);
|
||||
if (gate != null)
|
||||
{
|
||||
gate.SetFlag(GameObjectFlags.InUse);
|
||||
gate.SetGoState(GameObjectState.Ready);
|
||||
}
|
||||
|
||||
me.SetVisible(true);
|
||||
|
||||
DoCast(SpellIds.DreadLanding);
|
||||
DoCast(SpellIds.KazzaraIntro);
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(1) + TimeSpan.FromMilliseconds(500), _ =>
|
||||
{
|
||||
List<Creature> sunderedMobs = me.GetCreatureListWithOptionsInGrid(50.0f, new FindCreatureOptions() { StringId = "sundered_mob" });
|
||||
foreach (Creature sunderedMob in sunderedMobs)
|
||||
{
|
||||
if (!sunderedMob.IsAlive() || sunderedMob.IsInCombat())
|
||||
continue;
|
||||
|
||||
sunderedMob.CastSpell(null, SpellIds.Fear, false);
|
||||
}
|
||||
});
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), _ =>
|
||||
{
|
||||
me.SetUninteractible(false);
|
||||
me.SetImmuneToAll(false);
|
||||
});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
|
||||
namespace Scripts.DragonIsles.AzureVault
|
||||
{
|
||||
struct DataTypes
|
||||
{
|
||||
// Encounters
|
||||
public const uint Leymor = 0;
|
||||
public const uint Azureblade = 1;
|
||||
public const uint TelashGreywing = 2;
|
||||
public const uint Umbrelskul = 3;
|
||||
|
||||
public const uint LeymorIntroDone = 4;
|
||||
}
|
||||
|
||||
struct CreatureIds
|
||||
{
|
||||
// Bosses
|
||||
public const uint BossLeymor = 186644;
|
||||
public const uint BossAzureblade = 186739;
|
||||
public const uint BossTelashGreywing = 199614;
|
||||
public const uint BossUmbrelskul = 186738;
|
||||
|
||||
// Leymor
|
||||
public const uint ArcaneTender = 191164;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
public const uint ArcaneVaultsDoorLeymorEntrance = 380536;
|
||||
public const uint ArcaneVaultsDoorLeymorExit = 377951;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class instance_azure_vault : InstanceMapScript
|
||||
{
|
||||
static BossBoundaryEntry[] boundaries =
|
||||
{
|
||||
new(DataTypes.Leymor, new CircleBoundary(new Position(-5129.39f, 1253.30f), 75.0f))
|
||||
};
|
||||
|
||||
static ObjectData[] creatureData =
|
||||
{
|
||||
new(CreatureIds.BossLeymor, DataTypes.Leymor),
|
||||
new(CreatureIds.BossAzureblade, DataTypes.Azureblade),
|
||||
new(CreatureIds.BossTelashGreywing, DataTypes.TelashGreywing),
|
||||
new(CreatureIds.BossUmbrelskul, DataTypes.Umbrelskul),
|
||||
};
|
||||
|
||||
static DoorData[] doorData =
|
||||
{
|
||||
new(GameObjectIds.ArcaneVaultsDoorLeymorEntrance, DataTypes.Leymor, DoorType.Room),
|
||||
new(GameObjectIds.ArcaneVaultsDoorLeymorExit, DataTypes.Leymor, DoorType.Passage),
|
||||
};
|
||||
|
||||
static DungeonEncounterData[] encounters =
|
||||
{
|
||||
new(DataTypes.Leymor, 2582),
|
||||
new(DataTypes.Azureblade, 2585),
|
||||
new(DataTypes.TelashGreywing, 2583),
|
||||
new(DataTypes.Umbrelskul, 2584)
|
||||
};
|
||||
|
||||
public instance_azure_vault() : base(nameof(instance_azure_vault), 2515) { }
|
||||
|
||||
class instance_azure_vault_InstanceMapScript : InstanceScript
|
||||
{
|
||||
public instance_azure_vault_InstanceMapScript(InstanceMap map) : base(map)
|
||||
{
|
||||
SetHeaders("AzureVault");
|
||||
SetBossNumber(4);
|
||||
LoadObjectData(creatureData, null);
|
||||
LoadDoorData(doorData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
LoadDungeonEncounterData(encounters);
|
||||
|
||||
_leymorIntroDone = false;
|
||||
}
|
||||
|
||||
public override uint GetData(uint dataId)
|
||||
{
|
||||
switch (dataId)
|
||||
{
|
||||
case DataTypes.LeymorIntroDone:
|
||||
return _leymorIntroDone ? 1 : 0u;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void SetData(uint dataId, uint value)
|
||||
{
|
||||
switch (dataId)
|
||||
{
|
||||
case DataTypes.LeymorIntroDone:
|
||||
_leymorIntroDone = true; // no need to pass value, it will never reset to false
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool _leymorIntroDone;
|
||||
}
|
||||
|
||||
public override InstanceScript GetInstanceScript(InstanceMap map)
|
||||
{
|
||||
return new instance_azure_vault_InstanceMapScript(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,478 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
|
||||
namespace Scripts.DragonIsles.AzureVault.Leymor
|
||||
{
|
||||
struct SpellIds
|
||||
{
|
||||
// Leymor
|
||||
public const uint Stasis = 375729;
|
||||
public const uint ArcaneEruption = 375749;
|
||||
public const uint LeyLineSprouts = 374364;
|
||||
public const uint LeyLineSproutsMissile = 374362;
|
||||
public const uint ConsumingStomp = 374720;
|
||||
public const uint ConsumingStompDamage = 374731;
|
||||
public const uint EruptingFissure = 386660;
|
||||
public const uint EruptingFissureSproutSelector = 394154;
|
||||
public const uint ExplosiveBrand = 374567;
|
||||
public const uint ExplosiveBrandDamage = 374570;
|
||||
public const uint ExplosiveBrandKnockback = 374582;
|
||||
public const uint InfusedStrike = 374789;
|
||||
|
||||
// Ley-Line Sprout
|
||||
public const uint VolatileSapling = 388654;
|
||||
public const uint LeyLineSproutAt = 374161;
|
||||
public const uint ArcanePower = 374736;
|
||||
|
||||
// Volatile Sapling
|
||||
public const uint SappyBurst = 375591;
|
||||
|
||||
// Arcane Tender
|
||||
public const uint StasisRitual = 375732;
|
||||
public const uint StasisRitualMissile = 375738;
|
||||
public const uint ErraticGrowthChannel = 375596;
|
||||
public const uint WildEruption = 375652;
|
||||
public const uint WildEruptionMissile = 375650;
|
||||
}
|
||||
|
||||
struct MiscConst
|
||||
{
|
||||
public const uint SayAnnounceAwaken = 0;
|
||||
|
||||
public const uint SpellVisualKitSproutDeath = 159239;
|
||||
|
||||
public const uint NpcLeylineSprouts = 190509;
|
||||
|
||||
public const int ActionArcaneTenderDeath = 1;
|
||||
}
|
||||
|
||||
[Script] // 186644 - Leymor
|
||||
class boss_leymor : BossAI
|
||||
{
|
||||
int _killedArcaneTender;
|
||||
|
||||
public boss_leymor(Creature creature) : base(creature, DataTypes.Leymor) { }
|
||||
|
||||
public override void JustAppeared()
|
||||
{
|
||||
if (instance.GetData(DataTypes.LeymorIntroDone) != 0)
|
||||
return;
|
||||
|
||||
me.SetUnitFlag(UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
|
||||
DoCastSelf(SpellIds.Stasis);
|
||||
}
|
||||
|
||||
public override void DoAction(int action)
|
||||
{
|
||||
if (action == MiscConst.ActionArcaneTenderDeath)
|
||||
{
|
||||
_killedArcaneTender++;
|
||||
if (_killedArcaneTender >= 3)
|
||||
{
|
||||
instance.SetData(DataTypes.LeymorIntroDone, 1);
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(1), _ =>
|
||||
{
|
||||
me.RemoveAurasDueToSpell(SpellIds.Stasis);
|
||||
me.RemoveUnitFlag(UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
|
||||
DoCastSelf(SpellIds.ArcaneEruption);
|
||||
Talk(MiscConst.SayAnnounceAwaken);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
_JustDied();
|
||||
instance.SendEncounterUnit(EncounterFrameType.Disengage, me);
|
||||
}
|
||||
|
||||
public override void EnterEvadeMode(EvadeReason why)
|
||||
{
|
||||
instance.SendEncounterUnit(EncounterFrameType.Disengage, me);
|
||||
|
||||
summons.DespawnAll();
|
||||
_EnterEvadeMode();
|
||||
_DespawnAtEvade();
|
||||
}
|
||||
|
||||
public override void OnChannelFinished(SpellInfo spell)
|
||||
{
|
||||
if (spell.Id == SpellIds.ConsumingStomp)
|
||||
DoCastAOE(SpellIds.ConsumingStompDamage, true);
|
||||
}
|
||||
|
||||
public override void JustEngagedWith(Unit who)
|
||||
{
|
||||
base.JustEngagedWith(who);
|
||||
_scheduler.CancelAll();
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(3), task =>
|
||||
{
|
||||
DoCastSelf(SpellIds.LeyLineSprouts);
|
||||
task.Repeat(TimeSpan.FromSeconds(48));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(45), task =>
|
||||
{
|
||||
DoCastSelf(SpellIds.ConsumingStomp);
|
||||
task.Repeat(TimeSpan.FromSeconds(48));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(20), task =>
|
||||
{
|
||||
DoCastVictim(SpellIds.EruptingFissure);
|
||||
task.Repeat(TimeSpan.FromSeconds(48));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(31), task =>
|
||||
{
|
||||
DoCastSelf(SpellIds.ExplosiveBrand);
|
||||
task.Repeat(TimeSpan.FromSeconds(48));
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
|
||||
{
|
||||
DoCastVictim(SpellIds.InfusedStrike);
|
||||
task.Repeat(TimeSpan.FromSeconds(48));
|
||||
});
|
||||
instance.SendEncounterUnit(EncounterFrameType.Engage, me, 1);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 191164 - Arcane Tender
|
||||
class npc_arcane_tender : ScriptedAI
|
||||
{
|
||||
public npc_arcane_tender(Creature creature) : base(creature) { }
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
Creature leymor = me.GetInstanceScript().GetCreature(DataTypes.Leymor);
|
||||
if (leymor == null)
|
||||
return;
|
||||
|
||||
if (!leymor.IsAIEnabled())
|
||||
return;
|
||||
|
||||
leymor.GetAI().DoAction(MiscConst.ActionArcaneTenderDeath);
|
||||
}
|
||||
|
||||
public override void JustAppeared()
|
||||
{
|
||||
Creature leymor = me.GetInstanceScript().GetCreature(DataTypes.Leymor);
|
||||
if (leymor == null)
|
||||
return;
|
||||
|
||||
DoCast(leymor, SpellIds.StasisRitual);
|
||||
}
|
||||
|
||||
public override void JustReachedHome()
|
||||
{
|
||||
JustAppeared();
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
public override void JustEngagedWith(Unit who)
|
||||
{
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(22), task =>
|
||||
{
|
||||
DoCastAOE(SpellIds.ErraticGrowthChannel);
|
||||
task.Repeat();
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
|
||||
{
|
||||
DoCastAOE(SpellIds.WildEruption);
|
||||
task.Repeat();
|
||||
});
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, DoMeleeAttackIfReady);
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 190509 - Ley-Line Sprout
|
||||
class npc_ley_line_sprouts : ScriptedAI
|
||||
{
|
||||
public npc_ley_line_sprouts(Creature creature) : base(creature) { }
|
||||
|
||||
public override void JustAppeared()
|
||||
{
|
||||
DoCastSelf(SpellIds.LeyLineSproutAt);
|
||||
|
||||
DoCastAOE(SpellIds.ArcanePower, true);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
Creature leymor = me.GetInstanceScript().GetCreature(DataTypes.Leymor);
|
||||
if (leymor == null)
|
||||
return;
|
||||
|
||||
if (!leymor.IsAIEnabled())
|
||||
return;
|
||||
|
||||
leymor.GetAI().JustSummoned(summon);
|
||||
}
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
if (GetDifficulty() == Difficulty.Mythic || GetDifficulty() == Difficulty.MythicKeystone)
|
||||
DoCastAOE(SpellIds.VolatileSapling, true);
|
||||
|
||||
TempSummon tempSummon = me.ToTempSummon();
|
||||
if (tempSummon != null)
|
||||
{
|
||||
Unit summoner = tempSummon.GetSummonerUnit();
|
||||
if (summoner != null)
|
||||
{
|
||||
Aura aura = summoner.GetAura(SpellIds.ArcanePower);
|
||||
if (aura != null)
|
||||
aura.ModStackAmount(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpellHit(WorldObject caster, SpellInfo spellInfo)
|
||||
{
|
||||
if (spellInfo.Id != SpellIds.ExplosiveBrandDamage && spellInfo.Id != SpellIds.EruptingFissureSproutSelector)
|
||||
return;
|
||||
|
||||
me.SendPlaySpellVisualKit(MiscConst.SpellVisualKitSproutDeath, 0, 0);
|
||||
me.KillSelf();
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 196559 - Volatile Sapling
|
||||
class npc_volatile_sapling : ScriptedAI
|
||||
{
|
||||
public npc_volatile_sapling(Creature creature) : base(creature) { }
|
||||
|
||||
public override void DamageTaken(Unit attacker, ref uint damage, DamageEffectType damageType, SpellInfo spellInfo = null)
|
||||
{
|
||||
if (me.GetHealth() <= damage)
|
||||
{
|
||||
damage = (uint)(me.GetHealth() - 1);
|
||||
|
||||
if (!_isSappyBurstCast)
|
||||
{
|
||||
me.CastSpell(null, SpellIds.SappyBurst, false);
|
||||
_isSappyBurstCast = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSpellCast(SpellInfo spell)
|
||||
{
|
||||
if (spell.Id != SpellIds.SappyBurst)
|
||||
return;
|
||||
|
||||
me.KillSelf();
|
||||
}
|
||||
|
||||
|
||||
bool _isSappyBurstCast;
|
||||
}
|
||||
|
||||
[Script] // 374364 - Ley-Line Sprouts
|
||||
class spell_ley_line_sprouts : SpellScript
|
||||
{
|
||||
Position[] LeyLineSproutGroupOrigin =
|
||||
{
|
||||
new(-5129.39f, 1253.30f, 555.58f),
|
||||
new(-5101.68f, 1253.71f, 555.90f),
|
||||
new(-5114.70f, 1230.28f, 555.89f),
|
||||
new(-5141.62f, 1230.33f, 555.83f),
|
||||
new(-5155.62f, 1253.60f, 555.87f),
|
||||
new(-5141.42f, 1276.70f, 555.89f),
|
||||
new(-5114.78f, 1277.42f, 555.87f)
|
||||
};
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.LeyLineSproutsMissile);
|
||||
}
|
||||
|
||||
void HandleHit(uint effIndex)
|
||||
{
|
||||
foreach (Position pos in LeyLineSproutGroupOrigin)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
GetCaster().CastSpell(pos, SpellIds.LeyLineSproutsMissile, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHit.Add(new(HandleHit, 0, SpellEffectName.Dummy));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 375732 - Stasis Ritual
|
||||
class spell_stasis_ritual : AuraScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.StasisRitualMissile);
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect aurEff)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
if (caster != null)
|
||||
caster.CastSpell(null, SpellIds.StasisRitualMissile, true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectPeriodic.Add(new(HandlePeriodic, 0, AuraType.PeriodicDummy));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 375652 - Wild Eruption
|
||||
class spell_wild_eruption : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.WildEruptionMissile);
|
||||
}
|
||||
|
||||
void HandleHitTarget(uint effIndex)
|
||||
{
|
||||
GetCaster().CastSpell(GetHitDest(), SpellIds.WildEruptionMissile, true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new(HandleHitTarget, 0, SpellEffectName.Dummy));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 375749 - Arcane Eruption
|
||||
class at_leymor_arcane_eruption : AreaTriggerAI
|
||||
{
|
||||
public at_leymor_arcane_eruption(AreaTrigger areatrigger) : base(areatrigger) { }
|
||||
|
||||
public override void OnUnitEnter(Unit unit)
|
||||
{
|
||||
if (!unit.IsPlayer())
|
||||
return;
|
||||
|
||||
unit.ApplyMovementForce(at.GetGUID(), at.GetPosition(), -20.0f, MovementForceType.Gravity);
|
||||
}
|
||||
|
||||
public override void OnUnitExit(Unit unit)
|
||||
{
|
||||
if (!unit.IsPlayer())
|
||||
return;
|
||||
|
||||
unit.RemoveMovementForce(at.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 374567 - Explosive Brand
|
||||
class spell_explosive_brand : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ExplosiveBrandKnockback);
|
||||
}
|
||||
|
||||
void HandleHit(uint effIndex)
|
||||
{
|
||||
GetCaster().CastSpell(null, SpellIds.ExplosiveBrandKnockback, true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHit.Add(new(HandleHit, 0, SpellEffectName.ApplyAura));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 374567 - Explosive Brand
|
||||
class spell_explosive_brand_AuraScript : AuraScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ExplosiveBrandDamage);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
if (GetTargetApplication().GetRemoveMode() != AuraRemoveMode.Expire)
|
||||
return;
|
||||
|
||||
Unit caster = GetCaster();
|
||||
if (caster != null)
|
||||
caster.CastSpell(GetTarget(), SpellIds.ExplosiveBrandDamage, true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
AfterEffectRemove.Add(new(OnRemove, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 374720 - Consuming Stomp
|
||||
class spell_consuming_stomp : AuraScript
|
||||
{
|
||||
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
GetTarget().KillSelf();
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
AfterEffectRemove.Add(new(OnRemove, 0, AuraType.PeriodicTriggerSpell, AuraEffectHandleModes.Real));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 386660 - Erupting Fissure
|
||||
class spell_erupting_fissure : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.EruptingFissureSproutSelector);
|
||||
}
|
||||
|
||||
void HandleHit(uint effIndex)
|
||||
{
|
||||
GetCaster().CastSpell(GetHitDest(), SpellIds.EruptingFissureSproutSelector, true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHit.Add(new(HandleHit, 0, SpellEffectName.Dummy));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 375591 - Sappy Burst
|
||||
class spell_sappy_burst : SpellScript
|
||||
{
|
||||
void HandleHitTarget(uint effIndex)
|
||||
{
|
||||
GetCaster().KillSelf();
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new(HandleHitTarget, 2, SpellEffectName.ScriptEffect));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
@@ -18,9 +18,9 @@ namespace Scripts.DragonIsles.RubyLifePools
|
||||
struct CreatureIds
|
||||
{
|
||||
// Bosses
|
||||
public const uint MelidrussaChillworn = 188252;
|
||||
public const uint KokiaBlazehoof = 189232;
|
||||
public const uint Kyrakka = 190484;
|
||||
public const uint BossMelidrussaChillworn = 188252;
|
||||
public const uint BossKokiaBlazehoof = 189232;
|
||||
public const uint BossKyrakka = 190484;
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
@@ -28,26 +28,25 @@ namespace Scripts.DragonIsles.RubyLifePools
|
||||
public const uint FireWall = 377194;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class instance_ruby_life_pools : InstanceMapScript
|
||||
{
|
||||
public static ObjectData[] creatureData =
|
||||
static ObjectData[] creatureData =
|
||||
{
|
||||
new ObjectData(CreatureIds.MelidrussaChillworn, DataTypes.MelidrussaChillworn),
|
||||
new ObjectData(CreatureIds.KokiaBlazehoof, DataTypes.KokiaBlazehoof),
|
||||
new ObjectData(CreatureIds.Kyrakka, DataTypes.KyrakkaAndErkhartStormvein),
|
||||
new(CreatureIds.BossMelidrussaChillworn, DataTypes.MelidrussaChillworn),
|
||||
new(CreatureIds.BossKokiaBlazehoof, DataTypes.KokiaBlazehoof),
|
||||
new(CreatureIds.BossKyrakka, DataTypes.KyrakkaAndErkhartStormvein)
|
||||
};
|
||||
|
||||
public static DoorData[] doorData =
|
||||
static DoorData[] doorData =
|
||||
{
|
||||
new DoorData(GameObjectIds.FireWall, DataTypes.KokiaBlazehoof, DoorType.Passage),
|
||||
new(GameObjectIds.FireWall, DataTypes.KokiaBlazehoof, DoorType.Passage)
|
||||
};
|
||||
|
||||
public static DungeonEncounterData[] encounters =
|
||||
static DungeonEncounterData[] encounters =
|
||||
{
|
||||
new DungeonEncounterData(DataTypes.MelidrussaChillworn, 2609 ),
|
||||
new DungeonEncounterData(DataTypes.KokiaBlazehoof, 2606 ),
|
||||
new DungeonEncounterData(DataTypes.KyrakkaAndErkhartStormvein, 2623 )
|
||||
new(DataTypes.MelidrussaChillworn, 2609),
|
||||
new(DataTypes.KokiaBlazehoof, 2606),
|
||||
new(DataTypes.KyrakkaAndErkhartStormvein, 2623)
|
||||
};
|
||||
|
||||
public instance_ruby_life_pools() : base(nameof(instance_ruby_life_pools), 2521) { }
|
||||
@@ -69,4 +68,4 @@ namespace Scripts.DragonIsles.RubyLifePools
|
||||
return new instance_ruby_life_pools_InstanceMapScript(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
@@ -6,75 +6,63 @@ using Game;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
|
||||
namespace Scripts.DragonIsles
|
||||
namespace Scripts.DragonIsles.ZoneTheForbiddenReach
|
||||
{
|
||||
struct SpellIds
|
||||
{
|
||||
// Spells
|
||||
public const uint DracthyrLogin = 369728; // teleports to random room, plays scene for the room, binds the home position
|
||||
public const uint Stasis1 = 369735; // triggers 366620
|
||||
public const uint Stasis2 = 366620; // triggers 366636
|
||||
public const uint Stasis3 = 366636; // removes 365560, sends first quest (64864)
|
||||
public const uint Stasis4 = 365560; // freeze the target
|
||||
public const uint DracthyrMovieRoom01 = 394245; // scene for room 1
|
||||
public const uint DracthyrMovieRoom02 = 394279; // scene for room 2
|
||||
public const uint DracthyrMovieRoom03 = 394281; // scene for room 3
|
||||
public const uint DracthyrMovieRoom04 = 394282; // scene for room 4
|
||||
//public const uint DracthyrMovieRoom05 = 394283, // scene for room 5 (only plays sound, unused?)
|
||||
}
|
||||
|
||||
struct MiscConst
|
||||
{
|
||||
public static Tuple<uint, Position>[] LoginRoomData =
|
||||
{
|
||||
Tuple.Create(SpellIds.DracthyrMovieRoom01, new Position(5725.32f, -3024.26f, 251.047f, 0.01745329238474369f)),
|
||||
Tuple.Create(SpellIds.DracthyrMovieRoom02, new Position( 5743.03f, -3067.28f, 251.047f, 0.798488140106201171f)),
|
||||
Tuple.Create(SpellIds.DracthyrMovieRoom03, new Position(5787.1597f, -3083.3906f, 251.04698f, 1.570796370506286621f)),
|
||||
Tuple.Create(SpellIds.DracthyrMovieRoom04, new Position(5829.32f, -3064.49f, 251.047f, 2.364955902099609375f))
|
||||
};
|
||||
}
|
||||
|
||||
[Script] // 369728 - Dracthyr Login
|
||||
class spell_dracthyr_login : SpellScript
|
||||
{
|
||||
const uint SpellDracthyrMovieRoom01 = 394245; // scene for room 1
|
||||
const uint SpellDracthyrMovieRoom02 = 394279; // scene for room 2
|
||||
const uint SpellDracthyrMovieRoom03 = 394281; // scene for room 3
|
||||
const uint SpellDracthyrMovieRoom04 = 394282; // scene for room 4
|
||||
|
||||
(uint, Position)[] LoginRoomData =
|
||||
{
|
||||
(SpellDracthyrMovieRoom01, new(5725.32f, -3024.26f, 251.047f, 0.01745329238474369f)),
|
||||
(SpellDracthyrMovieRoom02, new(5743.03f, -3067.28f, 251.047f, 0.798488140106201171f)),
|
||||
(SpellDracthyrMovieRoom03, new(5787.1597f, -3083.3906f, 251.04698f, 1.570796370506286621f)),
|
||||
(SpellDracthyrMovieRoom04, new(5829.32f, -3064.49f, 251.047f, 2.364955902099609375f))
|
||||
};
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.DracthyrMovieRoom01, SpellIds.DracthyrMovieRoom02, SpellIds.DracthyrMovieRoom03, SpellIds.DracthyrMovieRoom04);
|
||||
return ValidateSpellInfo(SpellDracthyrMovieRoom01, SpellDracthyrMovieRoom02, SpellDracthyrMovieRoom03, SpellDracthyrMovieRoom04);
|
||||
}
|
||||
|
||||
void HandleTeleport(uint effIndex)
|
||||
{
|
||||
var room = MiscConst.LoginRoomData[RandomHelper.URand(0, 3)];
|
||||
var (spellId, pos) = LoginRoomData[RandomHelper.URand(0, 3)];
|
||||
|
||||
WorldLocation dest = GetHitUnit().GetWorldLocation();
|
||||
SetExplTargetDest(dest);
|
||||
|
||||
GetHitDest().Relocate(room.Item2);
|
||||
GetHitDest().Relocate(pos);
|
||||
|
||||
GetCaster().CastSpell(GetHitUnit(), room.Item1, true);
|
||||
GetCaster().CastSpell(GetHitUnit(), spellId, true);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleTeleport, 0, SpellEffectName.TeleportUnits));
|
||||
OnEffectHitTarget.Add(new(HandleTeleport, 0, SpellEffectName.TeleportUnits));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 3730 - Dracthyr Evoker Intro (Post Movie)
|
||||
class scene_dracthyr_evoker_intro : SceneScript
|
||||
{
|
||||
const uint SpellStasis1 = 369735; // triggers 366620'
|
||||
|
||||
public scene_dracthyr_evoker_intro() : base("scene_dracthyr_evoker_intro") { }
|
||||
|
||||
public override void OnSceneComplete(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
|
||||
{
|
||||
player.CastSpell(player, SpellIds.Stasis1, true);
|
||||
player.CastSpell(player, SpellStasis1, true);
|
||||
}
|
||||
|
||||
public override void OnSceneCancel(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
|
||||
{
|
||||
player.CastSpell(player, SpellIds.Stasis1, true);
|
||||
player.CastSpell(player, SpellStasis1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user