Merge pull request #9015 from NorthStrider/alizabal

Alizabal
This commit is contained in:
Nay
2013-01-21 15:11:00 -08:00
6 changed files with 509 additions and 0 deletions
@@ -0,0 +1,22 @@
-- Intro Areatrigger
DELETE FROM `areatrigger_scripts` WHERE `entry`=7246;
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(7246, 'at_alizabal_intro');
UPDATE `creature_template` SET `scriptname` = 'boss_alizabal' WHERE `entry`=55869;
-- Todo: Find the Rest of the Texts and their meanings
DELETE FROM `creature_text` WHERE `entry`=55869;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(55869, 1, 0, 'How I HATE this place. My captors may be long-dead, but don\'t think I won\'t take it all out on you miserable treasure-hunters.', 14, 0, 100, 0, 0, 25779, 'Alizabal - Intro'),
(55869, 2, 0, 'I hate adventurers.', 14, 0, 100, 0, 0, 25777, 'Alizabal - Aggro'),
(55869, 3, 0, 'I hate martyrs.', 14, 0, 100, 0, 0, 25786, 'Alizabal - Seething Hate'),
(55869, 4, 0, 'I hate armor.', 14, 0, 100, 0, 0, 25785, 'Alizabal - Skewer'),
(55869, 5, 0, 'Alizabal nailed $N firmly on the ground.', 41, 0, 100, 0, 0, 0, 'Alizabal - Skewer Announce'),
(55869, 6, 0, 'I hate standing still.', 14, 0, 100, 0, 0, 25791, 'Alizabal - Blade Dance'),
(55869, 7, 0, 'Feel my hatred!', 14, 0, 100, 0, 0, 25787, 'Alizabal - ???'),
(55869, 8, 0, 'My hate will consume you!', 14, 0, 100, 0, 0, 25789, 'Alizabal - ???'),
(55869, 9, 0, 'I hate you all.', 14, 0, 100, 0, 0, 25790, 'Alizabal - ???'),
(55869, 10, 0, 'I hate mercy.', 14, 0, 100, 0, 0, 25783, 'Alizabal - Slay 1'),
(55869, 11, 0, 'My hatred burns!', 14, 0, 100, 0, 0, 25788, 'Alizabal - ???'),
(55869, 12, 0, 'I hate... every one of you...', 14, 0, 100, 0, 0, 25778, 'Alizabal - Death');
@@ -97,6 +97,8 @@ void AddSC_boss_balinda();
void AddSC_boss_drekthar();
void AddSC_boss_galvangar();
void AddSC_boss_vanndar();
void AddSC_boss_alizabal(); //Baradin Hold
void AddSC_instance_baradin_hold();
void AddSC_blackrock_depths(); //Blackrock Depths
void AddSC_boss_ambassador_flamelash();
void AddSC_boss_anubshiah();
@@ -731,6 +733,8 @@ void AddEasternKingdomsScripts()
AddSC_boss_drekthar();
AddSC_boss_galvangar();
AddSC_boss_vanndar();
AddSC_boss_alizabal(); //Baradin Hold
AddSC_instance_baradin_hold();
AddSC_blackrock_depths(); //Blackrock Depths
AddSC_boss_ambassador_flamelash();
AddSC_boss_anubshiah();
@@ -0,0 +1,47 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_BARADIN_HOLD_H_
#define DEF_BARADIN_HOLD_H_
#define MAX_ENCOUNTERS 3
enum Creatures
{
BOSS_ARGALOTH = 47120,
BOSS_OCCUTHAR = 52363,
BOSS_ALIZABAL = 55869,
NPC_EYE_OF_OCCUTHAR = 52389,
NPC_FOCUS_FIRE_DUMMY = 52369,
NPC_OCCUTHAR_EYE = 52368,
};
enum Objects
{
GO_ARGALOTH_DOOR = 207619,
GO_OCCUTHAR_DOOR = 208953,
};
enum Data
{
DATA_ARGALOTH = 1,
DATA_OCCUTHAR = 2,
DATA_ALIZABAL = 3,
};
#endif
@@ -0,0 +1,266 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "baradin_hold.h"
enum Texts
{
SAY_INTRO = 1,
SAY_AGGRO = 2,
SAY_HATE = 3,
SAY_SKEWER = 4,
SAY_SKEWER_ANNOUNCE = 5,
SAY_BLADE_STORM = 6,
SAY_SLAY = 10,
SAY_DEATH = 12,
};
enum Spells
{
SPELL_BLADE_DANCE = 105784,
SPELL_BLADE_DANCE_DUMMY = 105828,
SPELL_SEETHING_HATE = 105067,
SPELL_SKEWER = 104936,
SPELL_BERSERK = 47008,
};
enum Actions
{
ACTION_INTRO = 1,
};
enum Points
{
POINT_STORM = 1,
};
enum Events
{
EVENT_RANDOM_CAST = 1,
EVENT_STOP_STORM = 2,
EVENT_MOVE_STORM = 3,
EVENT_CAST_STORM = 4,
};
class at_alizabal_intro : public AreaTriggerScript
{
public:
at_alizabal_intro() : AreaTriggerScript("at_alizabal_intro") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/)
{
if (InstanceScript* instance = player->GetInstanceScript())
if (Creature* alizabal = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_ALIZABAL)))
alizabal->AI()->DoAction(ACTION_INTRO);
return true;
}
};
class boss_alizabal : public CreatureScript
{
public:
boss_alizabal() : CreatureScript("boss_alizabal") { }
struct boss_alizabalAI : public BossAI
{
boss_alizabalAI(Creature* creature) : BossAI(creature, DATA_ALIZABAL)
{
Intro = false;
Hate = false;
Skewer = false;
}
bool Intro;
bool Hate;
bool Skewer;
void Reset()
{
_Reset();
Hate = false;
Skewer = false;
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
Talk(SAY_AGGRO);
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
events.ScheduleEvent(EVENT_RANDOM_CAST, 10000);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
Talk(SAY_DEATH);
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
}
void KilledUnit(Unit* who)
{
if (who->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void EnterEvadeMode()
{
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
me->GetMotionMaster()->MoveTargetedHome();
_DespawnAtEvade();
}
void DoAction(int32 const action)
{
switch (action)
{
case ACTION_INTRO:
if (!Intro)
{
Talk(SAY_INTRO);
Intro = true;
}
break;
}
}
void MovementInform(uint32 type, uint32 pointId)
{
switch (pointId)
{
case POINT_STORM:
events.ScheduleEvent(EVENT_CAST_STORM, 1);
break;
}
}
void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_RANDOM_CAST:
switch (urand(0, 1))
{
case 0:
if (!Skewer)
{
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
{
DoCast(target, SPELL_SKEWER, true);
Talk(SAY_SKEWER);
Talk(SAY_SKEWER_ANNOUNCE, target->GetGUID());
}
Skewer = true;
events.ScheduleEvent(EVENT_RANDOM_CAST, urand(7000, 10000));
}
else if (!Hate)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
{
DoCast(target, SPELL_SEETHING_HATE, true);
Talk(SAY_HATE);
}
Hate = true;
events.ScheduleEvent(EVENT_RANDOM_CAST, urand(7000, 10000));
}
else if (Hate && Skewer)
{
Talk(SAY_BLADE_STORM);
DoCastAOE(SPELL_BLADE_DANCE_DUMMY);
DoCastAOE(SPELL_BLADE_DANCE);
events.ScheduleEvent(EVENT_RANDOM_CAST, 21000);
events.ScheduleEvent(EVENT_MOVE_STORM, 4050);
events.ScheduleEvent(EVENT_STOP_STORM, 13000);
}
break;
case 1:
if (!Hate)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
{
DoCast(target, SPELL_SEETHING_HATE, true);
Talk(SAY_HATE);
}
Hate = true;
events.ScheduleEvent(EVENT_RANDOM_CAST, urand(7000, 10000));
}
else if (!Skewer)
{
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
{
DoCast(target, SPELL_SKEWER, true);
Talk(SAY_SKEWER);
Talk(SAY_SKEWER_ANNOUNCE, target->GetGUID());
}
Skewer = true;
events.ScheduleEvent(EVENT_RANDOM_CAST, urand(7000, 10000));
}
else if (Hate && Skewer)
{
Talk(SAY_BLADE_STORM);
DoCastAOE(SPELL_BLADE_DANCE_DUMMY);
DoCastAOE(SPELL_BLADE_DANCE);
events.ScheduleEvent(EVENT_RANDOM_CAST, 21000);
events.ScheduleEvent(EVENT_MOVE_STORM, 4050);
events.ScheduleEvent(EVENT_STOP_STORM, 13000);
}
break;
}
break;
case EVENT_MOVE_STORM:
me->SetSpeed(MOVE_RUN, 4.0f);
me->SetSpeed(MOVE_WALK, 4.0f);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
me->GetMotionMaster()->MovePoint(POINT_STORM, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
events.ScheduleEvent(EVENT_MOVE_STORM, 4050);
break;
case EVENT_STOP_STORM:
me->RemoveAura(SPELL_BLADE_DANCE);
me->RemoveAura(SPELL_BLADE_DANCE_DUMMY);
me->SetSpeed(MOVE_WALK, 1.0f);
me->SetSpeed(MOVE_RUN, 1.14f);
me->GetMotionMaster()->MoveChase(me->getVictim());
Hate = false;
Skewer = false;
break;
case EVENT_CAST_STORM:
DoCastAOE(SPELL_BLADE_DANCE);
break;
}
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_alizabalAI(creature);
}
};
void AddSC_boss_alizabal()
{
new boss_alizabal();
new at_alizabal_intro();
}
@@ -0,0 +1,168 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include"baradin_hold.h"
DoorData const doorData[] =
{
{GO_ARGALOTH_DOOR, DATA_ARGALOTH, DOOR_TYPE_ROOM, BOUNDARY_NONE},
{GO_OCCUTHAR_DOOR, DATA_OCCUTHAR, DOOR_TYPE_ROOM, BOUNDARY_NONE},
};
class instance_baradin_hold: public InstanceMapScript
{
public:
instance_baradin_hold() : InstanceMapScript("instance_baradin_hold", 757) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const
{
return new instance_baradin_hold_InstanceMapScript(map);
}
struct instance_baradin_hold_InstanceMapScript: public InstanceScript
{
instance_baradin_hold_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetBossNumber(MAX_ENCOUNTERS);
LoadDoorData(doorData);
_argalothGUID = 0;
_occutharGUID = 0;
_alizabalGUID = 0;
_argalothDoor = 0;
_occutharDoor = 0;
}
void Initialize()
{
}
void OnCreatureCreate(Creature* creature)
{
switch(creature->GetEntry())
{
case BOSS_ARGALOTH:
_argalothGUID = creature->GetGUID();
break;
case BOSS_OCCUTHAR:
_occutharGUID = creature->GetGUID();
break;
case BOSS_ALIZABAL:
_alizabalGUID = creature->GetGUID();
break;
}
}
void OnGameObjectCreate(GameObject* go)
{
switch(go->GetEntry())
{
case GO_ARGALOTH_DOOR:
_argalothDoor = go->GetGUID();
AddDoor(go, true);
break;
case GO_OCCUTHAR_DOOR:
_occutharDoor = go->GetGUID();
AddDoor(go, true);
break;
}
}
uint64 GetData64(uint32 data) const
{
switch (data)
{
case DATA_ARGALOTH:
return _argalothGUID;
case DATA_OCCUTHAR:
return _occutharGUID;
case DATA_ALIZABAL:
return _alizabalGUID;
default:
break;
}
return NULL;
}
void OnGameObjectRemove(GameObject* go)
{
switch(go->GetEntry())
{
case GO_ARGALOTH_DOOR:
AddDoor(go, false);
break;
case GO_OCCUTHAR_DOOR:
AddDoor(go, false);
break;
}
}
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
saveStream << "B H " << GetBossSaveData();
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
void Load(const char* in)
{
if (!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(in);
char dataHead1, dataHead2;
std::istringstream loadStream(in);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'B' && dataHead2 == 'H')
{
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
} else OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
}
private:
uint64 _argalothGUID;
uint64 _occutharGUID;
uint64 _alizabalGUID;
uint64 _argalothDoor;
uint64 _occutharDoor;
};
};
void AddSC_instance_baradin_hold()
{
new instance_baradin_hold();
}
@@ -17,6 +17,8 @@ set(scripts_STAT_SRCS
EasternKingdoms/AlteracValley/boss_drekthar.cpp
EasternKingdoms/AlteracValley/boss_vanndar.cpp
EasternKingdoms/AlteracValley/alterac_valley.cpp
EasternKingdoms/BaradinHold/boss_alizabal.cpp
EasternKingdoms/BaradinHold/instance_baradin_hold.cpp
EasternKingdoms/Scholomance/boss_the_ravenian.cpp
EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp