Core/Scripts: improvements on the Thorim script

Improvements done to initial work by joschiwald:

- Fixed stormhammer casting and visuals
- Fixed spell credits
- Implemented removal of Impale when HP is higher than 90%
- Corrected faction templates for the pre combat creatures
- Implemeted Leap on the arena adds (thanks to joschiwald for implementing conditions)
- Scripted lighting charge using AuraScript periodic
- Fixed timings
- Corrections on the hallway encounters (added knockback immunity to minibosses too)
- Fixed multiple blizzards issue
- Lever will now reset properly, should players fail to get inside. This allows the door to be opened more than once during the combat
- Corrections in the outro event
- Implemented paralytic field traps on the hallway.
- Implemented Ancient Gate of the Keepers opening.
- Changed blizzard bunny targetting to conditions entirely.
- Removed obsolete scripts
- Standards: delete spell script names by ScriptName instead of spell_id
- Swapped factions for pre-adds (alliance should get horde trash and vs)
- Fixed Leap setting home position for adds
- Removed a bunch of magic numbers
- Runic Colossus should finish current Runic Explosion before beginning to attack
- Fixed UpdateAI logic to put it in line with other scripts (ie don't stop casts)

Special thanks to:
- chaodhib for the blizzard trigger waypoints and investigation on spell radius
- Malcrom for creating the Conditions Creator :P

Closes #15008
Closes #17072
This commit is contained in:
ariel-
2017-03-23 04:26:09 -03:00
parent 5e90c76fd4
commit 4a69f5bda5
6 changed files with 918 additions and 459 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -34,7 +34,7 @@ static BossBoundaryData const boundaries =
{ BOSS_ALGALON, new CircleBoundary(Position(1632.668f, -307.7656f), 45.0) },
{ BOSS_ALGALON, new ZRangeBoundary(410.0f, 440.0f) },
{ BOSS_HODIR, new EllipseBoundary(Position(2001.5f, -240.0f), 50.0, 75.0) },
{ BOSS_THORIM, new CircleBoundary(Position(2134.73f, -263.2f), 50.0) },
// Thorim sets boundaries dinamically
{ BOSS_FREYA, new RectangleBoundary(2094.6f, 2520.0f, -250.0f, 200.0f) },
{ BOSS_MIMIRON, new CircleBoundary(Position(2744.0f, 2569.0f), 70.0) },
{ BOSS_VEZAX, new RectangleBoundary(1740.0f, 1930.0f, 31.0f, 228.0f) },
@@ -54,6 +54,10 @@ static DoorData const doorData[] =
{ GO_MIMIRON_DOOR_2, BOSS_MIMIRON, DOOR_TYPE_ROOM },
{ GO_MIMIRON_DOOR_3, BOSS_MIMIRON, DOOR_TYPE_ROOM },
{ GO_THORIM_ENCOUNTER_DOOR, BOSS_THORIM, DOOR_TYPE_ROOM },
{ GO_ANCIENT_GATE_OF_THE_KEEPERS, BOSS_HODIR, DOOR_TYPE_PASSAGE },
{ GO_ANCIENT_GATE_OF_THE_KEEPERS, BOSS_MIMIRON, DOOR_TYPE_PASSAGE },
{ GO_ANCIENT_GATE_OF_THE_KEEPERS, BOSS_THORIM, DOOR_TYPE_PASSAGE },
{ GO_ANCIENT_GATE_OF_THE_KEEPERS, BOSS_FREYA, DOOR_TYPE_PASSAGE },
{ GO_VEZAX_DOOR, BOSS_VEZAX, DOOR_TYPE_PASSAGE },
{ GO_YOGG_SARON_DOOR, BOSS_YOGG_SARON, DOOR_TYPE_ROOM },
{ GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM },
@@ -93,6 +97,7 @@ ObjectData const creatureData[] =
{ NPC_SIF, DATA_SIF },
{ NPC_RUNIC_COLOSSUS, DATA_RUNIC_COLOSSUS },
{ NPC_RUNE_GIANT, DATA_RUNE_GIANT },
{ NPC_THORIM_CONTROLLER, DATA_THORIM_CONTROLLER },
{ NPC_COMPUTER, DATA_COMPUTER },
{ NPC_WORLD_TRIGGER_MIMIRON, DATA_MIMIRON_WORLD_TRIGGER },
{ NPC_VOICE_OF_YOGG_SARON, DATA_VOICE_OF_YOGG_SARON },
@@ -174,6 +179,7 @@ class instance_ulduar : public InstanceMapScript
ObjectGuid LeviathanGateGUID;
ObjectGuid KologarnChestGUID;
ObjectGuid KologarnBridgeGUID;
ObjectGuid ThorimDarkIronPortcullisGUID;
ObjectGuid CacheOfStormsGUID;
ObjectGuid CacheOfStormsHardmodeGUID;
ObjectGuid HodirRareCacheGUID;
@@ -332,6 +338,16 @@ class instance_ulduar : public InstanceMapScript
creature->UpdateEntry(NPC_BATTLE_PRIEST_GINA);
break;
// Thorim
case NPC_MERCENARY_CAPTAIN_H:
if (TeamInInstance == HORDE)
creature->UpdateEntry(NPC_MERCENARY_CAPTAIN_A);
break;
case NPC_MERCENARY_SOLDIER_H:
if (TeamInInstance == HORDE)
creature->UpdateEntry(NPC_MERCENARY_SOLDIER_A);
break;
// Freya
case NPC_IRONBRANCH:
ElderGUIDs[0] = creature->GetGUID();
@@ -447,6 +463,9 @@ class instance_ulduar : public InstanceMapScript
if (GetBossState(BOSS_KOLOGARN) == DONE)
HandleGameObject(ObjectGuid::Empty, false, gameObject);
break;
case GO_THORIM_DARK_IRON_PORTCULLIS:
ThorimDarkIronPortcullisGUID = gameObject->GetGUID();
break;
case GO_CACHE_OF_STORMS_10:
case GO_CACHE_OF_STORMS_25:
CacheOfStormsGUID = gameObject->GetGUID();
@@ -669,8 +688,14 @@ class instance_ulduar : public InstanceMapScript
cache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
}
}
instance->SummonCreature(NPC_THORIM_OBSERVATION_RING, ObservationRingKeepersPos[2]);
}
else
{
DoCloseDoorOrButton(GetGuidData(DATA_THORIM_LEVER));
DoCloseDoorOrButton(ThorimDarkIronPortcullisGUID);
}
break;
case BOSS_ALGALON:
if (state == DONE)

