aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-11-27 14:15:12 +0100
committerSpp <spp@jorge.gr>2012-11-27 14:15:12 +0100
commit404129963c8536ced7c1398827e0f7ef9391bcba (patch)
tree683d17c7e8b496f737b741fa393e812bf6866c71 /src/server/scripts
parent99e050fb271697ded6bf649c3173e7d04a196a74 (diff)
parente9544985608e551d3765dea525d63b30d2c03b17 (diff)
Merge branch 'master' into 4.3.4
Conflicts: src/server/game/Achievements/AchievementMgr.cpp src/server/game/Achievements/AchievementMgr.h src/server/game/AuctionHouse/AuctionHouseMgr.cpp src/server/game/AuctionHouse/AuctionHouseMgr.h src/server/game/Battlegrounds/BattlegroundMgr.h src/server/game/Chat/ChatLink.cpp src/server/game/DataStores/DBCEnums.h src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/Corpse/Corpse.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Vehicle/Vehicle.cpp src/server/game/Groups/Group.cpp src/server/game/Groups/Group.h src/server/game/Guilds/Guild.cpp src/server/game/Handlers/ArenaTeamHandler.cpp src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/BattlefieldHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/MovementHandler.cpp src/server/game/Miscellaneous/SharedDefines.h src/server/game/Movement/Spline/MoveSpline.cpp src/server/game/Movement/Spline/MoveSplineFlag.h src/server/game/Movement/Spline/MovementUtil.cpp src/server/game/Reputation/ReputationMgr.cpp src/server/game/Spells/Auras/SpellAuraDefines.h src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellInfo.cpp src/server/scripts/Commands/cs_disable.cpp src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/redridge_mountains.cpp src/server/scripts/EasternKingdoms/stormwind_city.cpp src/server/scripts/EasternKingdoms/tirisfal_glades.cpp src/server/scripts/Kalimdor/boss_azuregos.cpp src/server/scripts/Kalimdor/ungoro_crater.cpp src/server/shared/Packets/ByteBuffer.h src/tools/map_extractor/dbcfile.h
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_disable.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp61
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp42
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp293
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp262
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp308
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp286
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp278
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp588
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/silverpine_forest.cpp53
-rw-r--r--src/server/scripts/EasternKingdoms/tirisfal_glades.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/western_plaguelands.cpp36
-rw-r--r--src/server/scripts/Examples/example_creature.cpp37
-rw-r--r--src/server/scripts/Examples/example_escort.cpp49
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp16
-rw-r--r--src/server/scripts/Examples/example_misc.cpp7
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp166
-rw-r--r--src/server/scripts/Kalimdor/ungoro_crater.cpp17
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp0
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp373
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPHP.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPNA.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPSI.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPTF.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/OutdoorPvP/OutdoorPvPZM.h0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/World/achievement_scripts.cpp0
-rw-r--r--[-rwxr-xr-x]src/server/scripts/World/chat_log.cpp0
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
56 files changed, 2723 insertions, 250 deletions
diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp
index 27145ca36aa..cf0b1f08e53 100644
--- a/src/server/scripts/Commands/cs_disable.cpp
+++ b/src/server/scripts/Commands/cs_disable.cpp
@@ -22,9 +22,9 @@ Comment: All disable related commands
Category: commandscripts
EndScriptData */
+#include "DisableMgr.h"
#include "AchievementMgr.h"
#include "Chat.h"
-#include "DisableMgr.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "OutdoorPvP.h"
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index da6fdb2d0e3..1fa5cc9c5af 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -226,7 +226,6 @@ public:
if (text)
CreatureAI::Talk(text);
-
}
void PrepareEncounter()
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 4d9bd1f2192..dcf70b36df6 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -113,7 +113,7 @@ public:
for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
//Unit* unit = Unit::GetUnit(*me, FelCrystals[i]);
- if (Creature *creature = Unit::GetCreature(*me, *itr))
+ if (Creature* creature = Unit::GetCreature(*me, *itr))
{
if (!creature->isAlive())
creature->Respawn(); // Let the core handle setting death state, etc.
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
index f792b861c99..85a54398511 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
@@ -28,7 +28,10 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "molten_core.h"
-#define EMOTE_SERVICE -1409000
+enum Emotes
+{
+ EMOTE_SERVICE = 0
+};
enum Spells
{
@@ -76,7 +79,7 @@ class boss_baron_geddon : public CreatureScript
{
me->InterruptNonMeleeSpells(true);
DoCast(me, SPELL_ARMAGEDDON);
- DoScriptText(EMOTE_SERVICE, me);
+ Talk(EMOTE_SERVICE);
return;
}
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
index 65a630a58f7..42952580d54 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
@@ -30,7 +30,7 @@ EndScriptData */
enum Texts
{
- EMOTE_FRENZY = -1409001,
+ EMOTE_FRENZY = 0
};
enum Spells
@@ -88,7 +88,7 @@ class boss_magmadar : public CreatureScript
switch (eventId)
{
case EVENT_FRENZY:
- DoScriptText(EMOTE_FRENZY, me);
+ Talk(EMOTE_FRENZY);
DoCast(me, SPELL_FRENZY);
events.ScheduleEvent(EVENT_FRENZY, 15000);
break;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
index c7d6b31d2ea..043e5b16330 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
@@ -32,17 +32,14 @@ EndScriptData */
enum Texts
{
- SAY_AGGRO = -1409003,
- SAY_SPAWN = -1409004,
- SAY_SLAY = -1409005,
- SAY_SPECIAL = -1409006,
- SAY_DEFEAT = -1409007,
-
- SAY_SUMMON_MAJ = -1409008,
- SAY_ARRIVAL1_RAG = -1409009,
- SAY_ARRIVAL2_MAJ = -1409010,
- SAY_ARRIVAL3_RAG = -1409011,
- SAY_ARRIVAL5_RAG = -1409012,
+ SAY_AGGRO = 0,
+ SAY_SPAWN = 1,
+ SAY_SLAY = 2,
+ SAY_SPECIAL = 3,
+ SAY_DEFEAT = 4,
+
+ SAY_SUMMON_MAJ = 5,
+ SAY_ARRIVAL2_MAJ = 6
};
enum Spells
@@ -84,13 +81,13 @@ class boss_majordomo : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (urand(0, 99) < 25)
- DoScriptText(SAY_SLAY, me);
+ Talk(SAY_SLAY);
}
void EnterCombat(Unit* who)
{
BossAI::EnterCombat(who);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000);
events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 15000);
events.ScheduleEvent(EVENT_BLAST_WAVE, 10000);
@@ -111,7 +108,7 @@ class boss_majordomo : public CreatureScript
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
me->setFaction(35);
me->AI()->EnterEvadeMode();
- DoScriptText(SAY_DEFEAT, me);
+ Talk(SAY_DEFEAT);
_JustDied();
events.ScheduleEvent(EVENT_OUTRO_1, 32000);
return;
@@ -168,7 +165,7 @@ class boss_majordomo : public CreatureScript
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
break;
case EVENT_OUTRO_3:
- DoScriptText(SAY_ARRIVAL2_MAJ, me);
+ Talk(SAY_ARRIVAL2_MAJ);
break;
default:
break;
@@ -182,7 +179,7 @@ class boss_majordomo : public CreatureScript
if (action == ACTION_START_RAGNAROS)
{
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- DoScriptText(SAY_SUMMON_MAJ, me);
+ Talk(SAY_SUMMON_MAJ);
events.ScheduleEvent(EVENT_OUTRO_2, 8000);
events.ScheduleEvent(EVENT_OUTRO_3, 24000);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 0cb2bd7f7bc..4a29a7d929b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -25,6 +25,7 @@
#include "PassiveAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
/*######
##Quest 12848
@@ -32,7 +33,7 @@
#define GCD_CAST 1
-enum eDeathKnightSpells
+enum UnworthyInitiate
{
SPELL_SOUL_PRISON_CHAIN_SELF = 54612,
SPELL_SOUL_PRISON_CHAIN = 54613,
@@ -41,25 +42,24 @@ enum eDeathKnightSpells
SPELL_ICY_TOUCH = 52372,
SPELL_PLAGUE_STRIKE = 52373,
SPELL_BLOOD_STRIKE = 52374,
- SPELL_DEATH_COIL = 52375
-};
+ SPELL_DEATH_COIL = 52375,
-#define EVENT_ICY_TOUCH 1
-#define EVENT_PLAGUE_STRIKE 2
-#define EVENT_BLOOD_STRIKE 3
-#define EVENT_DEATH_COIL 4
+ SAY_EVENT_START = 0,
+ SAY_EVENT_ATTACK = 1,
-//used by 29519, 29520, 29565, 29566, 29567 but signed for 29519
-int32 say_event_start[8] =
-{
- -1609000, -1609001, -1609002, -1609003,
- -1609004, -1609005, -1609006, -1609007
+ EVENT_ICY_TOUCH = 1,
+ EVENT_PLAGUE_STRIKE = 2,
+ EVENT_BLOOD_STRIKE = 3,
+ EVENT_DEATH_COIL = 4
};
-int32 say_event_attack[9] =
+enum UnworthyInitiatePhase
{
- -1609008, -1609009, -1609010, -1609011, -1609012,
- -1609013, -1609014, -1609015, -1609016
+ PHASE_CHAINED,
+ PHASE_TO_EQUIP,
+ PHASE_EQUIPING,
+ PHASE_TO_ATTACK,
+ PHASE_ATTACKING,
};
uint32 acherus_soul_prison[12] =
@@ -87,15 +87,6 @@ uint32 acherus_unworthy_initiate[5] =
29567
};
-enum UnworthyInitiatePhase
-{
- PHASE_CHAINED,
- PHASE_TO_EQUIP,
- PHASE_EQUIPING,
- PHASE_TO_ATTACK,
- PHASE_ATTACKING,
-};
-
class npc_unworthy_initiate : public CreatureScript
{
public:
@@ -155,7 +146,7 @@ public:
me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true);
if (Player* starter = Unit::GetPlayer(*me, playerGUID))
- DoScriptText(say_event_attack[rand()%9], me, starter);
+ sCreatureTextMgr->SendChat(me, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, starter);
phase = PHASE_TO_ATTACK;
}
@@ -174,7 +165,7 @@ public:
anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f);
playerGUID = target->GetGUID();
- DoScriptText(say_event_start[rand()%8], me, target);
+ sCreatureTextMgr->SendChat(me, SAY_EVENT_START, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target);
}
void UpdateAI(const uint32 diff)
@@ -341,15 +332,7 @@ public:
enum eDuelEnums
{
- SAY_DUEL_A = -1609080,
- SAY_DUEL_B = -1609081,
- SAY_DUEL_C = -1609082,
- SAY_DUEL_D = -1609083,
- SAY_DUEL_E = -1609084,
- SAY_DUEL_F = -1609085,
- SAY_DUEL_G = -1609086,
- SAY_DUEL_H = -1609087,
- SAY_DUEL_I = -1609088,
+ SAY_DUEL = 0,
SPELL_DUEL = 52996,
//SPELL_DUEL_TRIGGERED = 52990,
@@ -360,11 +343,6 @@ enum eDuelEnums
FACTION_HOSTILE = 2068
};
-int32 m_auiRandomSay[] =
-{
- SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I
-};
-
class npc_death_knight_initiate : public CreatureScript
{
public:
@@ -389,8 +367,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
- int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32));
- DoScriptText(m_auiRandomSay[uiSayId], creature, player);
+ sCreatureTextMgr->SendChat(creature, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
player->CastSpell(creature, SPELL_DUEL, false);
player->CastSpell(player, SPELL_DUEL_FLAG, true);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 1bfcb4adf6a..7ceb86dd980 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -20,6 +20,7 @@
#include "ScriptedEscortAI.h"
#include "Player.h"
#include "SpellInfo.h"
+#include "CreatureTextMgr.h"
//How to win friends and influence enemies
// texts signed for creature 28939 but used for 28939, 28940, 28610
@@ -30,22 +31,14 @@ enum win_friends
SAY_PERSUADED2 = 3,
SAY_PERSUADED3 = 4,
SAY_PERSUADED4 = 5,
- SAY_PERSUADED6 = 6,
+ SAY_PERSUADED5 = 6,
+ SAY_PERSUADED6 = 7,
+ SAY_PERSUADE_RAND = 8,
SPELL_PERSUASIVE_STRIKE = 52781,
SPELL_THREAT_PULSE = 58111,
QUEST_HOW_TO_WIN_FRIENDS = 12720,
};
-#define SAY_PERSUADED5 "LIES! The pain you are about to endure will be talked about for years to come!"
-
-#define SAY_PERSUADE1 "I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"
-#define SAY_PERSUADE2 "Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"
-#define SAY_PERSUADE3 "I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"
-#define SAY_PERSUADE4 "Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."
-#define SAY_PERSUADE5 "I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"
-#define SAY_PERSUADE6 "What is the \"Crimson Dawn\"?"
-#define SAY_PERSUADE7 "\"Crimson Dawn\"! What is it! Speak!"
-
class npc_crusade_persuaded : public CreatureScript
{
public:
@@ -90,30 +83,7 @@ public:
me->SetReactState(REACT_PASSIVE);
DoCastAOE(SPELL_THREAT_PULSE, true);
- switch (urand(1, 7))
- {
- case 1:
- player->Say(SAY_PERSUADE1, LANG_UNIVERSAL);
- break;
- case 2:
- player->Say(SAY_PERSUADE2, LANG_UNIVERSAL);
- break;
- case 3:
- player->Say(SAY_PERSUADE3, LANG_UNIVERSAL);
- break;
- case 4:
- player->Say(SAY_PERSUADE4, LANG_UNIVERSAL);
- break;
- case 5:
- player->Say(SAY_PERSUADE5, LANG_UNIVERSAL);
- break;
- case 6:
- player->Say(SAY_PERSUADE6, LANG_UNIVERSAL);
- break;
- case 7:
- player->Say(SAY_PERSUADE7, LANG_UNIVERSAL);
- break;
- }
+ sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
Talk(SAY_CRUSADER);
}
}
@@ -156,7 +126,7 @@ public:
break;
case 5:
- player->Say(SAY_PERSUADED5, LANG_UNIVERSAL);
+ sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
speechTimer = 8000;
break;
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index 5d9df239870..1ec0eda171c 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -34,7 +34,7 @@ EndScriptData */
enum eEnums
{
SAY_BOSS_DIE_AD = 0,
- SAY_BOSS_DIE_AS = 0,
+ SAY_BOSS_DIE_AS = 3,
SAY_ARCHMAGE = 0,
NPC_ASH = 3850,
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index 467b532163b..5da38e21d2f 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -83,12 +83,10 @@ public:
/*######
## mob_freed_soul
######*/
-
-//Possibly more of these quotes around.
-#define SAY_ZAPPED0 -1329000
-#define SAY_ZAPPED1 -1329001
-#define SAY_ZAPPED2 -1329002
-#define SAY_ZAPPED3 -1329003
+enum FreedSoul
+{
+ SAY_ZAPPED = 0
+};
class mob_freed_soul : public CreatureScript
{
@@ -106,7 +104,7 @@ public:
void Reset()
{
- DoScriptText(RAND(SAY_ZAPPED0, SAY_ZAPPED1, SAY_ZAPPED2, SAY_ZAPPED3), me);
+ Talk(SAY_ZAPPED);
}
void EnterCombat(Unit* /*who*/) {}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
new file mode 100644
index 00000000000..c5639a68860
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -0,0 +1,293 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Arlokk
+SD%Complete: 95
+SDComment: Wrong cleave and red aura is missing.
+SDCategory: Zul'Gurub
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "zulgurub.h"
+
+enum eYells
+{
+ SAY_AGGRO = 0,
+ SAY_FEAST_PANTHER = 1,
+ SAY_DEATH = 2,
+};
+
+enum eSpells
+{
+ SPELL_SHADOWWORDPAIN = 23952,
+ SPELL_GOUGE = 24698,
+ SPELL_MARK = 24210,
+ SPELL_CLEAVE = 26350, //Perhaps not right. Not a red aura...
+ SPELL_PANTHER_TRANSFORM = 24190,
+
+ MODEL_ID_NORMAL = 15218,
+ MODEL_ID_PANTHER = 15215,
+ MODEL_ID_BLANK = 11686,
+
+ NPC_ZULIAN_PROWLER = 15101
+};
+
+class boss_arlokk : public CreatureScript
+{
+ public:
+
+ boss_arlokk()
+ : CreatureScript("boss_arlokk")
+ {
+ }
+
+ struct boss_arlokkAI : public ScriptedAI
+ {
+ boss_arlokkAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ InstanceScript* instance;
+
+ uint32 m_uiShadowWordPain_Timer;
+ uint32 m_uiGouge_Timer;
+ uint32 m_uiMark_Timer;
+ uint32 m_uiCleave_Timer;
+ uint32 m_uiVanish_Timer;
+ uint32 m_uiVisible_Timer;
+
+ uint32 m_uiSummon_Timer;
+ uint32 m_uiSummonCount;
+
+ Unit* m_pMarkedTarget;
+ uint64 MarkedTargetGUID;
+
+ bool m_bIsPhaseTwo;
+ bool m_bIsVanished;
+
+ void Reset()
+ {
+ m_uiShadowWordPain_Timer = 8000;
+ m_uiGouge_Timer = 14000;
+ m_uiMark_Timer = 35000;
+ m_uiCleave_Timer = 4000;
+ m_uiVanish_Timer = 60000;
+ m_uiVisible_Timer = 6000;
+
+ m_uiSummon_Timer = 5000;
+ m_uiSummonCount = 0;
+
+ m_bIsPhaseTwo = false;
+ m_bIsVanished = false;
+
+ MarkedTargetGUID = 0;
+
+ me->SetDisplayId(MODEL_ID_NORMAL);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ }
+
+ void JustReachedHome()
+ {
+ if (instance)
+ instance->SetData(DATA_ARLOKK, NOT_STARTED);
+
+ //we should be summoned, so despawn
+ me->DespawnOrUnsummon();
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Talk(SAY_DEATH);
+
+ me->SetDisplayId(MODEL_ID_NORMAL);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ if (instance)
+ instance->SetData(DATA_ARLOKK, DONE);
+ }
+
+ void DoSummonPhanters()
+ {
+ if (MarkedTargetGUID)
+ Talk(SAY_FEAST_PANTHER, MarkedTargetGUID);
+
+ me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998f, -1649.6734f, 41.4800f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ }
+
+ void JustSummoned(Creature* summoned)
+ {
+ if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
+ summoned->AI()->AttackStart(pMarkedTarget);
+
+ ++m_uiSummonCount;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (!m_bIsPhaseTwo)
+ {
+ if (m_uiShadowWordPain_Timer <= uiDiff)
+ {
+ DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
+ m_uiShadowWordPain_Timer = 15000;
+ }
+ else
+ m_uiShadowWordPain_Timer -= uiDiff;
+
+ if (m_uiMark_Timer <= uiDiff)
+ {
+ Unit* pMarkedTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
+
+ if (pMarkedTarget)
+ {
+ DoCast(pMarkedTarget, SPELL_MARK);
+ MarkedTargetGUID = pMarkedTarget->GetGUID();
+ }
+ else
+ sLog->outError(LOG_FILTER_TSCR, "boss_arlokk could not accuire pMarkedTarget.");
+
+ m_uiMark_Timer = 15000;
+ }
+ else
+ m_uiMark_Timer -= uiDiff;
+ }
+ else
+ {
+ //Cleave_Timer
+ if (m_uiCleave_Timer <= uiDiff)
+ {
+ DoCast(me->getVictim(), SPELL_CLEAVE);
+ m_uiCleave_Timer = 16000;
+ }
+ else
+ m_uiCleave_Timer -= uiDiff;
+
+ //Gouge_Timer
+ if (m_uiGouge_Timer <= uiDiff)
+ {
+ DoCast(me->getVictim(), SPELL_GOUGE);
+
+ DoModifyThreatPercent(me->getVictim(), -80);
+
+ m_uiGouge_Timer = 17000+rand()%10000;
+ }
+ else
+ m_uiGouge_Timer -= uiDiff;
+ }
+
+ if (m_uiSummonCount <= 30)
+ {
+ if (m_uiSummon_Timer <= uiDiff)
+ {
+ DoSummonPhanters();
+ m_uiSummon_Timer = 5000;
+ }
+ else
+ m_uiSummon_Timer -= uiDiff;
+ }
+
+ if (m_uiVanish_Timer <= uiDiff)
+ {
+ //Invisble Model
+ me->SetDisplayId(MODEL_ID_BLANK);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ me->AttackStop();
+ DoResetThreat();
+
+ m_bIsVanished = true;
+
+ m_uiVanish_Timer = 45000;
+ m_uiVisible_Timer = 6000;
+ }
+ else
+ m_uiVanish_Timer -= uiDiff;
+
+ if (m_bIsVanished)
+ {
+ if (m_uiVisible_Timer <= uiDiff)
+ {
+ //The Panther Model
+ me->SetDisplayId(MODEL_ID_PANTHER);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ const CreatureTemplate* cinfo = me->GetCreatureTemplate();
+ me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
+ me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
+ me->UpdateDamagePhysical(BASE_ATTACK);
+
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ AttackStart(target);
+
+ m_bIsPhaseTwo = true;
+ m_bIsVanished = false;
+ }
+ else
+ m_uiVisible_Timer -= uiDiff;
+ }
+ else
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_arlokkAI(creature);
+ }
+};
+
+class go_gong_of_bethekk : public GameObjectScript
+{
+ public:
+ go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk")
+ {
+ }
+
+ bool OnGossipHello(Player* /*player*/, GameObject* go)
+ {
+ if (InstanceScript* instance = go->GetInstanceScript())
+ {
+ if (instance->GetData(DATA_ARLOKK) == DONE || instance->GetData(DATA_ARLOKK) == IN_PROGRESS)
+ return true;
+
+ instance->SetData(DATA_ARLOKK, IN_PROGRESS);
+ return true;
+ }
+
+ return true;
+ }
+};
+
+void AddSC_boss_arlokk()
+{
+ new boss_arlokk();
+ new go_gong_of_bethekk();
+}
+
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
new file mode 100644
index 00000000000..7d80de88beb
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -0,0 +1,262 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Hakkar
+SD%Complete: 95
+SDComment: Blood siphon spell buggy cause of Core Issue.
+SDCategory: Zul'Gurub
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "zulgurub.h"
+
+enum Hakkar
+{
+ SAY_AGGRO = 0,
+ SAY_FLEEING = 1,
+ SAY_MINION_DESTROY = 2, //where does it belong?
+ SAY_PROTECT_ALTAR = 3, //where does it belong?
+
+ SPELL_BLOODSIPHON = 24322,
+ SPELL_CORRUPTEDBLOOD = 24328,
+ SPELL_CAUSEINSANITY = 24327, //Not working disabled.
+ SPELL_WILLOFHAKKAR = 24178,
+ SPELL_ENRAGE = 24318,
+
+// The Aspects of all High Priests
+ SPELL_ASPECT_OF_JEKLIK = 24687,
+ SPELL_ASPECT_OF_VENOXIS = 24688,
+ SPELL_ASPECT_OF_MARLI = 24686,
+ SPELL_ASPECT_OF_THEKAL = 24689,
+ SPELL_ASPECT_OF_ARLOKK = 24690
+};
+
+class boss_hakkar : public CreatureScript
+{
+ public:
+
+ boss_hakkar()
+ : CreatureScript("boss_hakkar")
+ {
+ }
+
+ struct boss_hakkarAI : public ScriptedAI
+ {
+ boss_hakkarAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ InstanceScript* instance;
+
+ uint32 BloodSiphon_Timer;
+ uint32 CorruptedBlood_Timer;
+ uint32 CauseInsanity_Timer;
+ uint32 WillOfHakkar_Timer;
+ uint32 Enrage_Timer;
+
+ uint32 CheckJeklik_Timer;
+ uint32 CheckVenoxis_Timer;
+ uint32 CheckMarli_Timer;
+ uint32 CheckThekal_Timer;
+ uint32 CheckArlokk_Timer;
+
+ uint32 AspectOfJeklik_Timer;
+ uint32 AspectOfVenoxis_Timer;
+ uint32 AspectOfMarli_Timer;
+ uint32 AspectOfThekal_Timer;
+ uint32 AspectOfArlokk_Timer;
+
+ bool Enraged;
+
+ void Reset()
+ {
+ BloodSiphon_Timer = 90000;
+ CorruptedBlood_Timer = 25000;
+ CauseInsanity_Timer = 17000;
+ WillOfHakkar_Timer = 17000;
+ Enrage_Timer = 600000;
+
+ CheckJeklik_Timer = 1000;
+ CheckVenoxis_Timer = 2000;
+ CheckMarli_Timer = 3000;
+ CheckThekal_Timer = 4000;
+ CheckArlokk_Timer = 5000;
+
+ AspectOfJeklik_Timer = 4000;
+ AspectOfVenoxis_Timer = 7000;
+ AspectOfMarli_Timer = 12000;
+ AspectOfThekal_Timer = 8000;
+ AspectOfArlokk_Timer = 18000;
+
+ Enraged = false;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //BloodSiphon_Timer
+ if (BloodSiphon_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_BLOODSIPHON);
+ BloodSiphon_Timer = 90000;
+ } else BloodSiphon_Timer -= diff;
+
+ //CorruptedBlood_Timer
+ if (CorruptedBlood_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_CORRUPTEDBLOOD);
+ CorruptedBlood_Timer = urand(30000, 45000);
+ } else CorruptedBlood_Timer -= diff;
+
+ //CauseInsanity_Timer
+ /*if (CauseInsanity_Timer <= diff)
+ {
+ if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_CAUSEINSANITY);
+
+ CauseInsanity_Timer = urand(35000, 43000);
+ } else CauseInsanity_Timer -= diff;*/
+
+ //WillOfHakkar_Timer
+ if (WillOfHakkar_Timer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_WILLOFHAKKAR);
+
+ WillOfHakkar_Timer = urand(25000, 35000);
+ } else WillOfHakkar_Timer -= diff;
+
+ if (!Enraged && Enrage_Timer <= diff)
+ {
+ DoCast(me, SPELL_ENRAGE);
+ Enraged = true;
+ } else Enrage_Timer -= diff;
+
+ //Checking if Jeklik is dead. If not we cast her Aspect
+ if (CheckJeklik_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_JEKLIK) != DONE)
+ {
+ if (AspectOfJeklik_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_ASPECT_OF_JEKLIK);
+ AspectOfJeklik_Timer = urand(10000, 14000);
+ } else AspectOfJeklik_Timer -= diff;
+ }
+ }
+ CheckJeklik_Timer = 1000;
+ } else CheckJeklik_Timer -= diff;
+
+ //Checking if Venoxis is dead. If not we cast his Aspect
+ if (CheckVenoxis_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_VENOXIS) != DONE)
+ {
+ if (AspectOfVenoxis_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_ASPECT_OF_VENOXIS);
+ AspectOfVenoxis_Timer = 8000;
+ } else AspectOfVenoxis_Timer -= diff;
+ }
+ }
+ CheckVenoxis_Timer = 1000;
+ } else CheckVenoxis_Timer -= diff;
+
+ //Checking if Marli is dead. If not we cast her Aspect
+ if (CheckMarli_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_MARLI) != DONE)
+ {
+ if (AspectOfMarli_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
+ AspectOfMarli_Timer = 10000;
+ } else AspectOfMarli_Timer -= diff;
+
+ }
+ }
+ CheckMarli_Timer = 1000;
+ } else CheckMarli_Timer -= diff;
+
+ //Checking if Thekal is dead. If not we cast his Aspect
+ if (CheckThekal_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_THEKAL) != DONE)
+ {
+ if (AspectOfThekal_Timer <= diff)
+ {
+ DoCast(me, SPELL_ASPECT_OF_THEKAL);
+ AspectOfThekal_Timer = 15000;
+ } else AspectOfThekal_Timer -= diff;
+ }
+ }
+ CheckThekal_Timer = 1000;
+ } else CheckThekal_Timer -= diff;
+
+ //Checking if Arlokk is dead. If yes we cast her Aspect
+ if (CheckArlokk_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_ARLOKK) != DONE)
+ {
+ if (AspectOfArlokk_Timer <= diff)
+ {
+ DoCast(me, SPELL_ASPECT_OF_ARLOKK);
+ DoResetThreat();
+
+ AspectOfArlokk_Timer = urand(10000, 15000);
+ } else AspectOfArlokk_Timer -= diff;
+ }
+ }
+ CheckArlokk_Timer = 1000;
+ } else CheckArlokk_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_hakkarAI(creature);
+ }
+};
+
+void AddSC_boss_hakkar()
+{
+ new boss_hakkar();
+}
+
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
new file mode 100644
index 00000000000..3a2da6fdba9
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -0,0 +1,308 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Jeklik
+SD%Complete: 85
+SDComment: Problem in finding the right flying batriders for spawning and making them fly.
+SDCategory: Zul'Gurub
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "zulgurub.h"
+
+enum Jeklik
+{
+ SAY_AGGRO = 0,
+ SAY_RAIN_FIRE = 1,
+ SAY_DEATH = 2,
+
+ SPELL_CHARGE = 22911,
+ SPELL_SONICBURST = 23918,
+ SPELL_SCREECH = 6605,
+ SPELL_SHADOW_WORD_PAIN = 23952,
+ SPELL_MIND_FLAY = 23953,
+ SPELL_CHAIN_MIND_FLAY = 26044, //Right ID unknown. So disabled
+ SPELL_GREATERHEAL = 23954,
+ SPELL_BAT_FORM = 23966,
+
+ // Batriders Spell
+ SPELL_BOMB = 40332 //Wrong ID but Magmadars bomb is not working...
+};
+
+class boss_jeklik : public CreatureScript
+{
+ public:
+
+ boss_jeklik()
+ : CreatureScript("boss_jeklik")
+ {
+ }
+
+ struct boss_jeklikAI : public ScriptedAI
+ {
+ boss_jeklikAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ InstanceScript* instance;
+
+ uint32 Charge_Timer;
+ uint32 SonicBurst_Timer;
+ uint32 Screech_Timer;
+ uint32 SpawnBats_Timer;
+ uint32 ShadowWordPain_Timer;
+ uint32 MindFlay_Timer;
+ uint32 ChainMindFlay_Timer;
+ uint32 GreaterHeal_Timer;
+ uint32 SpawnFlyingBats_Timer;
+
+ bool PhaseTwo;
+
+ void Reset()
+ {
+ Charge_Timer = 20000;
+ SonicBurst_Timer = 8000;
+ Screech_Timer = 13000;
+ SpawnBats_Timer = 60000;
+ ShadowWordPain_Timer = 6000;
+ MindFlay_Timer = 11000;
+ ChainMindFlay_Timer = 26000;
+ GreaterHeal_Timer = 50000;
+ SpawnFlyingBats_Timer = 10000;
+
+ PhaseTwo = false;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ DoCast(me, SPELL_BAT_FORM);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Talk(SAY_DEATH);
+
+ if (instance)
+ instance->SetData(DATA_JEKLIK, DONE);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (me->getVictim() && me->isAlive())
+ {
+ if (HealthAbovePct(50))
+ {
+ if (Charge_Timer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ DoCast(target, SPELL_CHARGE);
+ AttackStart(target);
+ }
+
+ Charge_Timer = urand(15000, 30000);
+ } else Charge_Timer -= diff;
+
+ if (SonicBurst_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SONICBURST);
+ SonicBurst_Timer = urand(8000, 13000);
+ } else SonicBurst_Timer -= diff;
+
+ if (Screech_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SCREECH);
+ Screech_Timer = urand(18000, 26000);
+ } else Screech_Timer -= diff;
+
+ if (SpawnBats_Timer <= diff)
+ {
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+
+ Creature* Bat = NULL;
+ Bat = me->SummonCreature(11368, -12291.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (target && Bat) Bat ->AI()->AttackStart(target);
+
+ Bat = me->SummonCreature(11368, -12289.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (target && Bat) Bat ->AI()->AttackStart(target);
+
+ Bat = me->SummonCreature(11368, -12293.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (target && Bat) Bat ->AI()->AttackStart(target);
+
+ Bat = me->SummonCreature(11368, -12291.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (target && Bat) Bat ->AI()->AttackStart(target);
+
+ Bat = me->SummonCreature(11368, -12289.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (target && Bat) Bat ->AI()->AttackStart(target);
+ Bat = me->SummonCreature(11368, -12293.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (target && Bat) Bat ->AI()->AttackStart(target);
+
+ SpawnBats_Timer = 60000;
+ } else SpawnBats_Timer -= diff;
+ }
+ else
+ {
+ if (PhaseTwo)
+ {
+ if (PhaseTwo && ShadowWordPain_Timer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ DoCast(target, SPELL_SHADOW_WORD_PAIN);
+ ShadowWordPain_Timer = urand(12000, 18000);
+ }
+ }ShadowWordPain_Timer -=diff;
+
+ if (MindFlay_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_MIND_FLAY);
+ MindFlay_Timer = 16000;
+ }MindFlay_Timer -=diff;
+
+ if (ChainMindFlay_Timer <= diff)
+ {
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me->getVictim(), SPELL_CHAIN_MIND_FLAY);
+ ChainMindFlay_Timer = urand(15000, 30000);
+ }ChainMindFlay_Timer -=diff;
+
+ if (GreaterHeal_Timer <= diff)
+ {
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_GREATERHEAL);
+ GreaterHeal_Timer = urand(25000, 35000);
+ }GreaterHeal_Timer -=diff;
+
+ if (SpawnFlyingBats_Timer <= diff)
+ {
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ if (!target)
+ return;
+
+ Creature* FlyingBat = me->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (FlyingBat)
+ FlyingBat->AI()->AttackStart(target);
+
+ SpawnFlyingBats_Timer = urand(10000, 15000);
+ } else SpawnFlyingBats_Timer -=diff;
+ }
+ else
+ {
+ me->SetDisplayId(15219);
+ DoResetThreat();
+ PhaseTwo = true;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_jeklikAI(creature);
+ }
+};
+
+//Flying Bat
+class mob_batrider : public CreatureScript
+{
+ public:
+
+ mob_batrider()
+ : CreatureScript("mob_batrider")
+ {
+ }
+
+ struct mob_batriderAI : public ScriptedAI
+ {
+ mob_batriderAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ InstanceScript* instance;
+
+ uint32 Bomb_Timer;
+ uint32 Check_Timer;
+
+ void Reset()
+ {
+ Bomb_Timer = 2000;
+ Check_Timer = 1000;
+
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ void EnterCombat(Unit* /*who*/) {}
+
+ void UpdateAI (const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //Bomb_Timer
+ if (Bomb_Timer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ DoCast(target, SPELL_BOMB);
+ Bomb_Timer = 5000;
+ }
+ } else Bomb_Timer -= diff;
+
+ //Check_Timer
+ if (Check_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_JEKLIK) == DONE)
+ {
+ me->setDeathState(JUST_DIED);
+ me->RemoveCorpse();
+ return;
+ }
+ }
+
+ Check_Timer = 1000;
+ } else Check_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_batriderAI(creature);
+ }
+};
+
+void AddSC_boss_jeklik()
+{
+ new boss_jeklik();
+ new mob_batrider();
+}
+
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
new file mode 100644
index 00000000000..844a2b16800
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -0,0 +1,286 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Jin'do the Hexxer
+SD%Complete: 85
+SDComment: Mind Control not working because of core bug. Shades visible for all.
+SDCategory: Zul'Gurub
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "zulgurub.h"
+
+enum Jindo
+{
+ SAY_AGGRO = 1,
+
+ SPELL_BRAINWASHTOTEM = 24262,
+ SPELL_POWERFULLHEALINGWARD = 24309, //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
+ SPELL_HEX = 24053,
+ SPELL_DELUSIONSOFJINDO = 24306,
+ SPELL_SHADEOFJINDO = 24308, //We will not use this spell. We will summon a shade by script.
+
+ //Healing Ward Spell
+ SPELL_HEAL = 38588, //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
+
+ //Shade of Jindo Spell
+ SPELL_SHADOWSHOCK = 19460,
+ SPELL_INVISIBLE = 24699
+};
+
+class boss_jindo : public CreatureScript
+{
+ public:
+
+ boss_jindo()
+ : CreatureScript("boss_jindo")
+ {
+ }
+
+ struct boss_jindoAI : public ScriptedAI
+ {
+ boss_jindoAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 BrainWashTotem_Timer;
+ uint32 HealingWard_Timer;
+ uint32 Hex_Timer;
+ uint32 Delusions_Timer;
+ uint32 Teleport_Timer;
+
+ void Reset()
+ {
+ BrainWashTotem_Timer = 20000;
+ HealingWard_Timer = 16000;
+ Hex_Timer = 8000;
+ Delusions_Timer = 10000;
+ Teleport_Timer = 5000;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //BrainWashTotem_Timer
+ if (BrainWashTotem_Timer <= diff)
+ {
+ DoCast(me, SPELL_BRAINWASHTOTEM);
+ BrainWashTotem_Timer = urand(18000, 26000);
+ } else BrainWashTotem_Timer -= diff;
+
+ //HealingWard_Timer
+ if (HealingWard_Timer <= diff)
+ {
+ //DoCast(me, SPELL_POWERFULLHEALINGWARD);
+ me->SummonCreature(14987, me->GetPositionX()+3, me->GetPositionY()-2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
+ HealingWard_Timer = urand(14000, 20000);
+ } else HealingWard_Timer -= diff;
+
+ //Hex_Timer
+ if (Hex_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_HEX);
+
+ if (DoGetThreat(me->getVictim()))
+ DoModifyThreatPercent(me->getVictim(), -80);
+
+ Hex_Timer = urand(12000, 20000);
+ } else Hex_Timer -= diff;
+
+ //Casting the delusion curse with a shade. So shade will attack the same target with the curse.
+ if (Delusions_Timer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ DoCast(target, SPELL_DELUSIONSOFJINDO);
+
+ Creature* Shade = me->SummonCreature(14986, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Shade)
+ Shade->AI()->AttackStart(target);
+ }
+
+ Delusions_Timer = urand(4000, 12000);
+ } else Delusions_Timer -= diff;
+
+ //Teleporting a random gamer and spawning 9 skeletons that will attack this gamer
+ if (Teleport_Timer <= diff)
+ {
+ Unit* target = NULL;
+ target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ if (target && target->GetTypeId() == TYPEID_PLAYER)
+ {
+ DoTeleportPlayer(target, -11583.7783f, -1249.4278f, 77.5471f, 4.745f);
+
+ if (DoGetThreat(me->getVictim()))
+ DoModifyThreatPercent(target, -100);
+
+ Creature* Skeletons;
+ Skeletons = me->SummonCreature(14826, target->GetPositionX()+2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX()-2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX()+4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX()-4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ Skeletons = me->SummonCreature(14826, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Skeletons)
+ Skeletons->AI()->AttackStart(target);
+ }
+
+ Teleport_Timer = urand(15000, 23000);
+ } else Teleport_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_jindoAI(creature);
+ }
+};
+
+//Healing Ward
+class mob_healing_ward : public CreatureScript
+{
+ public:
+
+ mob_healing_ward()
+ : CreatureScript("mob_healing_ward")
+ {
+ }
+
+ struct mob_healing_wardAI : public ScriptedAI
+ {
+ mob_healing_wardAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ uint32 Heal_Timer;
+
+ InstanceScript* instance;
+
+ void Reset()
+ {
+ Heal_Timer = 2000;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ }
+
+ void UpdateAI (const uint32 diff)
+ {
+ //Heal_Timer
+ if (Heal_Timer <= diff)
+ {
+ if (instance)
+ {
+ Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO));
+ if (pJindo)
+ DoCast(pJindo, SPELL_HEAL);
+ }
+ Heal_Timer = 3000;
+ } else Heal_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_healing_wardAI(creature);
+ }
+};
+
+//Shade of Jindo
+class mob_shade_of_jindo : public CreatureScript
+{
+ public:
+
+ mob_shade_of_jindo()
+ : CreatureScript("mob_shade_of_jindo")
+ {
+ }
+
+ struct mob_shade_of_jindoAI : public ScriptedAI
+ {
+ mob_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 ShadowShock_Timer;
+
+ void Reset()
+ {
+ ShadowShock_Timer = 1000;
+ DoCast(me, SPELL_INVISIBLE, true);
+ }
+
+ void EnterCombat(Unit* /*who*/){}
+
+ void UpdateAI (const uint32 diff)
+ {
+
+ //ShadowShock_Timer
+ if (ShadowShock_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SHADOWSHOCK);
+ ShadowShock_Timer = 2000;
+ } else ShadowShock_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_shade_of_jindoAI(creature);
+ }
+};
+
+void AddSC_boss_jindo()
+{
+ new boss_jindo();
+ new mob_healing_ward();
+ new mob_shade_of_jindo();
+}
+
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
new file mode 100644
index 00000000000..17b268b92ef
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -0,0 +1,278 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Marli
+SD%Complete: 80
+SDComment: Charging healers and casters not working. Perhaps wrong Spell Timers.
+SDCategory: Zul'Gurub
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "zulgurub.h"
+
+enum Marli
+{
+ SAY_AGGRO = 0,
+ SAY_TRANSFORM = 1,
+ SAY_SPIDER_SPAWN = 2,
+ SAY_DEATH = 3,
+
+ SPELL_CHARGE = 22911,
+ SPELL_ASPECT_OF_MARLI = 24686, // A stun spell
+ SPELL_ENVOLWINGWEB = 24110,
+ SPELL_POISONVOLLEY = 24099,
+ SPELL_SPIDER_FORM = 24084,
+
+//The Spider Spells
+ SPELL_LEVELUP = 24312 //Not right Spell.
+};
+
+class boss_marli : public CreatureScript
+{
+ public:
+
+ boss_marli()
+ : CreatureScript("boss_marli")
+ {
+ }
+
+ struct boss_marliAI : public ScriptedAI
+ {
+ boss_marliAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ InstanceScript* instance;
+
+ uint32 SpawnStartSpiders_Timer;
+ uint32 PoisonVolley_Timer;
+ uint32 SpawnSpider_Timer;
+ uint32 Charge_Timer;
+ uint32 Aspect_Timer;
+ uint32 Transform_Timer;
+ uint32 TransformBack_Timer;
+
+ bool Spawned;
+ bool PhaseTwo;
+
+ void Reset()
+ {
+ SpawnStartSpiders_Timer = 1000;
+ PoisonVolley_Timer = 15000;
+ SpawnSpider_Timer = 30000;
+ Charge_Timer = 1500;
+ Aspect_Timer = 12000;
+ Transform_Timer = 45000;
+ TransformBack_Timer = 25000;
+
+ Spawned = false;
+ PhaseTwo = false;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Talk(SAY_DEATH);
+ if (instance)
+ instance->SetData(DATA_MARLI, DONE);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (me->getVictim() && me->isAlive())
+ {
+ if (PoisonVolley_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_POISONVOLLEY);
+ PoisonVolley_Timer = urand(10000, 20000);
+ } else PoisonVolley_Timer -= diff;
+
+ if (!PhaseTwo && Aspect_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
+ Aspect_Timer = urand(13000, 18000);
+ } else Aspect_Timer -= diff;
+
+ if (!Spawned && SpawnStartSpiders_Timer <= diff)
+ {
+ Talk(SAY_SPIDER_SPAWN);
+
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ if (!target)
+ return;
+
+ Creature* Spider = NULL;
+
+ Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Spider)
+ Spider->AI()->AttackStart(target);
+ Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Spider)
+ Spider->AI()->AttackStart(target);
+ Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Spider)
+ Spider->AI()->AttackStart(target);
+ Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Spider)
+ Spider->AI()->AttackStart(target);
+
+ Spawned = true;
+ } else SpawnStartSpiders_Timer -= diff;
+
+ if (SpawnSpider_Timer <= diff)
+ {
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ if (!target)
+ return;
+
+ Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
+ if (Spider)
+ Spider->AI()->AttackStart(target);
+ SpawnSpider_Timer = urand(12000, 17000);
+ } else SpawnSpider_Timer -= diff;
+
+ if (!PhaseTwo && Transform_Timer <= diff)
+ {
+ Talk(SAY_TRANSFORM);
+ DoCast(me, SPELL_SPIDER_FORM);
+ const CreatureTemplate* cinfo = me->GetCreatureTemplate();
+ me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
+ me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
+ me->UpdateDamagePhysical(BASE_ATTACK);
+ DoCast(me->getVictim(), SPELL_ENVOLWINGWEB);
+
+ if (DoGetThreat(me->getVictim()))
+ DoModifyThreatPercent(me->getVictim(), -100);
+
+ PhaseTwo = true;
+ Transform_Timer = urand(35000, 60000);
+ } else Transform_Timer -= diff;
+
+ if (PhaseTwo)
+ {
+ if (Charge_Timer <= diff)
+ {
+ Unit* target = NULL;
+ int i = 0;
+ while (i < 3) // max 3 tries to get a random target with power_mana
+ {
+ ++i;
+ target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader
+ if (target && target->getPowerType() == POWER_MANA)
+ i = 3;
+ }
+ if (target)
+ {
+ DoCast(target, SPELL_CHARGE);
+ //me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
+ //me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1);
+ AttackStart(target);
+ }
+
+ Charge_Timer = 8000;
+ } else Charge_Timer -= diff;
+
+ if (TransformBack_Timer <= diff)
+ {
+ me->SetDisplayId(15220);
+ const CreatureTemplate* cinfo = me->GetCreatureTemplate();
+ me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1)));
+ me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1)));
+ me->UpdateDamagePhysical(BASE_ATTACK);
+
+ PhaseTwo = false;
+ TransformBack_Timer = urand(25000, 40000);
+ } else TransformBack_Timer -= diff;
+
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_marliAI(creature);
+ }
+};
+
+//Spawn of Marli
+class mob_spawn_of_marli : public CreatureScript
+{
+ public:
+
+ mob_spawn_of_marli()
+ : CreatureScript("mob_spawn_of_marli")
+ {
+ }
+
+ struct mob_spawn_of_marliAI : public ScriptedAI
+ {
+ mob_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 LevelUp_Timer;
+
+ void Reset()
+ {
+ LevelUp_Timer = 3000;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ }
+
+ void UpdateAI (const uint32 diff)
+ {
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
+
+ //LevelUp_Timer
+ if (LevelUp_Timer <= diff)
+ {
+ DoCast(me, SPELL_LEVELUP);
+ LevelUp_Timer = 3000;
+ } else LevelUp_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_spawn_of_marliAI(creature);
+ }
+};
+
+void AddSC_boss_marli()
+{
+ new boss_marli();
+ new mob_spawn_of_marli();
+}
+
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
new file mode 100644
index 00000000000..3ea5d932ab0
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -0,0 +1,588 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Thekal
+SD%Complete: 95
+SDComment: Almost finished.
+SDCategory: Zul'Gurub
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "zulgurub.h"
+
+enum Thekal
+{
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+
+ SPELL_MORTALCLEAVE = 22859,
+ SPELL_SILENCE = 22666,
+ SPELL_FRENZY = 8269,
+ SPELL_FORCEPUNCH = 24189,
+ SPELL_CHARGE = 24193,
+ SPELL_ENRAGE = 8269,
+ SPELL_SUMMONTIGERS = 24183,
+ SPELL_TIGER_FORM = 24169,
+ SPELL_RESURRECT = 24173, //We will not use this spell.
+
+//Zealot Lor'Khan Spells
+ SPELL_SHIELD = 20545,
+ SPELL_BLOODLUST = 24185,
+ SPELL_GREATERHEAL = 24208,
+ SPELL_DISARM = 6713,
+
+//Zealot Zath Spells
+ SPELL_SWEEPINGSTRIKES = 18765,
+ SPELL_SINISTERSTRIKE = 15581,
+ SPELL_GOUGE = 12540,
+ SPELL_KICK = 15614,
+ SPELL_BLIND = 21060
+};
+
+class boss_thekal : public CreatureScript
+{
+ public:
+
+ boss_thekal()
+ : CreatureScript("boss_thekal")
+ {
+ }
+
+ struct boss_thekalAI : public ScriptedAI
+ {
+ boss_thekalAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ uint32 MortalCleave_Timer;
+ uint32 Silence_Timer;
+ uint32 Frenzy_Timer;
+ uint32 ForcePunch_Timer;
+ uint32 Charge_Timer;
+ uint32 Enrage_Timer;
+ uint32 SummonTigers_Timer;
+ uint32 Check_Timer;
+ uint32 Resurrect_Timer;
+
+ InstanceScript* instance;
+ bool Enraged;
+ bool PhaseTwo;
+ bool WasDead;
+
+ void Reset()
+ {
+ MortalCleave_Timer = 4000;
+ Silence_Timer = 9000;
+ Frenzy_Timer = 30000;
+ ForcePunch_Timer = 4000;
+ Charge_Timer = 12000;
+ Enrage_Timer = 32000;
+ SummonTigers_Timer = 25000;
+ Check_Timer = 10000;
+ Resurrect_Timer = 10000;
+
+ Enraged = false;
+ PhaseTwo = false;
+ WasDead = false;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ Talk(SAY_AGGRO);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Talk(SAY_DEATH);
+ if (instance)
+ instance->SetData(DATA_THEKAL, DONE);
+ }
+
+ void JustReachedHome()
+ {
+ if (instance)
+ instance->SetData(DATA_THEKAL, NOT_STARTED);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //Check_Timer for the death of LorKhan and Zath.
+ if (!WasDead && Check_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_LORKHAN) == SPECIAL)
+ {
+ //Resurrect LorKhan
+ if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
+ {
+ pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ pLorKhan->setFaction(14);
+ pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pLorKhan->SetFullHealth();
+
+ instance->SetData(DATA_LORKHAN, DONE);
+ }
+ }
+
+ if (instance->GetData(DATA_ZATH) == SPECIAL)
+ {
+ //Resurrect Zath
+ Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
+ if (pZath)
+ {
+ pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ pZath->setFaction(14);
+ pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pZath->SetFullHealth();
+
+ instance->SetData(DATA_ZATH, DONE);
+ }
+ }
+ }
+
+ Check_Timer = 5000;
+ } else Check_Timer -= diff;
+
+ if (!PhaseTwo && MortalCleave_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_MORTALCLEAVE);
+ MortalCleave_Timer = urand(15000, 20000);
+ } else MortalCleave_Timer -= diff;
+
+ if (!PhaseTwo && Silence_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SILENCE);
+ Silence_Timer = urand(20000, 25000);
+ } else Silence_Timer -= diff;
+
+ if (!PhaseTwo && !WasDead && !HealthAbovePct(5))
+ {
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetStandState(UNIT_STAND_STATE_SLEEP);
+ me->AttackStop();
+
+ if (instance)
+ instance->SetData(DATA_THEKAL, SPECIAL);
+
+ WasDead=true;
+ }
+
+ //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds.
+ if (!PhaseTwo && WasDead)
+ {
+ if (Resurrect_Timer <= diff)
+ {
+ DoCast(me, SPELL_TIGER_FORM);
+ me->SetObjectScale(2.00f);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFullHealth();
+ const CreatureTemplate* cinfo = me->GetCreatureTemplate();
+ me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40)));
+ me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40)));
+ me->UpdateDamagePhysical(BASE_ATTACK);
+ DoResetThreat();
+ PhaseTwo = true;
+ } else Resurrect_Timer -= diff;
+ }
+
+ if (me->IsFullHealth() && WasDead)
+ {
+ WasDead = false;
+ }
+
+ if (PhaseTwo)
+ {
+ if (Charge_Timer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ DoCast(target, SPELL_CHARGE);
+ DoResetThreat();
+ AttackStart(target);
+ }
+
+ Charge_Timer = urand(15000, 22000);
+ } else Charge_Timer -= diff;
+
+ if (Frenzy_Timer <= diff)
+ {
+ DoCast(me, SPELL_FRENZY);
+ Frenzy_Timer = 30000;
+ } else Frenzy_Timer -= diff;
+
+ if (ForcePunch_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SILENCE);
+ ForcePunch_Timer = urand(16000, 21000);
+ } else ForcePunch_Timer -= diff;
+
+ if (SummonTigers_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SUMMONTIGERS);
+ SummonTigers_Timer = urand(10000, 14000);
+ } else SummonTigers_Timer -= diff;
+
+ if (HealthBelowPct(11) && !Enraged)
+ {
+ DoCast(me, SPELL_ENRAGE);
+ Enraged = true;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_thekalAI(creature);
+ }
+};
+
+//Zealot Lor'Khan
+class mob_zealot_lorkhan : public CreatureScript
+{
+ public:
+
+ mob_zealot_lorkhan()
+ : CreatureScript("mob_zealot_lorkhan")
+ {
+ }
+
+ struct mob_zealot_lorkhanAI : public ScriptedAI
+ {
+ mob_zealot_lorkhanAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ uint32 Shield_Timer;
+ uint32 BloodLust_Timer;
+ uint32 GreaterHeal_Timer;
+ uint32 Disarm_Timer;
+ uint32 Check_Timer;
+
+ bool FakeDeath;
+
+ InstanceScript* instance;
+
+ void Reset()
+ {
+ Shield_Timer = 1000;
+ BloodLust_Timer = 16000;
+ GreaterHeal_Timer = 32000;
+ Disarm_Timer = 6000;
+ Check_Timer = 10000;
+
+ FakeDeath = false;
+
+ if (instance)
+ instance->SetData(DATA_LORKHAN, NOT_STARTED);
+
+ me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ }
+
+ void UpdateAI (const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //Shield_Timer
+ if (Shield_Timer <= diff)
+ {
+ DoCast(me, SPELL_SHIELD);
+ Shield_Timer = 61000;
+ } else Shield_Timer -= diff;
+
+ //BloodLust_Timer
+ if (BloodLust_Timer <= diff)
+ {
+ DoCast(me, SPELL_BLOODLUST);
+ BloodLust_Timer = 20000+rand()%8000;
+ } else BloodLust_Timer -= diff;
+
+ //Casting Greaterheal to Thekal or Zath if they are in meele range.
+ if (GreaterHeal_Timer <= diff)
+ {
+ if (instance)
+ {
+ Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL));
+ Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
+
+ if (!pThekal || !pZath)
+ return;
+
+ switch (urand(0, 1))
+ {
+ case 0:
+ if (me->IsWithinMeleeRange(pThekal))
+ DoCast(pThekal, SPELL_GREATERHEAL);
+ break;
+ case 1:
+ if (me->IsWithinMeleeRange(pZath))
+ DoCast(pZath, SPELL_GREATERHEAL);
+ break;
+ }
+ }
+
+ GreaterHeal_Timer = 15000+rand()%5000;
+ } else GreaterHeal_Timer -= diff;
+
+ //Disarm_Timer
+ if (Disarm_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_DISARM);
+ Disarm_Timer = 15000+rand()%10000;
+ } else Disarm_Timer -= diff;
+
+ //Check_Timer for the death of LorKhan and Zath.
+ if (!FakeDeath && Check_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_THEKAL) == SPECIAL)
+ {
+ //Resurrect Thekal
+ if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
+ {
+ pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pThekal->setFaction(14);
+ pThekal->SetFullHealth();
+ }
+ }
+
+ if (instance->GetData(DATA_ZATH) == SPECIAL)
+ {
+ //Resurrect Zath
+ if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
+ {
+ pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pZath->setFaction(14);
+ pZath->SetFullHealth();
+ }
+ }
+ }
+
+ Check_Timer = 5000;
+ } else Check_Timer -= diff;
+
+ if (!HealthAbovePct(5))
+ {
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetStandState(UNIT_STAND_STATE_SLEEP);
+ me->setFaction(35);
+ me->AttackStop();
+
+ if (instance)
+ instance->SetData(DATA_LORKHAN, SPECIAL);
+
+ FakeDeath = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_zealot_lorkhanAI(creature);
+ }
+};
+
+//Zealot Zath
+class mob_zealot_zath : public CreatureScript
+{
+ public:
+
+ mob_zealot_zath()
+ : CreatureScript("mob_zealot_zath")
+ {
+ }
+
+ struct mob_zealot_zathAI : public ScriptedAI
+ {
+ mob_zealot_zathAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ uint32 SweepingStrikes_Timer;
+ uint32 SinisterStrike_Timer;
+ uint32 Gouge_Timer;
+ uint32 Kick_Timer;
+ uint32 Blind_Timer;
+ uint32 Check_Timer;
+
+ bool FakeDeath;
+
+ InstanceScript* instance;
+
+ void Reset()
+ {
+ SweepingStrikes_Timer = 13000;
+ SinisterStrike_Timer = 8000;
+ Gouge_Timer = 25000;
+ Kick_Timer = 18000;
+ Blind_Timer = 5000;
+ Check_Timer = 10000;
+
+ FakeDeath = false;
+
+ if (instance)
+ instance->SetData(DATA_ZATH, NOT_STARTED);
+
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ }
+
+ void UpdateAI (const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //SweepingStrikes_Timer
+ if (SweepingStrikes_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SWEEPINGSTRIKES);
+ SweepingStrikes_Timer = 22000+rand()%4000;
+ } else SweepingStrikes_Timer -= diff;
+
+ //SinisterStrike_Timer
+ if (SinisterStrike_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_SINISTERSTRIKE);
+ SinisterStrike_Timer = 8000+rand()%8000;
+ } else SinisterStrike_Timer -= diff;
+
+ //Gouge_Timer
+ if (Gouge_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_GOUGE);
+
+ if (DoGetThreat(me->getVictim()))
+ DoModifyThreatPercent(me->getVictim(), -100);
+
+ Gouge_Timer = 17000+rand()%10000;
+ } else Gouge_Timer -= diff;
+
+ //Kick_Timer
+ if (Kick_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_KICK);
+ Kick_Timer = 15000+rand()%10000;
+ } else Kick_Timer -= diff;
+
+ //Blind_Timer
+ if (Blind_Timer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_BLIND);
+ Blind_Timer = 10000+rand()%10000;
+ } else Blind_Timer -= diff;
+
+ //Check_Timer for the death of LorKhan and Zath.
+ if (!FakeDeath && Check_Timer <= diff)
+ {
+ if (instance)
+ {
+ if (instance->GetData(DATA_LORKHAN) == SPECIAL)
+ {
+ //Resurrect LorKhan
+ if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
+ {
+ pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pLorKhan->setFaction(14);
+ pLorKhan->SetFullHealth();
+ }
+ }
+
+ if (instance->GetData(DATA_THEKAL) == SPECIAL)
+ {
+ //Resurrect Thekal
+ if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
+ {
+ pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
+ pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pThekal->setFaction(14);
+ pThekal->SetFullHealth();
+ }
+ }
+ }
+
+ Check_Timer = 5000;
+ } else Check_Timer -= diff;
+
+ if (!HealthAbovePct(5))
+ {
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
+ me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetStandState(UNIT_STAND_STATE_SLEEP);
+ me->setFaction(35);
+ me->AttackStop();
+
+ if (instance)
+ instance->SetData(DATA_ZATH, SPECIAL);
+
+ FakeDeath = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_zealot_zathAI(creature);
+ }
+};
+
+void AddSC_boss_thekal()
+{
+ new boss_thekal();
+ new mob_zealot_lorkhan();
+ new mob_zealot_zath();
+}
+
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index f62273e583d..c5f9522b23d 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -517,9 +517,12 @@ public:
## npc_infused_crystal
######*/
-#define MOB_ENRAGED_WRAITH 17086
-#define EMOTE -1000283
-#define QUEST_POWERING_OUR_DEFENSES 8490
+enum InfusedCrystal
+{
+ MOB_ENRAGED_WRAITH = 17086,
+ EMOTE = 0,
+ QUEST_POWERING_OUR_DEFENSES = 8490
+};
struct Location
{
@@ -597,7 +600,7 @@ public:
{
if (EndTimer < diff && Progress)
{
- DoScriptText(EMOTE, me);
+ Talk(EMOTE);
Completed = true;
if (PlayerGUID)
if (Player* player = Unit::GetPlayer(*me, PlayerGUID))
diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
index c3a725f2f45..5625b6994d7 100644
--- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
@@ -37,11 +37,13 @@ EndContentData */
/*######
## npc_converted_sentry
######*/
+enum ConvertedSentry
+{
+ SAY_CONVERTED = 0,
-#define SAY_CONVERTED_1 -1000188
-#define SAY_CONVERTED_2 -1000189
+ SPELL_CONVERT_CREDIT = 45009
+};
-#define SPELL_CONVERT_CREDIT 45009
class npc_converted_sentry : public CreatureScript
{
@@ -75,11 +77,7 @@ public:
{
if (Timer <= diff)
{
- uint32 i = urand(1, 2);
- if (i == 1)
- DoScriptText(SAY_CONVERTED_1, me);
- else
- DoScriptText(SAY_CONVERTED_2, me);
+ Talk(SAY_CONVERTED);
DoCast(me, SPELL_CONVERT_CREDIT);
if (me->isPet())
diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
index 3a6fac58945..8c202962c70 100644
--- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
@@ -38,20 +38,19 @@ EndContentData */
enum eErland
{
- SAY_QUESTACCEPT = -1000306,
- SAY_START = -1000307,
- SAY_AGGRO_1 = -1000308,
- SAY_AGGRO_2 = -1000309,
- SAY_LAST = -1000310,
+ SAY_QUESTACCEPT = 0,
+ SAY_START = 1,
+ SAY_AGGRO = 2,
+ SAY_PROGRESS = 3,
+ SAY_LAST = 4,
- SAY_THANKS = -1000311,
- SAY_RANE = -1000312,
- SAY_ANSWER = -1000313,
- SAY_MOVE_QUINN = -1000314,
+ SAY_RANE = 0,
+ SAY_RANE_ANSWER = 5,
+ SAY_MOVE_QUINN = 6,
- SAY_GREETINGS = -1000315,
- SAY_QUINN = -1000316,
- SAY_ON_BYE = -1000317,
+ SAY_QUINN = 7,
+ SAY_QUINN_ANSWER = 0,
+ SAY_BYE = 8,
QUEST_ESCORTING = 435,
NPC_RANE = 1950,
@@ -76,34 +75,34 @@ public:
switch (waypointId)
{
case 1:
- DoScriptText(SAY_START, me, player);
+ Talk(SAY_START, player->GetGUID());
+ break;
+ case 10:
+ Talk(SAY_PROGRESS);
break;
case 13:
- DoScriptText(SAY_LAST, me, player);
+ Talk(SAY_LAST, player->GetGUID());
player->GroupEventHappens(QUEST_ESCORTING, me);
break;
- case 14:
- DoScriptText(SAY_THANKS, me, player);
- break;
case 15:
- if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20))
- DoScriptText(SAY_RANE, Rane);
+ if (Creature* rane = me->FindNearestCreature(NPC_RANE, 20.0f))
+ rane->AI()->Talk(SAY_RANE);
break;
case 16:
- DoScriptText(SAY_ANSWER, me);
+ Talk(SAY_RANE_ANSWER);
break;
case 17:
- DoScriptText(SAY_MOVE_QUINN, me);
+ Talk(SAY_MOVE_QUINN);
break;
case 24:
- DoScriptText(SAY_GREETINGS, me);
+ Talk(SAY_QUINN);
break;
case 25:
- if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20))
- DoScriptText(SAY_QUINN, Quinn);
+ if (Creature* quinn = me->FindNearestCreature(NPC_QUINN, 20.0f))
+ quinn->AI()->Talk(SAY_QUINN_ANSWER);
break;
case 26:
- DoScriptText(SAY_ON_BYE, me, NULL);
+ Talk(SAY_BYE);
break;
}
}
@@ -112,7 +111,7 @@ public:
void EnterCombat(Unit* who)
{
- DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
};
@@ -120,7 +119,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCORTING)
{
- DoScriptText(SAY_QUESTACCEPT, creature, player);
+ creature->AI()->Talk(SAY_QUESTACCEPT, player->GetGUID());
if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
index 6a8845ee8b4..949ea963c02 100644
--- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
@@ -16,21 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Tirisfal_Glades
-SD%Complete: 0
-SDComment:
-SDCategory: Tirisfal Glades
-EndScriptData */
-
-/* ContentData
-EndContentData */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "Player.h"
-
-
void AddSC_tirisfal_glades()
{
}
diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
index 1c2f2624b34..79b49b6a438 100644
--- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
@@ -281,13 +281,13 @@ enum eTruuen
QUEST_TOMB_LIGHTBRINGER = 9446,
- SAY_WP_0 = -1800064, //Beware! We are attacked!
- SAY_WP_1 = -1800065, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!
- SAY_WP_2 = -1800066, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now...
- SAY_WP_3 = -1800067, //Be welcome, friends!
- SAY_WP_4 = -1800068, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart.
- SAY_WP_5 = -1800069, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.
- SAY_WP_6 = -1800070 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.
+ SAY_WP_0 = 0, //Beware! We are attacked!
+ SAY_WP_1 = 1, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!
+ SAY_WP_2 = 2, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now...
+ SAY_WP_3 = 0, //Be welcome, friends!
+ SAY_WP_4 = 0, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart.
+ SAY_WP_5 = 1, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire.
+ SAY_WP_6 = 2 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here.
};
class npc_anchorite_truuen : public CreatureScript
@@ -339,12 +339,12 @@ public:
switch (waypointId)
{
case 8:
- DoScriptText(SAY_WP_0, me);
+ Talk(SAY_WP_0);
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+5.0f, me->GetPositionY()+5.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
break;
case 9:
- DoScriptText(SAY_WP_1, me);
+ Talk(SAY_WP_1);
break;
case 14:
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
@@ -353,25 +353,31 @@ public:
me->SummonCreature(NPC_GHOUL, me->GetPositionX()+8.0f, me->GetPositionY()+8.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000);
break;
case 15:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
case 21:
Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150);
- DoScriptText(SAY_WP_3, Theldanis);
+ if (Theldanis)
+ Theldanis->AI()->Talk(SAY_WP_3);
break;
case 22:
break;
case 23:
Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86f, -1825.42f, 81.99f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
- Ughost->SetDisableGravity(true);
- DoScriptText(SAY_WP_4, Ughost, me);
+ if (Ughost)
+ {
+ Ughost->SetDisableGravity(true);
+ Ughost->AI()->Talk(SAY_WP_4, me->GetGUID());
+ }
m_uiChatTimer = 4000;
break;
case 24:
- DoScriptText(SAY_WP_5, Ughost, me);
+ if (Ughost)
+ Ughost->AI()->Talk(SAY_WP_5, me->GetGUID());
m_uiChatTimer = 4000;
break;
case 25:
- DoScriptText(SAY_WP_6, Ughost, me);
+ if (Ughost)
+ Ughost->AI()->Talk(SAY_WP_6, me->GetGUID());
m_uiChatTimer = 4000;
break;
case 26:
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 1ef15c0ca61..0baa9814970 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -45,17 +45,18 @@ enum Yells
//List of text id's. The text is stored in database, also in a localized version
//(if translation not exist for the textId, default english text will be used)
//Not required to define in this way, but simplify if changes are needed.
- SAY_AGGRO = -1999900,
- SAY_RANDOM_0 = -1999901,
- SAY_RANDOM_1 = -1999902,
- SAY_RANDOM_2 = -1999903,
- SAY_RANDOM_3 = -1999904,
- SAY_RANDOM_4 = -1999905,
- SAY_BERSERK = -1999906,
- SAY_PHASE = -1999907,
- SAY_DANCE = -1999908,
- SAY_SALUTE = -1999909,
- SAY_EVADE = -1999910,
+ //These texts must be added to the creature texts of the npc for which the script is assigned.
+ SAY_AGGRO = 0, // "Let the games begin."
+ SAY_RANDOM = 1, // "I see endless suffering. I see torment. I see rage. I see everything.",
+ // "Muahahahaha",
+ // "These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.",
+ // "You are already dead.",
+ // "Where to go? What to do? So many choices that all end in pain, end in death."
+ SAY_BERSERK = 2, // "$N, I sentance you to death!"
+ SAY_PHASE = 3, // "The suffering has just begun!"
+ SAY_DANCE = 4, // "I always thought I was a good dancer."
+ SAY_SALUTE = 5, // "Move out Soldier!"
+ SAY_EVADE = 6 // "Help $N! I'm under attack!"
};
enum Spells
@@ -127,7 +128,7 @@ class example_creature : public CreatureScript
void EnterCombat(Unit* who)
{
//Say some stuff
- DoScriptText(SAY_AGGRO, me, who);
+ Talk(SAY_AGGRO, who->GetGUID());
}
// *** HANDLED FUNCTION ***
@@ -142,7 +143,7 @@ class example_creature : public CreatureScript
// Called when going out of combat. Reset is called just after.
void EnterEvadeMode()
{
- DoScriptText(SAY_EVADE, me);
+ Talk(SAY_EVADE);
}
// *** HANDLED FUNCTION ***
@@ -154,10 +155,10 @@ class example_creature : public CreatureScript
switch (uiTextEmote)
{
case TEXT_EMOTE_DANCE:
- DoScriptText(SAY_DANCE, me);
+ Talk(SAY_DANCE);
break;
case TEXT_EMOTE_SALUTE:
- DoScriptText(SAY_SALUTE, me);
+ Talk(SAY_SALUTE);
break;
}
}
@@ -173,7 +174,7 @@ class example_creature : public CreatureScript
if (m_uiSayTimer <= uiDiff)
{
//Random switch between 5 outcomes
- DoScriptText(RAND(SAY_RANDOM_0, SAY_RANDOM_1, SAY_RANDOM_2, SAY_RANDOM_3, SAY_RANDOM_4), me);
+ Talk(SAY_RANDOM);
m_uiSayTimer = 45000; //Say something agian in 45 seconds
}
@@ -235,7 +236,7 @@ class example_creature : public CreatureScript
if (m_uiBeserkTimer <= uiDiff)
{
//Say our line then cast uber death spell
- DoScriptText(SAY_BERSERK, me, me->getVictim());
+ Talk(SAY_BERSERK, me->getVictim() ? me->getVictim()->GetGUID() : 0);
DoCast(me->getVictim(), SPELL_BERSERK);
//Cast our beserk spell agian in 12 seconds if we didn't kill everyone
@@ -250,7 +251,7 @@ class example_creature : public CreatureScript
{
//Go to next phase
++m_uiPhase;
- DoScriptText(SAY_PHASE, me);
+ Talk(SAY_PHASE);
DoCast(me, SPELL_FRENZY);
}
else
diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp
index 8cf0dad25d2..cd680b31577 100644
--- a/src/server/scripts/Examples/example_escort.cpp
+++ b/src/server/scripts/Examples/example_escort.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
+#include "CreatureTextMgr.h"
enum eEnums
{
@@ -37,18 +38,18 @@ enum eEnums
SPELL_ELIXIR_OF_FORTITUDE = 3593,
SPELL_BLUE_FIREWORK = 11540,
- SAY_AGGRO1 = -1999910,
- SAY_AGGRO2 = -1999911,
- SAY_WP_1 = -1999912,
- SAY_WP_2 = -1999913,
- SAY_WP_3 = -1999914,
- SAY_WP_4 = -1999915,
- SAY_DEATH_1 = -1999916,
- SAY_DEATH_2 = -1999917,
- SAY_DEATH_3 = -1999918,
- SAY_SPELL = -1999919,
- SAY_RAND_1 = -1999920,
- SAY_RAND_2 = -1999921
+ SAY_AGGRO1 = 0,
+ SAY_AGGRO2 = 1,
+ SAY_WP_1 = 2,
+ SAY_WP_2 = 3,
+ SAY_WP_3 = 4,
+ SAY_WP_4 = 5,
+ SAY_DEATH_1 = 6,
+ SAY_DEATH_2 = 7,
+ SAY_DEATH_3 = 8,
+ SAY_SPELL = 9,
+ SAY_RAND_1 = 10,
+ SAY_RAND_2 = 11
};
#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)"
@@ -83,19 +84,19 @@ class example_escort : public CreatureScript
switch (waypointId)
{
case 1:
- DoScriptText(SAY_WP_1, me);
+ Talk(SAY_WP_1);
break;
case 3:
- DoScriptText(SAY_WP_2, me);
+ Talk(SAY_WP_2);
me->SummonCreature(NPC_FELBOAR, me->GetPositionX()+5.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
break;
case 4:
if (Player* player = GetPlayerForEscort())
{
//pTmpPlayer is the target of the text
- DoScriptText(SAY_WP_3, me, player);
+ Talk(SAY_WP_3, player->GetGUID());
//pTmpPlayer is the source of the text
- DoScriptText(SAY_WP_4, player);
+ sCreatureTextMgr->SendChat(me, SAY_WP_4, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player);
}
break;
}
@@ -106,10 +107,10 @@ class example_escort : public CreatureScript
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* player = GetPlayerForEscort())
- DoScriptText(SAY_AGGRO1, me, player);
+ Talk(SAY_AGGRO1, player->GetGUID());
}
else
- DoScriptText(SAY_AGGRO2, me);
+ Talk(SAY_AGGRO2);
}
void Reset()
@@ -126,13 +127,13 @@ class example_escort : public CreatureScript
{
// not a likely case, code here for the sake of example
if (killer == me)
- DoScriptText(SAY_DEATH_1, me, player);
+ Talk(SAY_DEATH_1, player->GetGUID());
else
- DoScriptText(SAY_DEATH_2, me, player);
+ Talk(SAY_DEATH_2, player->GetGUID());
}
}
else
- DoScriptText(SAY_DEATH_3, me);
+ Talk(SAY_DEATH_3);
}
void UpdateAI(const uint32 uiDiff)
@@ -145,7 +146,7 @@ class example_escort : public CreatureScript
{
if (m_uiDeathCoilTimer <= uiDiff)
{
- DoScriptText(SAY_SPELL, me);
+ Talk(SAY_SPELL);
DoCast(me->getVictim(), SPELL_DEATH_COIL, false);
m_uiDeathCoilTimer = 4000;
}
@@ -161,12 +162,12 @@ class example_escort : public CreatureScript
{
if (me->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0))
{
- DoScriptText(SAY_RAND_1, me);
+ Talk(SAY_RAND_1);
DoCast(me, SPELL_BLUE_FIREWORK, false);
}
else
{
- DoScriptText(SAY_RAND_2, me);
+ Talk(SAY_RAND_2);
DoCast(me, SPELL_ELIXIR_OF_FORTITUDE, false);
}
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index 352c43fc1de..b6be4ce3ce1 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -34,9 +34,10 @@ enum eEnums
SPELL_POLYMORPH = 12826,
SPELL_MARK_OF_THE_WILD = 26990,
- SAY_NOT_INTERESTED = -1999922,
- SAY_WRONG = -1999923,
- SAY_CORRECT = -1999924
+ //These texts must be added to the creature texts of the npc for which the script is assigned.
+ SAY_NOT_INTERESTED = 0, // "Normal select, guess you're not interested."
+ SAY_WRONG = 1, // "Wrong!"
+ SAY_CORRECT = 2 // "You're right, you are allowed to see my inner secrets."
};
#define GOSSIP_ITEM_1 "A quiz: what's your name?"
@@ -66,7 +67,8 @@ class example_gossip_codebox : public CreatureScript
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+2)
{
- DoScriptText(SAY_NOT_INTERESTED, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_NOT_INTERESTED);
player->CLOSE_GOSSIP_MENU();
}
@@ -83,12 +85,14 @@ class example_gossip_codebox : public CreatureScript
case GOSSIP_ACTION_INFO_DEF+1:
if (player->GetName() != code)
{
- DoScriptText(SAY_WRONG, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_WRONG);
creature->CastSpell(player, SPELL_POLYMORPH, true);
}
else
{
- DoScriptText(SAY_CORRECT, creature);
+ //Read comment in enum
+ creature->AI()->Talk(SAY_CORRECT);
creature->CastSpell(player, SPELL_MARK_OF_THE_WILD, true);
}
player->CLOSE_GOSSIP_MENU();
diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp
index 5ff66c4a7ed..68986b44496 100644
--- a/src/server/scripts/Examples/example_misc.cpp
+++ b/src/server/scripts/Examples/example_misc.cpp
@@ -26,11 +26,6 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Player.h"
-enum eSay
-{
- SAY_HI = -1999925
-};
-
class AT_example_areatrigger : public AreaTriggerScript
{
public:
@@ -42,7 +37,7 @@ class AT_example_areatrigger : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
- DoScriptText(SAY_HI, player);
+ player->Kill(player);
return true;
}
};
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
new file mode 100644
index 00000000000..7bc2e96e0dc
--- /dev/null
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ *
+ * 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/>.
+ */
+
+/* ScriptData
+SDName: Boss_Azuregos
+SD%Complete: 90
+SDComment: Teleport not included, spell reflect not effecting dots (Core problem)
+SDCategory: Azshara
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+
+enum Say
+{
+ SAY_TELEPORT = 0
+};
+
+enum Spells
+{
+ SPELL_MARKOFFROST = 23182,
+ SPELL_MANASTORM = 21097,
+ SPELL_CHILL = 21098,
+ SPELL_FROSTBREATH = 21099,
+ SPELL_REFLECT = 22067,
+ SPELL_CLEAVE = 8255, //Perhaps not right ID
+ SPELL_ENRAGE = 23537
+};
+
+class boss_azuregos : public CreatureScript
+{
+public:
+ boss_azuregos() : CreatureScript("boss_azuregos") { }
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_azuregosAI (creature);
+ }
+
+ struct boss_azuregosAI : public ScriptedAI
+ {
+ boss_azuregosAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 MarkOfFrostTimer;
+ uint32 ManaStormTimer;
+ uint32 ChillTimer;
+ uint32 BreathTimer;
+ uint32 TeleportTimer;
+ uint32 ReflectTimer;
+ uint32 CleaveTimer;
+ uint32 EnrageTimer;
+ bool Enraged;
+
+ void Reset()
+ {
+ MarkOfFrostTimer = 35000;
+ ManaStormTimer = urand(5000, 17000);
+ ChillTimer = urand(10000, 30000);
+ BreathTimer = urand(2000, 8000);
+ TeleportTimer = 30000;
+ ReflectTimer = urand(15000, 30000);
+ CleaveTimer = 7000;
+ EnrageTimer = 0;
+ Enraged = false;
+ }
+
+ void EnterCombat(Unit* /*who*/) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
+
+ if (TeleportTimer <= diff)
+ {
+ Talk(SAY_TELEPORT);
+ ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
+ ThreatContainer::StorageType::const_iterator i = threatlist.begin();
+ for (i = threatlist.begin(); i != threatlist.end(); ++i)
+ {
+ Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
+ if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
+ {
+ DoTeleportPlayer(unit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+3, unit->GetOrientation());
+ }
+ }
+
+ DoResetThreat();
+ TeleportTimer = 30000;
+ } else TeleportTimer -= diff;
+
+ // //MarkOfFrostTimer
+ // if (MarkOfFrostTimer <= diff)
+ // {
+ // DoCast(me->getVictim(), SPELL_MARKOFFROST);
+ // MarkOfFrostTimer = 25000;
+ // } else MarkOfFrostTimer -= diff;
+
+ //ChillTimer
+ if (ChillTimer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_CHILL);
+ ChillTimer = urand(13000, 25000);
+ } else ChillTimer -= diff;
+
+ //BreathTimer
+ if (BreathTimer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_FROSTBREATH);
+ BreathTimer = urand(10000, 15000);
+ } else BreathTimer -= diff;
+
+ //ManaStormTimer
+ if (ManaStormTimer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_MANASTORM);
+ ManaStormTimer = urand(7500, 12500);
+ } else ManaStormTimer -= diff;
+
+ //ReflectTimer
+ if (ReflectTimer <= diff)
+ {
+ DoCast(me, SPELL_REFLECT);
+ ReflectTimer = urand(20000, 35000);
+ } else ReflectTimer -= diff;
+
+ //CleaveTimer
+ if (CleaveTimer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_CLEAVE);
+ CleaveTimer = 7000;
+ } else CleaveTimer -= diff;
+
+ //EnrageTimer
+ if (HealthBelowPct(26) && !Enraged)
+ {
+ DoCast(me, SPELL_ENRAGE);
+ Enraged = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+};
+
+void AddSC_boss_azuregos()
+{
+ new boss_azuregos();
+}
diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp
index 87b329b65e3..7e69daed72e 100644
--- a/src/server/scripts/Kalimdor/ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp
@@ -16,23 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Ungoro Crater
-SD%Complete: 0
-SDComment: Support for Quest:
-SDCategory: Ungoro Crater
-EndScriptData */
-
-/* ContentData
-EndContentData */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "ScriptedEscortAI.h"
-#include "ScriptedFollowerAI.h"
-#include "Player.h"
-#include "SpellInfo.h"
-
void AddSC_ungoro_crater()
{
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index f618d0e04e7..f618d0e04e7 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index a99aa373602..a99aa373602 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index e2068cabb95..e2068cabb95 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index 2d09feef089..2d09feef089 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index 01d3bcbfe90..01d3bcbfe90 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index fb084ec1e3c..fb084ec1e3c 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index b4d35afa8fb..b4d35afa8fb 100755..100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index 71264be564b..71264be564b 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
index 9c0f2139b1b..9c0f2139b1b 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index d635854da8b..d635854da8b 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 0c037904d2c..0c037904d2c 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 4727504a4bd..4727504a4bd 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 4e117d9f3e3..4e117d9f3e3 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index 7ff995d4bcf..7ff995d4bcf 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 89d7b0f764d..89d7b0f764d 100755..100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 030df23028c..e08a9173715 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -494,6 +494,378 @@ class npc_tournament_training_dummy : public CreatureScript
};
+// Battle for Crusaders' Pinnacle
+enum BlessedBanner
+{
+ SPELL_BLESSING_OF_THE_CRUSADE = 58026,
+ SPELL_THREAT_PULSE = 58113,
+ SPELL_CRUSADERS_SPIRE_VICTORY = 58084,
+ SPELL_TORCH = 58121,
+
+ NPC_BLESSED_BANNER = 30891,
+ NPC_CRUSADER_LORD_DALFORS = 31003,
+ NPC_ARGENT_BATTLE_PRIEST = 30919,
+ NPC_ARGENT_MASON = 30900,
+ NPC_REANIMATED_CAPTAIN = 30986,
+ NPC_SCOURGE_DRUDGE = 30984,
+ NPC_HIDEOUS_PLAGEBRINGER = 30987,
+ NPC_HALOF_THE_DEATHBRINGER = 30989,
+ NPC_LK = 31013,
+
+ BANNER_SAY = 0, // "The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!"
+ DALFORS_SAY_PRE_1 = 0, // "BY THE LIGHT! Those damned monsters! Look at what they've done to our people!"
+ DALFORS_SAY_PRE_2 = 1, // "Burn it down, boys. Burn it all down."
+ DALFORS_SAY_START = 2, // "Let 'em come. They'll pay for what they've done!"
+ DALFORS_YELL_FINISHED = 3, // "We've done it, lads! We've taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We're gonna get to buildin' and settin' up! Go!"
+ LK_TALK_1 = 0, // "Leave no survivors!"
+ LK_TALK_2 = 1, // "Cower before my terrible creations!"
+ LK_TALK_3 = 2, // "Feast my children! Feast upon the flesh of the living!"
+ LK_TALK_4 = 3, // "Lay down your arms and surrender your souls!"
+
+ EVENT_SPAWN = 1,
+ EVENT_INTRO_1 = 2,
+ EVENT_INTRO_2 = 3,
+ EVENT_INTRO_3 = 4,
+ EVENT_MASON_ACTION = 5,
+ EVENT_START_FIGHT = 6,
+ EVENT_WAVE_SPAWN = 7,
+ EVENT_HALOF = 8,
+ EVENT_ENDED = 9,
+};
+
+Position const DalforsPos[3] =
+{
+ {6458.703f, 403.858f, 490.498f, 3.1205f}, // Dalfors spawn point
+ {6422.950f, 423.335f, 510.451f, 0.0f}, // Dalfors intro pos
+ {6426.343f, 420.515f, 508.650f, 0.0f}, // Dalfors fight pos
+};
+
+Position const Priest1Pos[2] =
+{
+ {6462.025f, 403.681f, 489.721f, 3.1007f}, // priest1 spawn point
+ {6421.480f, 423.576f, 510.781f, 5.7421f}, // priest1 intro pos
+};
+
+Position const Priest2Pos[2] =
+{
+ {6463.969f, 407.198f, 489.240f, 2.2689f}, // priest2 spawn point
+ {6419.778f, 421.404f, 510.972f, 5.7421f}, // priest2 intro pos
+};
+
+Position const Priest3Pos[2] =
+{
+ {6464.371f, 400.944f, 489.186f, 6.1610f}, // priest3 spawn point
+ {6423.516f, 425.782f, 510.774f, 5.7421f}, // priest3 intro pos
+};
+
+Position const Mason1Pos[3] =
+{
+ {6462.929f, 409.826f, 489.392f, 3.0968f}, // mason1 spawn point
+ {6428.163f, 421.960f, 508.297f, 0.0f}, // mason1 intro pos
+ {6414.335f, 454.904f, 511.395f, 2.8972f}, // mason1 action pos
+};
+
+Position const Mason2Pos[3] =
+{
+ {6462.650f, 405.670f, 489.576f, 2.9414f}, // mason2 spawn point
+ {6426.250f, 419.194f, 508.219f, 0.0f}, // mason2 intro pos
+ {6415.014f, 446.849f, 511.395f, 3.1241f}, // mason2 action pos
+};
+
+Position const Mason3Pos[3] =
+{
+ {6462.646f, 401.218f, 489.601f, 2.7864f}, // mason3 spawn point
+ {6423.855f, 416.598f, 508.305f, 0.0f}, // mason3 intro pos
+ {6417.070f, 438.824f, 511.395f, 3.6651f}, // mason3 action pos
+};
+
+class npc_blessed_banner : public CreatureScript
+{
+public:
+ npc_blessed_banner() : CreatureScript("npc_blessed_banner") { }
+
+ struct npc_blessed_bannerAI : public Scripted_NoMovementAI
+ {
+ npc_blessed_bannerAI(Creature* creature) : Scripted_NoMovementAI(creature) , Summons(me)
+ {
+ HalofSpawned = false;
+ PhaseCount = 0;
+ Summons.DespawnAll();
+ }
+
+ EventMap events;
+
+ bool HalofSpawned;
+
+ uint32 PhaseCount;
+
+ SummonList Summons;
+
+ uint64 guidDalfors;
+ uint64 guidPriest[3];
+ uint64 guidMason[3];
+ uint64 guidHalof;
+
+ void Reset()
+ {
+ me->setRegeneratingHealth(false);
+ DoCast(SPELL_THREAT_PULSE);
+ me->AI()->Talk(BANNER_SAY);
+ events.ScheduleEvent(EVENT_SPAWN,3000);
+ }
+
+ void EnterCombat(Unit* /*who*/) {}
+
+ void MoveInLineOfSight(Unit* /*who*/) {}
+
+ void JustSummoned(Creature* Summoned)
+ {
+ Summons.Summon(Summoned);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ events.Update(diff);
+
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_SPAWN:
+ {
+ if (Creature* Dalfors = DoSummon(NPC_CRUSADER_LORD_DALFORS, DalforsPos[0]))
+ {
+ guidDalfors = Dalfors->GetGUID();
+ Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[1]);
+ }
+ if (Creature* Priest1 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest1Pos[0]))
+ {
+ guidPriest[0] = Priest1->GetGUID();
+ Priest1->GetMotionMaster()->MovePoint(0, Priest1Pos[1]);
+ }
+ if (Creature* Priest2 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest2Pos[0]))
+ {
+ guidPriest[1] = Priest2->GetGUID();
+ Priest2->GetMotionMaster()->MovePoint(0, Priest2Pos[1]);
+ }
+ if (Creature* Priest3 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest3Pos[0]))
+ {
+ guidPriest[2] = Priest3->GetGUID();
+ Priest3->GetMotionMaster()->MovePoint(0, Priest3Pos[1]);
+ }
+ if (Creature* Mason1 = DoSummon(NPC_ARGENT_MASON, Mason1Pos[0]))
+ {
+ guidMason[0] = Mason1->GetGUID();
+ Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[1]);
+ }
+ if (Creature* Mason2 = DoSummon(NPC_ARGENT_MASON, Mason2Pos[0]))
+ {
+ guidMason[1] = Mason2->GetGUID();
+ Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[1]);
+ }
+ if (Creature* Mason3 = DoSummon(NPC_ARGENT_MASON, Mason3Pos[0]))
+ {
+ guidMason[2] = Mason3->GetGUID();
+ Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]);
+ }
+ events.ScheduleEvent(EVENT_INTRO_1,15000);
+ }
+ break;
+ case EVENT_INTRO_1:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_SAY_PRE_1);
+ events.ScheduleEvent(EVENT_INTRO_2,5000);
+ }
+ break;
+ case EVENT_INTRO_2:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ {
+ Dalfors->SetFacingTo(6.215f);
+ Dalfors->AI()->Talk(DALFORS_SAY_PRE_2);
+ }
+ events.ScheduleEvent(EVENT_INTRO_3,5000);
+ }
+ break;
+ case EVENT_INTRO_3:
+ {
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ {
+ Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]);
+ Dalfors->SetHomePosition(DalforsPos[2]);
+ }
+ if (Creature* Priest1 = me->GetCreature(*me,guidPriest[0]))
+ {
+ Priest1->SetFacingTo(5.7421f);
+ Priest1->SetHomePosition(Priest1Pos[1]);
+ }
+ if (Creature* Priest2 = me->GetCreature(*me,guidPriest[1]))
+ {
+ Priest2->SetFacingTo(5.7421f);
+ Priest2->SetHomePosition(Priest2Pos[1]);
+ }
+ if (Creature* Priest3 = me->GetCreature(*me,guidPriest[2]))
+ {
+ Priest3->SetFacingTo(5.7421f);
+ Priest3->SetHomePosition(Priest3Pos[1]);
+ }
+ if (Creature* Mason1 = me->GetCreature(*me,guidMason[0]))
+ {
+ Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]);
+ Mason1->SetHomePosition(Mason1Pos[2]);
+ }
+ if (Creature* Mason2 = me->GetCreature(*me,guidMason[1]))
+ {
+ Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]);
+ Mason2->SetHomePosition(Mason2Pos[2]);
+ }
+ if (Creature* Mason3 = me->GetCreature(*me,guidMason[2]))
+ {
+ Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]);
+ Mason3->SetHomePosition(Mason3Pos[2]);
+ }
+ events.ScheduleEvent(EVENT_START_FIGHT,5000);
+ events.ScheduleEvent(EVENT_MASON_ACTION,15000);
+ }
+ break;
+ case EVENT_MASON_ACTION:
+ {
+ if (Creature* Mason1 = me->GetCreature(*me,guidMason[0]))
+ {
+ Mason1->SetFacingTo(2.8972f);
+ Mason1->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ if (Creature* Mason2 = me->GetCreature(*me,guidMason[1]))
+ {
+ Mason2->SetFacingTo(3.1241f);
+ Mason2->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ if (Creature* Mason3 = me->GetCreature(*me,guidMason[2]))
+ {
+ Mason3->SetFacingTo(3.6651f);
+ Mason3->AI()->SetData(1,1); // triggers SAI actions on npc
+ }
+ }
+ break;
+ case EVENT_START_FIGHT:
+ {
+ if(Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_1);
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_SAY_START);
+ events.ScheduleEvent(EVENT_WAVE_SPAWN,1000);
+ }
+ break;
+ case EVENT_WAVE_SPAWN:
+ {
+ if (PhaseCount == 3)
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_2);
+ }
+ else if (PhaseCount == 6)
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_3);
+ }
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason3Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (urand(0,1) == 0)
+ {
+ if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+ else
+ {
+ if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+
+ PhaseCount++;
+
+ if (PhaseCount < 8)
+ events.ScheduleEvent(EVENT_WAVE_SPAWN,urand(10000,20000));
+ else
+ events.ScheduleEvent(EVENT_HALOF,urand(10000,20000));
+ }
+ break;
+ case EVENT_HALOF:
+ {
+ if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100))
+ LK->AI()->Talk(LK_TALK_4);
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason1Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason2Pos[0]))
+ {
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER,DalforsPos[0]))
+ {
+ HalofSpawned = true;
+ guidHalof = tempsum->GetGUID();
+ tempsum->SetHomePosition(DalforsPos[2]);
+ tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100));
+ }
+ }
+ break;
+ case EVENT_ENDED:
+ {
+ Summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+ break;
+ }
+
+ if (PhaseCount == 8)
+ if (Creature* Halof = me->GetCreature(*me,guidHalof))
+ if (Halof->isDead())
+ {
+ DoCast(me,SPELL_CRUSADERS_SPIRE_VICTORY,true);
+ Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER);
+ Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
+ Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
+ Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER);
+ if (Creature* Dalfors = me->GetCreature(*me,guidDalfors))
+ Dalfors->AI()->Talk(DALFORS_YELL_FINISHED);
+ events.ScheduleEvent(EVENT_ENDED,10000);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_blessed_bannerAI(creature);
+ }
+};
+
void AddSC_icecrown()
{
new npc_arete;
@@ -502,4 +874,5 @@ void AddSC_icecrown()
new npc_guardian_pavilion;
new npc_vereth_the_cunning;
new npc_tournament_training_dummy;
+ new npc_blessed_banner();
}
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
index a4b506e9271..a4b506e9271 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
index 59bce7be298..59bce7be298 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index abf807327e3..abf807327e3 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
index ace68034dfc..ace68034dfc 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
index 9411bd8a363..9411bd8a363 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
index c4975d142f0..c4975d142f0 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
index fdf6533a64b..fdf6533a64b 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
index dfab6d12cb8..dfab6d12cb8 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
index 6644dd3f47f..6644dd3f47f 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
index 8d2124a3791..8d2124a3791 100755..100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 178df2078f8..178df2078f8 100755..100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 236436b229b..236436b229b 100755..100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index d0f8282d4bb..d601c717562 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2951,7 +2951,7 @@ public:
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
- void EnterCombat(Unit * /*who*/) { }
+ void EnterCombat(Unit* /*who*/) { }
void DoAction(const int32 /*param*/)
{