aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-01-29 14:59:59 +0100
committerShauren <shauren.trinity@gmail.com>2011-01-29 14:59:59 +0100
commitbf6140055811d5ca8928c63b96d8e72a1e76cc33 (patch)
tree61de407238b1c5766a435fef969ce0ddd653df94 /src
parent8d2ab9238f9365bd40b9bd683d1ced91647b5d77 (diff)
Scripts/Quests: Fixed incorrectly named hooks
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp35
-rw-r--r--src/server/scripts/EasternKingdoms/undercity.cpp28
2 files changed, 33 insertions, 30 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index eb83d8aad1c..f458084e9b2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -728,8 +728,8 @@ public:
#define SAY_WINDSOR_9 "Ah, there it is!"
#define MOB_ENTRY_REGINALD_WINDSOR 9682
-Player* pPlayerStart;
/*
+Player* pPlayerStart;
class npc_marshal_windsor : public CreatureScript
{
public:
@@ -902,8 +902,8 @@ public:
#define MOB_ENTRY_SHILL_DINGER 9678
#define MOB_ENTRY_CREST_KILLER 9680
-int wp = 0;
/*
+int wp = 0;
class npc_marshal_reginald_windsor : public CreatureScript
{
public:
@@ -1231,39 +1231,38 @@ class npc_rocknot : public CreatureScript
public:
npc_rocknot() : CreatureScript("npc_rocknot") { }
- bool ChooseReward(Player* /*pPlayer*/, Creature* pCreature, const Quest *_Quest, uint32 /*item*/)
+ bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/)
{
- InstanceScript* pInstance = pCreature->GetInstanceScript();
-
- if (!pInstance)
+ InstanceScript* instance = creature->GetInstanceScript();
+ if (!instance)
return true;
- if (pInstance->GetData(TYPE_BAR) == DONE || pInstance->GetData(TYPE_BAR) == SPECIAL)
+ if (instance->GetData(TYPE_BAR) == DONE || instance->GetData(TYPE_BAR) == SPECIAL)
return true;
- if (_Quest->GetQuestId() == QUEST_ALE)
+ if (quest->GetQuestId() == QUEST_ALE)
{
- if (pInstance->GetData(TYPE_BAR) != IN_PROGRESS)
- pInstance->SetData(TYPE_BAR,IN_PROGRESS);
+ if (instance->GetData(TYPE_BAR) != IN_PROGRESS)
+ instance->SetData(TYPE_BAR, IN_PROGRESS);
- pInstance->SetData(TYPE_BAR,SPECIAL);
+ instance->SetData(TYPE_BAR, SPECIAL);
//keep track of amount in instance script, returns SPECIAL if amount ok and event in progress
- if (pInstance->GetData(TYPE_BAR) == SPECIAL)
+ if (instance->GetData(TYPE_BAR) == SPECIAL)
{
- DoScriptText(SAY_GOT_BEER, pCreature);
- pCreature->CastSpell(pCreature,SPELL_DRUNKEN_RAGE,false);
- if (npc_escortAI* pEscortAI = CAST_AI(npc_rocknot::npc_rocknotAI, pCreature->AI()))
- pEscortAI->Start(false, false);
+ DoScriptText(SAY_GOT_BEER, creature);
+ creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
+ if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
+ escortAI->Start(false, false);
}
}
return true;
}
- CreatureAI* GetAI(Creature* pCreature) const
+ CreatureAI* GetAI(Creature* creature) const
{
- return new npc_rocknotAI(pCreature);
+ return new npc_rocknotAI(creature);
}
struct npc_rocknotAI : public npc_escortAI
diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp
index f2f98f62e16..906827d91a4 100644
--- a/src/server/scripts/EasternKingdoms/undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/undercity.cpp
@@ -35,16 +35,20 @@ EndContentData */
## npc_lady_sylvanas_windrunner
######*/
-#define SAY_LAMENT_END -1000196
-#define EMOTE_LAMENT_END -1000197
+enum Sylvanas
+{
+ QUEST_JOURNEY_TO_UNDERCITY = 9180,
+ SAY_LAMENT_END = -1000196,
+ EMOTE_LAMENT_END = -1000197,
-#define SOUND_CREDIT 10896
-#define ENTRY_HIGHBORNE_LAMENTER 21628
-#define ENTRY_HIGHBORNE_BUNNY 21641
+ SOUND_CREDIT = 10896,
+ ENTRY_HIGHBORNE_LAMENTER = 21628,
+ ENTRY_HIGHBORNE_BUNNY = 21641,
-#define SPELL_HIGHBORNE_AURA 37090
-#define SPELL_SYLVANAS_CAST 36568
-#define SPELL_RIBBON_OF_SOULS 34432 //the real one to use might be 37099
+ SPELL_HIGHBORNE_AURA = 37090,
+ SPELL_SYLVANAS_CAST = 36568,
+ SPELL_RIBBON_OF_SOULS = 34432, //the real one to use might be 37099
+};
float HighborneLoc[4][3]=
{
@@ -62,13 +66,13 @@ class npc_lady_sylvanas_windrunner : public CreatureScript
public:
npc_lady_sylvanas_windrunner() : CreatureScript("npc_lady_sylvanas_windrunner") { }
- bool ChooseReward(Player* /*pPlayer*/, Creature* pCreature, const Quest *_Quest, uint32 /*slot*/)
+ bool OnQuestReward(Player* /*pPlayer*/, Creature* pCreature, const Quest *_Quest, uint32 /*slot*/)
{
- if (_Quest->GetQuestId() == 9180)
+ if (_Quest->GetQuestId() == QUEST_JOURNEY_TO_UNDERCITY)
{
CAST_AI(npc_lady_sylvanas_windrunner::npc_lady_sylvanas_windrunnerAI, pCreature->AI())->LamentEvent = true;
- CAST_AI(npc_lady_sylvanas_windrunner::npc_lady_sylvanas_windrunnerAI, pCreature->AI())->DoPlaySoundToSet(pCreature,SOUND_CREDIT);
- pCreature->CastSpell(pCreature,SPELL_SYLVANAS_CAST,false);
+ CAST_AI(npc_lady_sylvanas_windrunner::npc_lady_sylvanas_windrunnerAI, pCreature->AI())->DoPlaySoundToSet(pCreature, SOUND_CREDIT);
+ pCreature->CastSpell(pCreature, SPELL_SYLVANAS_CAST, false);
for (uint8 i = 0; i < 4; ++i)
pCreature->SummonCreature(ENTRY_HIGHBORNE_LAMENTER, HighborneLoc[i][0], HighborneLoc[i][1], HIGHBORNE_LOC_Y, HighborneLoc[i][2], TEMPSUMMON_TIMED_DESPAWN, 160000);