Core/DB: Some updates for UBRS from sniff
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
-- Fix unit flags for Blackhand Incarcerator
|
||||||
|
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|768 WHERE `entry`=10316;
|
||||||
|
-- Fix unit flags for Pyroguard Emberseer
|
||||||
|
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554688 WHERE `entry`=9816;
|
||||||
|
-- Remove hack event script
|
||||||
|
DELETE FROM `event_scripts` WHERE `id`=4884;
|
||||||
|
-- Remove script to Dragonspire Hall Runes "UBRS"
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName`= '' WHERE `entry` BETWEEN 175194 AND 175200;
|
||||||
@@ -33,7 +33,8 @@ enum Data
|
|||||||
DATA_WARCHIEF_REND_BLACKHAND,
|
DATA_WARCHIEF_REND_BLACKHAND,
|
||||||
DATA_GYTH,
|
DATA_GYTH,
|
||||||
DATA_THE_BEAST,
|
DATA_THE_BEAST,
|
||||||
DATA_GENERAL_DRAKKISATH
|
DATA_GENERAL_DRAKKISATH,
|
||||||
|
DATA_DRAGONSPIRE_ROOM,
|
||||||
};
|
};
|
||||||
enum Npc
|
enum Npc
|
||||||
{
|
{
|
||||||
@@ -51,6 +52,9 @@ enum Npc
|
|||||||
NPC_GYTH = 10339,
|
NPC_GYTH = 10339,
|
||||||
NPC_THE_BEAST = 10430,
|
NPC_THE_BEAST = 10430,
|
||||||
NPC_GENERAL_DRAKKISATH = 10363,
|
NPC_GENERAL_DRAKKISATH = 10363,
|
||||||
|
NPC_BLACKHAND_DREADWEAVER = 9817,
|
||||||
|
NPC_BLACKHAND_SUMMONER = 9818,
|
||||||
|
NPC_BLACKHAND_VETERAN = 9819,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AdditionalData
|
enum AdditionalData
|
||||||
@@ -58,6 +62,9 @@ enum AdditionalData
|
|||||||
SPELL_SUMMON_ROOKERY_WHELP = 15745,
|
SPELL_SUMMON_ROOKERY_WHELP = 15745,
|
||||||
MAX_ENCOUNTER = 14,
|
MAX_ENCOUNTER = 14,
|
||||||
MAX_DRAGONSPIRE_HALL_RUNES = 7,
|
MAX_DRAGONSPIRE_HALL_RUNES = 7,
|
||||||
|
EVENT_PYROGUARD_EMBERSEER = 4884,
|
||||||
|
AREATRIGGER_ENTER_UBRS = 2046,
|
||||||
|
AREATRIGGER_STADIUM = 2026,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GameObjects
|
enum GameObjects
|
||||||
|
|||||||
@@ -20,11 +20,24 @@
|
|||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "blackrock_spire.h"
|
#include "blackrock_spire.h"
|
||||||
|
|
||||||
|
enum Text
|
||||||
|
{
|
||||||
|
EMOTE_ONE_STACK = 0,
|
||||||
|
EMOTE_TEN_STACK = 1,
|
||||||
|
EMOTE_FREE_OF_BONDS = 2,
|
||||||
|
YELL_FREE_OF_BONDS = 3,
|
||||||
|
};
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_FIRENOVA = 23462,
|
SPELL_ENCAGED_EMBERSEER = 15282, // Self on spawn
|
||||||
SPELL_FLAMEBUFFET = 23341,
|
SPELL_FIRE_SHIELD_TRIGGER = 13377, // Self on spawn missing from 335 dbc
|
||||||
SPELL_PYROBLAST = 17274,
|
SPELL_FREEZE_ANIM = 16245, // Self on event start
|
||||||
|
SPELL_EMBERSEER_GROWING = 16048, // Self on event start
|
||||||
|
SPELL_EMBERSEER_FULL_STRENGTH = 16047, // Emberseer Full Strength
|
||||||
|
SPELL_FIRENOVA = 23462, // Combat
|
||||||
|
SPELL_FLAMEBUFFET = 23341, // Combat
|
||||||
|
SPELL_PYROBLAST = 17274, // Combat
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Events
|
enum Events
|
||||||
@@ -51,12 +64,19 @@ public:
|
|||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
|
if(instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS)
|
||||||
|
OpenDoors(FALSE);
|
||||||
|
instance->SetBossState(DATA_PYROGAURD_EMBERSEER,NOT_STARTED);
|
||||||
|
// respawn any dead Blackhand Incarcerators
|
||||||
|
DoCast(me, SPELL_ENCAGED_EMBERSEER);
|
||||||
|
//DoCast(me, SPELL_FIRE_SHIELD_TRIGGER);
|
||||||
_Reset();
|
_Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/)
|
void EnterCombat(Unit* /*who*/)
|
||||||
{
|
{
|
||||||
_EnterCombat();
|
_EnterCombat();
|
||||||
|
// activate all runes in room
|
||||||
events.ScheduleEvent(EVENT_FIRENOVA, 6 * IN_MILLISECONDS);
|
events.ScheduleEvent(EVENT_FIRENOVA, 6 * IN_MILLISECONDS);
|
||||||
events.ScheduleEvent(EVENT_FLAMEBUFFET, 3 * IN_MILLISECONDS);
|
events.ScheduleEvent(EVENT_FLAMEBUFFET, 3 * IN_MILLISECONDS);
|
||||||
events.ScheduleEvent(EVENT_PYROBLAST, 14 * IN_MILLISECONDS);
|
events.ScheduleEvent(EVENT_PYROBLAST, 14 * IN_MILLISECONDS);
|
||||||
@@ -64,12 +84,26 @@ public:
|
|||||||
|
|
||||||
void JustDied(Unit* /*killer*/)
|
void JustDied(Unit* /*killer*/)
|
||||||
{
|
{
|
||||||
|
instance->SetBossState(DATA_PYROGAURD_EMBERSEER,DONE);
|
||||||
|
OpenDoors(TRUE);
|
||||||
_JustDied();
|
_JustDied();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OpenDoors(bool Boss_Killed)
|
||||||
|
{
|
||||||
|
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN)))
|
||||||
|
door1->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS)))
|
||||||
|
door2->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
if (Boss_Killed)
|
||||||
|
if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT)))
|
||||||
|
door3->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 const diff)
|
void UpdateAI(uint32 const diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ public:
|
|||||||
uint64 Gyth;
|
uint64 Gyth;
|
||||||
uint64 TheBeast;
|
uint64 TheBeast;
|
||||||
uint64 GeneralDrakkisath;
|
uint64 GeneralDrakkisath;
|
||||||
|
uint64 go_emberseerin;
|
||||||
|
uint64 go_doors;
|
||||||
|
uint64 go_emberseerout;
|
||||||
|
uint64 go_roomrunes[MAX_DRAGONSPIRE_HALL_RUNES];
|
||||||
|
uint8 Runemaxprotectors[MAX_DRAGONSPIRE_HALL_RUNES];
|
||||||
|
uint8 Runeprotectorsdead[MAX_DRAGONSPIRE_HALL_RUNES];
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
@@ -67,6 +73,9 @@ public:
|
|||||||
Gyth = 0;
|
Gyth = 0;
|
||||||
TheBeast = 0;
|
TheBeast = 0;
|
||||||
GeneralDrakkisath = 0;
|
GeneralDrakkisath = 0;
|
||||||
|
go_emberseerin = 0;
|
||||||
|
go_doors = 0;
|
||||||
|
go_emberseerout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEncounterInProgress() const
|
bool IsEncounterInProgress() const
|
||||||
@@ -125,7 +134,11 @@ public:
|
|||||||
case NPC_GENERAL_DRAKKISATH:
|
case NPC_GENERAL_DRAKKISATH:
|
||||||
GeneralDrakkisath = creature->GetGUID();
|
GeneralDrakkisath = creature->GetGUID();
|
||||||
break;
|
break;
|
||||||
}
|
case NPC_BLACKHAND_DREADWEAVER:
|
||||||
|
case NPC_BLACKHAND_SUMMONER:
|
||||||
|
case NPC_BLACKHAND_VETERAN:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnGameObjectCreate(GameObject* go)
|
void OnGameObjectCreate(GameObject* go)
|
||||||
@@ -135,6 +148,36 @@ public:
|
|||||||
case GO_WHELP_SPAWNER:
|
case GO_WHELP_SPAWNER:
|
||||||
go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP);
|
go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP);
|
||||||
break;
|
break;
|
||||||
|
case GO_EMBERSEER_IN:
|
||||||
|
go_emberseerin = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_DOORS:
|
||||||
|
go_doors = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_EMBERSEER_OUT:
|
||||||
|
go_emberseerout = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_1_RUNE:
|
||||||
|
go_roomrunes[0] = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_2_RUNE:
|
||||||
|
go_roomrunes[1] = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_3_RUNE:
|
||||||
|
go_roomrunes[2] = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_4_RUNE:
|
||||||
|
go_roomrunes[3] = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_5_RUNE:
|
||||||
|
go_roomrunes[4] = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_6_RUNE:
|
||||||
|
go_roomrunes[5] = go->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_ROOM_7_RUNE:
|
||||||
|
go_roomrunes[6] = go->GetGUID();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +210,18 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId)
|
||||||
|
{
|
||||||
|
switch (eventId)
|
||||||
|
{
|
||||||
|
case EVENT_PYROGUARD_EMBERSEER:
|
||||||
|
SetBossState(DATA_PYROGAURD_EMBERSEER,IN_PROGRESS);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint64 GetData64(uint32 type)
|
uint64 GetData64(uint32 type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
@@ -199,6 +254,26 @@ public:
|
|||||||
return TheBeast;
|
return TheBeast;
|
||||||
case DATA_GENERAL_DRAKKISATH:
|
case DATA_GENERAL_DRAKKISATH:
|
||||||
return GeneralDrakkisath;
|
return GeneralDrakkisath;
|
||||||
|
case GO_EMBERSEER_IN:
|
||||||
|
return go_emberseerin;
|
||||||
|
case GO_DOORS:
|
||||||
|
return go_doors;
|
||||||
|
case GO_EMBERSEER_OUT:
|
||||||
|
return go_emberseerout;
|
||||||
|
case GO_ROOM_1_RUNE:
|
||||||
|
return go_roomrunes[0];
|
||||||
|
case GO_ROOM_2_RUNE:
|
||||||
|
return go_roomrunes[1];
|
||||||
|
case GO_ROOM_3_RUNE:
|
||||||
|
return go_roomrunes[2];
|
||||||
|
case GO_ROOM_4_RUNE:
|
||||||
|
return go_roomrunes[3];
|
||||||
|
case GO_ROOM_5_RUNE:
|
||||||
|
return go_roomrunes[4];
|
||||||
|
case GO_ROOM_6_RUNE:
|
||||||
|
return go_roomrunes[5];
|
||||||
|
case GO_ROOM_7_RUNE:
|
||||||
|
return go_roomrunes[6];
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -247,30 +322,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8 ActivatedRunes = 0;
|
|
||||||
|
|
||||||
class go_dragonspire_hall_rune : public GameObjectScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
go_dragonspire_hall_rune() : GameObjectScript("go_dragonspire_hall_rune") { }
|
|
||||||
|
|
||||||
void OnGameObjectStateChanged(GameObject* go, uint32 state)
|
|
||||||
{
|
|
||||||
if (state == GO_STATE_READY)
|
|
||||||
{
|
|
||||||
if (++ActivatedRunes == MAX_DRAGONSPIRE_HALL_RUNES)
|
|
||||||
{
|
|
||||||
if (GameObject* door1 = GetClosestGameObjectWithEntry(go, GO_EMBERSEER_IN, 150.0f))
|
|
||||||
door1->SetGoState(GO_STATE_ACTIVE);
|
|
||||||
if (GameObject* door2 = GetClosestGameObjectWithEntry(go, GO_DOORS, 150.0f))
|
|
||||||
door2->SetGoState(GO_STATE_ACTIVE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void AddSC_instance_blackrock_spire()
|
void AddSC_instance_blackrock_spire()
|
||||||
{
|
{
|
||||||
new instance_blackrock_spire();
|
new instance_blackrock_spire();
|
||||||
new go_dragonspire_hall_rune;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user