View File

@@ -155,6 +155,12 @@ enum UlduarNPCs
// Thorim
NPC_THORIM_INVISIBLE_STALKER = 32780,
NPC_JORMUNGAR_BEHEMOTH = 32882,
NPC_MERCENARY_CAPTAIN_A = 32908,
NPC_MERCENARY_CAPTAIN_H = 32907,
NPC_MERCENARY_SOLDIER_A = 32885,
NPC_MERCENARY_SOLDIER_H = 32883,
NPC_DARK_RUNE_ACOLYTE_PRE = 32886,
NPC_RUNIC_COLOSSUS = 32872,
NPC_RUNE_GIANT = 32873,
NPC_IRON_RING_GUARD = 32874,
@@ -170,6 +176,7 @@ enum UlduarNPCs
NPC_GOLEM_LEFT_HAND_BUNNY = 33141,
NPC_SIF = 33196,
NPC_THUNDER_ORB = 33378,
NPC_THORIM_CONTROLLER = 32879,
// Yogg-Saron
NPC_SARA = 33134,
@@ -245,6 +252,8 @@ enum UlduarGameObjects
GO_KOLOGARN_BRIDGE = 194232,
GO_KOLOGARN_DOOR = 194553,
GO_ANCIENT_GATE_OF_THE_KEEPERS = 194255,
// Hodir
GO_HODIR_ENTRANCE = 194442,
GO_HODIR_DOOR = 194634,
@@ -262,7 +271,8 @@ enum UlduarGameObjects
GO_THORIM_RUNIC_DOOR = 194557,
GO_THORIM_STONE_DOOR = 194558,
GO_THORIM_ENCOUNTER_DOOR = 194559,
GO_THORIM_LEVER = 194265,
GO_THORIM_LEVER = 194264,
GO_THORIM_DARK_IRON_PORTCULLIS = 194560,
// Mimiron
GO_MIMIRON_TRAM = 194675,
@@ -435,6 +445,7 @@ enum UlduarData
DATA_RUNIC_DOOR,
DATA_STONE_DOOR,
DATA_THORIM_HARDMODE,
DATA_THORIM_CONTROLLER,
// Misc
DATA_BRANN_BRONZEBEARD_INTRO,