aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/world
diff options
context:
space:
mode:
authorRat <none@none>2010-01-19 11:36:05 +0100
committerRat <none@none>2010-01-19 11:36:05 +0100
commit0cc053ea4d42ce405a915857f75ee00f0f65666b (patch)
tree7c25955ee5db618deee963f515ba061fbb1e1e8c /src/scripts/world
parentf5dea61b66a616110cfc82ff640ec448b1efa702 (diff)
*Integrate Script system to Core
-added ScriptMgr for loading scripts -removed bindings -moved script system to src/game -moved scripts to src/scripts -VC project files updated -cmakes updated (not 100% done yet) NOTE to Devs: -file locations changed -precompiled renamed to ScriptedPch -ecsort_ai renamed to ScriptedEscortAI -follower_ai renamed to ScriptedFollowerAI -guard_ai renamed to ScriptedGuardAI -simple_ai renamed to ScriptedSimpleAI -sc_creature renamed to ScriptedCreature -sc_gossip renamed to ScriptedGossip -sc_instance renamed to ScriptedInstance *use the new headers in scripts, thank you NOTE to ALL: cmake not fully tested, please report any errors with it could make creashes, incompability USE AT YOUR OWN RISK before further tests!! --HG-- branch : trunk
Diffstat (limited to 'src/scripts/world')
-rw-r--r--src/scripts/world/areatrigger_scripts.cpp120
-rw-r--r--src/scripts/world/boss_emeriss.cpp144
-rw-r--r--src/scripts/world/boss_lethon.cpp25
-rw-r--r--src/scripts/world/boss_taerar.cpp263
-rw-r--r--src/scripts/world/boss_ysondre.cpp203
-rw-r--r--src/scripts/world/go_scripts.cpp849
-rw-r--r--src/scripts/world/guards.cpp4111
-rw-r--r--src/scripts/world/item_scripts.cpp377
-rw-r--r--src/scripts/world/mob_generic_creature.cpp259
-rw-r--r--src/scripts/world/npc_innkeeper.cpp131
-rw-r--r--src/scripts/world/npc_professions.cpp1342
-rw-r--r--src/scripts/world/npc_taxi.cpp326
-rw-r--r--src/scripts/world/npcs_special.cpp2112
13 files changed, 10262 insertions, 0 deletions
diff --git a/src/scripts/world/areatrigger_scripts.cpp b/src/scripts/world/areatrigger_scripts.cpp
new file mode 100644
index 00000000000..bfd2e1dff3d
--- /dev/null
+++ b/src/scripts/world/areatrigger_scripts.cpp
@@ -0,0 +1,120 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Areatrigger_Scripts
+SD%Complete: 100
+SDComment: Scripts for areatriggers
+SDCategory: Areatrigger
+EndScriptData */
+
+/* ContentData
+at_coilfang_waterfall 4591
+at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm
+at_ravenholdt
+at_warsong_slaughterhouse
+at_warsong_grainery
+at_torp_farm
+EndContentData */
+
+#include "ScriptedPch.h"
+
+/*######
+## at_coilfang_waterfall
+######*/
+
+enum eCoilfangGOs
+{
+ GO_COILFANG_WATERFALL = 184212
+};
+
+bool AreaTrigger_at_coilfang_waterfall(Player *pPlayer, const AreaTriggerEntry *pAt)
+{
+ if (GameObject* pGo = GetClosestGameObjectWithEntry(pPlayer, GO_COILFANG_WATERFALL, 35.0f))
+ if (pGo->getLootState() == GO_READY)
+ pGo->UseDoorOrButton();
+
+ return false;
+}
+
+/*#####
+## at_legion_teleporter
+#####*/
+
+enum eLegionTeleporter
+{
+ SPELL_TELE_A_TO = 37387,
+ QUEST_GAINING_ACCESS_A = 10589,
+
+ SPELL_TELE_H_TO = 37389,
+ QUEST_GAINING_ACCESS_H = 10604
+};
+
+bool AreaTrigger_at_legion_teleporter(Player *pPlayer, const AreaTriggerEntry *pAt)
+{
+ if (pPlayer->isAlive() && !pPlayer->isInCombat())
+ {
+ if (pPlayer->GetTeam() == ALLIANCE && pPlayer->GetQuestRewardStatus(QUEST_GAINING_ACCESS_A))
+ {
+ pPlayer->CastSpell(pPlayer, SPELL_TELE_A_TO, false);
+ return true;
+ }
+
+ if (pPlayer->GetTeam() == HORDE && pPlayer->GetQuestRewardStatus(QUEST_GAINING_ACCESS_H))
+ {
+ pPlayer->CastSpell(pPlayer, SPELL_TELE_H_TO, false);
+ return true;
+ }
+
+ return false;
+ }
+ return false;
+}
+
+enum eRavenholdt
+{
+ QUEST_MANOR_RAVENHOLDT = 6681,
+ NPC_RAVENHOLDT = 13936
+};
+
+bool AreaTrigger_at_ravenholdt(Player* pPlayer, const AreaTriggerEntry* pAt)
+{
+ if (pPlayer->GetQuestStatus(QUEST_MANOR_RAVENHOLDT) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->KilledMonsterCredit(NPC_RAVENHOLDT, 0);
+
+ return false;
+}
+
+void AddSC_areatrigger_scripts()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "at_coilfang_waterfall";
+ newscript->pAreaTrigger = &AreaTrigger_at_coilfang_waterfall;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "at_legion_teleporter";
+ newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "at_ravenholdt";
+ newscript->pAreaTrigger = &AreaTrigger_at_ravenholdt;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/boss_emeriss.cpp b/src/scripts/world/boss_emeriss.cpp
new file mode 100644
index 00000000000..9a6357c73cc
--- /dev/null
+++ b/src/scripts/world/boss_emeriss.cpp
@@ -0,0 +1,144 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Emeriss
+SD%Complete: 90
+SDComment: Teleport function & Mark of Nature missing
+SDCategory: Bosses
+EndScriptData */
+
+#include "ScriptedPch.h"
+
+enum eEnums
+{
+ SAY_AGGRO = -1000401,
+ SAY_CASTCORRUPTION = -1000402, //signed for 6182
+
+ SPELL_SLEEP = 24777,
+ SPELL_NOXIOUSBREATH = 24818,
+ SPELL_TAILSWEEP = 15847,
+ //SPELL_MARKOFNATURE = 25040, // Not working
+ SPELL_VOLATILEINFECTION = 24928,
+ SPELL_CORRUPTIONOFEARTH = 24910
+};
+
+struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
+{
+ boss_emerissAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 m_uiSleep_Timer;
+ uint32 m_uiNoxiousBreath_Timer;
+ uint32 m_uiTailSweep_Timer;
+ //uint32 m_uiMarkOfNature_Timer;
+ uint32 m_uiVolatileInfection_Timer;
+ uint32 m_uiCorruptionsCasted;
+
+ void Reset()
+ {
+ m_uiSleep_Timer = 15000 + rand()%5000;
+ m_uiNoxiousBreath_Timer = 8000;
+ m_uiTailSweep_Timer = 4000;
+ //m_uiMarkOfNature_Timer = 45000;
+ m_uiVolatileInfection_Timer = 12000;
+ m_uiCorruptionsCasted = 0;
+ }
+
+ void Aggro(Unit* pWho)
+ {
+ DoScriptText(SAY_AGGRO, m_creature);
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
+
+ //Sleep_Timer
+ if (m_uiSleep_Timer <= uiDiff)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_SLEEP);
+
+ m_uiSleep_Timer = 8000 + rand()%8000;
+ }
+ else
+ m_uiSleep_Timer -= uiDiff;
+
+ //NoxiousBreath_Timer
+ if (m_uiNoxiousBreath_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_NOXIOUSBREATH);
+ m_uiNoxiousBreath_Timer = 14000 + rand()%6000;
+ }
+ else
+ m_uiNoxiousBreath_Timer -= uiDiff;
+
+ //Tailsweep every 2 seconds
+ if (m_uiTailSweep_Timer <= uiDiff)
+ {
+ DoCast(m_creature, SPELL_TAILSWEEP);
+ m_uiTailSweep_Timer = 2000;
+ }
+ else
+ m_uiTailSweep_Timer -= uiDiff;
+
+ //MarkOfNature_Timer
+ //if (m_uiMarkOfNature_Timer <= uiDiff)
+ //{
+ // DoCast(m_creature->getVictim(), SPELL_MARKOFNATURE);
+ // m_uiMarkOfNature_Timer = 45000;
+ //}
+ //else
+ // m_uiMarkOfNature_Timer -= uiDiff;
+
+ //VolatileInfection_Timer
+ if (m_uiVolatileInfection_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_VOLATILEINFECTION);
+ m_uiVolatileInfection_Timer = 7000 + rand()%5000;
+ }
+ else
+ m_uiVolatileInfection_Timer -= uiDiff;
+
+ //CorruptionofEarth_Timer
+ //CorruptionofEarth at 75%, 50% and 25%
+ if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(25*m_uiCorruptionsCasted)))
+ {
+ ++m_uiCorruptionsCasted; // prevent casting twice on same hp
+ DoScriptText(SAY_CASTCORRUPTION, m_creature);
+ DoCast(m_creature->getVictim(), SPELL_CORRUPTIONOFEARTH);
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_emeriss(Creature* pCreature)
+{
+ return new boss_emerissAI (pCreature);
+}
+
+void AddSC_boss_emeriss()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name = "boss_emeriss";
+ newscript->GetAI = &GetAI_boss_emeriss;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/boss_lethon.cpp b/src/scripts/world/boss_lethon.cpp
new file mode 100644
index 00000000000..cc316223a2f
--- /dev/null
+++ b/src/scripts/world/boss_lethon.cpp
@@ -0,0 +1,25 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Lethon
+SD%Complete: 0
+SDComment: Place Holder
+SDCategory: Bosses
+EndScriptData */
+
+#include "ScriptedPch.h"
+
diff --git a/src/scripts/world/boss_taerar.cpp b/src/scripts/world/boss_taerar.cpp
new file mode 100644
index 00000000000..51fb1cdd557
--- /dev/null
+++ b/src/scripts/world/boss_taerar.cpp
@@ -0,0 +1,263 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Taerar
+SD%Complete: 70
+SDComment: Mark of Nature & Teleport NYI. Fix the way to be banished.
+SDCategory: Bosses
+EndScriptData */
+
+#include "ScriptedPch.h"
+
+enum eEnums
+{
+ SAY_AGGRO = -1000399, //signed for 20021
+ SAY_SUMMONSHADE = -1000400, //signed for 20021
+
+ //Spells of Taerar
+ SPELL_SLEEP = 24777,
+ SPELL_NOXIOUSBREATH = 24818,
+ SPELL_TAILSWEEP = 15847,
+ // SPELL_MARKOFNATURE = 25040, // Not working
+ SPELL_ARCANEBLAST = 24857,
+ SPELL_BELLOWINGROAR = 22686,
+
+ SPELL_SUMMONSHADE_1 = 24841,
+ SPELL_SUMMONSHADE_2 = 24842,
+ SPELL_SUMMONSHADE_3 = 24843,
+
+ //Spells of Shades of Taerar
+ SPELL_POSIONCLOUD = 24840,
+ SPELL_POSIONBREATH = 20667
+};
+
+uint32 m_auiSpellSummonShade[]=
+{
+ SPELL_SUMMONSHADE_1, SPELL_SUMMONSHADE_2, SPELL_SUMMONSHADE_3
+};
+
+struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
+{
+ boss_taerarAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 m_uiSleep_Timer;
+ uint32 m_uiNoxiousBreath_Timer;
+ uint32 m_uiTailSweep_Timer;
+ //uint32 m_uiMarkOfNature_Timer;
+ uint32 m_uiArcaneBlast_Timer;
+ uint32 m_uiBellowingRoar_Timer;
+ uint32 m_uiShades_Timer;
+ uint32 m_uiShadesSummoned;
+
+ bool m_bShades;
+
+ void Reset()
+ {
+ m_uiSleep_Timer = 15000 + rand()%5000;
+ m_uiNoxiousBreath_Timer = 8000;
+ m_uiTailSweep_Timer = 4000;
+ //m_uiMarkOfNature_Timer = 45000;
+ m_uiArcaneBlast_Timer = 12000;
+ m_uiBellowingRoar_Timer = 30000;
+ m_uiShades_Timer = 60000; //The time that Taerar is banished
+ m_uiShadesSummoned = 0;
+
+ m_bShades = false;
+ }
+
+ void EnterCombat(Unit* pWho)
+ {
+ DoScriptText(SAY_AGGRO, m_creature);
+ }
+
+ void JustSummoned(Creature* pSummoned)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ pSummoned->AI()->AttackStart(pTarget);
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (m_bShades && m_uiShades_Timer <= uiDiff)
+ {
+ //Become unbanished again
+ m_creature->setFaction(14);
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_bShades = false;
+ }
+ else if (m_bShades)
+ {
+ m_uiShades_Timer -= uiDiff;
+ //Do nothing while banished
+ return;
+ }
+
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
+
+ //Sleep_Timer
+ if (m_uiSleep_Timer <= uiDiff)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_SLEEP);
+
+ m_uiSleep_Timer = 8000 + rand()%7000;
+ }
+ else
+ m_uiSleep_Timer -= uiDiff;
+
+ //NoxiousBreath_Timer
+ if (m_uiNoxiousBreath_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_NOXIOUSBREATH);
+ m_uiNoxiousBreath_Timer = 14000 + rand()%6000;
+ }
+ else
+ m_uiNoxiousBreath_Timer -= uiDiff;
+
+ //Tailsweep every 2 seconds
+ if (m_uiTailSweep_Timer <= uiDiff)
+ {
+ DoCast(m_creature, SPELL_TAILSWEEP);
+ m_uiTailSweep_Timer = 2000;
+ }
+ else
+ m_uiTailSweep_Timer -= uiDiff;
+
+ //MarkOfNature_Timer
+ //if (m_uiMarkOfNature_Timer <= uiDiff)
+ //{
+ // DoCast(m_creature->getVictim(), SPELL_MARKOFNATURE);
+ // m_uiMarkOfNature_Timer = 45000;
+ //}
+ //else
+ // m_uiMarkOfNature_Timer -= uiDiff;
+
+ //ArcaneBlast_Timer
+ if (m_uiArcaneBlast_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_ARCANEBLAST);
+ m_uiArcaneBlast_Timer = 7000 + rand()%5000;
+ }
+ else
+ m_uiArcaneBlast_Timer -= uiDiff;
+
+ //BellowingRoar_Timer
+ if (m_uiBellowingRoar_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
+ m_uiBellowingRoar_Timer = 20000 + rand()%10000;
+ }
+ else
+ m_uiBellowingRoar_Timer -= uiDiff;
+
+ //Summon 3 Shades at 75%, 50% and 25% (if bShades is true we already left in line 117, no need to check here again)
+ if (!m_bShades && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(25*m_uiShadesSummoned)))
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ {
+ //Inturrupt any spell casting
+ m_creature->InterruptNonMeleeSpells(false);
+
+ //horrible workaround, need to fix
+ m_creature->setFaction(35);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ DoScriptText(SAY_SUMMONSHADE, m_creature);
+
+ int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32);
+
+ for (int i = 0; i < iSize; ++i)
+ DoCast(pTarget, m_auiSpellSummonShade[i], true);
+
+ ++m_uiShadesSummoned; // prevent casting twice at same health
+ m_bShades = true;
+ }
+ m_uiShades_Timer = 60000;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+// Shades of Taerar Script
+struct TRINITY_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI
+{
+ boss_shadeoftaerarAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 m_uiPoisonCloud_Timer;
+ uint32 m_uiPosionBreath_Timer;
+
+ void Reset()
+ {
+ m_uiPoisonCloud_Timer = 8000;
+ m_uiPosionBreath_Timer = 12000;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //PoisonCloud_Timer
+ if (m_uiPoisonCloud_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_POSIONCLOUD);
+ m_uiPoisonCloud_Timer = 30000;
+ }
+ else
+ m_uiPoisonCloud_Timer -= uiDiff;
+
+ //PosionBreath_Timer
+ if (m_uiPosionBreath_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_POSIONBREATH);
+ m_uiPosionBreath_Timer = 12000;
+ }
+ else
+ m_uiPosionBreath_Timer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_taerar(Creature* pCreature)
+{
+ return new boss_taerarAI (pCreature);
+}
+
+CreatureAI* GetAI_boss_shadeoftaerar(Creature* pCreature)
+{
+ return new boss_shadeoftaerarAI (pCreature);
+}
+
+void AddSC_boss_taerar()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "boss_taerar";
+ newscript->GetAI = &GetAI_boss_taerar;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "boss_shade_of_taerar";
+ newscript->GetAI = &GetAI_boss_shadeoftaerar;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/boss_ysondre.cpp b/src/scripts/world/boss_ysondre.cpp
new file mode 100644
index 00000000000..b808841ce27
--- /dev/null
+++ b/src/scripts/world/boss_ysondre.cpp
@@ -0,0 +1,203 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Ysondre
+SD%Complete: 90
+SDComment: Mark of Nature & Teleport missing
+SDCategory: Bosses
+EndScriptData */
+
+#include "ScriptedPch.h"
+
+enum eEnums
+{
+ SAY_AGGRO = -1000360, //signed for 17969
+ SAY_SUMMONDRUIDS = -1000361, //signed for 17969
+
+ SPELL_SLEEP = 24777,
+ SPELL_NOXIOUSBREATH = 24818,
+ SPELL_TAILSWEEP = 15847,
+ //SPELL_MARKOFNATURE = 25040, // Not working
+ SPELL_LIGHTNINGWAVE = 24819,
+ SPELL_SUMMONDRUIDS = 24795,
+
+ SPELL_SUMMON_PLAYER = 24776,
+
+ //druid spells
+ SPELL_MOONFIRE = 21669
+};
+
+// Ysondre script
+struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
+{
+ boss_ysondreAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+
+ uint32 m_uiSleep_Timer;
+ uint32 m_uiNoxiousBreath_Timer;
+ uint32 m_uiTailSweep_Timer;
+ //uint32 m_uiMarkOfNature_Timer;
+ uint32 m_uiLightningWave_Timer;
+ uint32 m_uiSummonDruidModifier;
+
+ void Reset()
+ {
+ m_uiSleep_Timer = 15000 + rand()%5000;
+ m_uiNoxiousBreath_Timer = 8000;
+ m_uiTailSweep_Timer = 4000;
+ //m_uiMarkOfNature_Timer = 45000;
+ m_uiLightningWave_Timer = 12000;
+ m_uiSummonDruidModifier = 0;
+ }
+
+ void EnterCombat(Unit* pWho)
+ {
+ DoScriptText(SAY_AGGRO, m_creature);
+ }
+
+ void JustSummoned(Creature* pSummoned)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ pSummoned->AI()->AttackStart(pTarget);
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //Sleep_Timer
+ if (m_uiSleep_Timer <= uiDiff)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_SLEEP);
+
+ m_uiSleep_Timer = 8000 + rand()%7000;
+ }
+ else
+ m_uiSleep_Timer -= uiDiff;
+
+ //NoxiousBreath_Timer
+ if (m_uiNoxiousBreath_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_NOXIOUSBREATH);
+ m_uiNoxiousBreath_Timer = 14000 + rand()%6000;
+ }
+ else
+ m_uiNoxiousBreath_Timer -= uiDiff;
+
+ //Tailsweep every 2 seconds
+ if (m_uiTailSweep_Timer <= uiDiff)
+ {
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_TAILSWEEP);
+
+ m_uiTailSweep_Timer = 2000;
+ }
+ else
+ m_uiTailSweep_Timer -= uiDiff;
+
+ //MarkOfNature_Timer
+ //if (m_uiMarkOfNature_Timer <= uiDiff)
+ //{
+ // DoCast(m_creature->getVictim(), SPELL_MARKOFNATURE);
+ // m_uiMarkOfNature_Timer = 45000;
+ //}
+ //else
+ // m_uiMarkOfNature_Timer -= uiDiff;
+
+ //LightningWave_Timer
+ if (m_uiLightningWave_Timer <= uiDiff)
+ {
+ //Cast LIGHTNINGWAVE on a Random target
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_LIGHTNINGWAVE);
+
+ m_uiLightningWave_Timer = 7000 + rand()%5000;
+ }
+ else
+ m_uiLightningWave_Timer -= uiDiff;
+
+ //Summon Druids
+ if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(25*m_uiSummonDruidModifier)))
+ {
+ DoScriptText(SAY_SUMMONDRUIDS, m_creature);
+
+ for (int i = 0; i < 10; ++i)
+ DoCast(m_creature, SPELL_SUMMONDRUIDS, true);
+
+ ++m_uiSummonDruidModifier;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+// Summoned druid script
+struct TRINITY_DLL_DECL mob_dementeddruidsAI : public ScriptedAI
+{
+ mob_dementeddruidsAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 m_uiMoonFire_Timer;
+
+ void Reset()
+ {
+ m_uiMoonFire_Timer = 3000;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ //MoonFire_Timer
+ if (m_uiMoonFire_Timer <= uiDiff)
+ {
+ DoCast(m_creature->getVictim(), SPELL_MOONFIRE);
+ m_uiMoonFire_Timer = 5000;
+ }
+ else
+ m_uiMoonFire_Timer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_ysondre(Creature* pCreature)
+{
+ return new boss_ysondreAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_dementeddruids(Creature* pCreature)
+{
+ return new mob_dementeddruidsAI (pCreature);
+}
+
+void AddSC_boss_ysondre()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "boss_ysondre";
+ newscript->GetAI = &GetAI_boss_ysondre;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_dementeddruids";
+ newscript->GetAI = &GetAI_mob_dementeddruids;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/go_scripts.cpp b/src/scripts/world/go_scripts.cpp
new file mode 100644
index 00000000000..3d352b0b35b
--- /dev/null
+++ b/src/scripts/world/go_scripts.cpp
@@ -0,0 +1,849 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: GO_Scripts
+SD%Complete: 100
+SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843,12982, 2936
+SDCategory: Game Objects
+EndScriptData */
+
+/* ContentData
+go_cat_figurine (the "trap" version of GO, two different exist)
+go_northern_crystal_pylon
+go_eastern_crystal_pylon
+go_western_crystal_pylon
+go_barov_journal
+go_ethereum_prison
+go_ethereum_stasis
+go_sacred_fire_of_life
+go_shrine_of_the_birds
+go_southfury_moonstone
+go_field_repair_bot_74A
+go_orb_of_command
+go_resonite_cask
+go_tablet_of_madness
+go_tablet_of_the_seven
+go_tele_to_dalaran_crystal
+go_tele_to_violet_stand
+go_rusty_cage
+go_scourge_cage
+go_jotunheim_cage
+go_table_theka
+EndContentData */
+
+#include "ScriptedPch.h"
+
+/*######
+## go_cat_figurine
+######*/
+
+enum eCatFigurine
+{
+ SPELL_SUMMON_GHOST_SABER = 5968,
+};
+
+bool GOHello_go_cat_figurine(Player *pPlayer, GameObject *pGO)
+{
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_GHOST_SABER,true);
+ return false;
+}
+
+/*######
+## go_crystal_pylons (3x)
+######*/
+
+bool GOHello_go_northern_crystal_pylon(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
+ {
+ pPlayer->PrepareQuestMenu(pGO->GetGUID());
+ pPlayer->SendPreparedQuest(pGO->GetGUID());
+ }
+
+ if (pPlayer->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->AreaExploredOrEventHappens(4285);
+
+ return true;
+}
+
+bool GOHello_go_eastern_crystal_pylon(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
+ {
+ pPlayer->PrepareQuestMenu(pGO->GetGUID());
+ pPlayer->SendPreparedQuest(pGO->GetGUID());
+ }
+
+ if (pPlayer->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->AreaExploredOrEventHappens(4287);
+
+ return true;
+}
+
+bool GOHello_go_western_crystal_pylon(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
+ {
+ pPlayer->PrepareQuestMenu(pGO->GetGUID());
+ pPlayer->SendPreparedQuest(pGO->GetGUID());
+ }
+
+ if (pPlayer->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->AreaExploredOrEventHappens(4288);
+
+ return true;
+}
+
+/*######
+## go_barov_journal
+######*/
+
+bool GOHello_go_barov_journal(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(26086))
+ {
+ pPlayer->CastSpell(pPlayer,26095,false);
+ }
+ return true;
+}
+
+/*######
+## go_field_repair_bot_74A
+######*/
+
+bool GOHello_go_field_repair_bot_74A(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->HasSkill(SKILL_ENGINERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !pPlayer->HasSpell(22704))
+ {
+ pPlayer->CastSpell(pPlayer,22864,false);
+ }
+ return true;
+}
+
+/*######
+## go_gilded_brazier
+######*/
+
+enum eGildedBrazier
+{
+ NPC_STILLBLADE = 17716,
+};
+
+bool GOHello_go_gilded_brazier(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
+ if (Creature* pCreature = pPlayer->SummonCreature(NPC_STILLBLADE, 8087.632, -7542.740, 151.568, 0.122, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
+ pCreature->AI()->AttackStart(pPlayer);
+
+ return true;
+}
+
+/*######
+## go_orb_of_command
+######*/
+
+bool GOHello_go_orb_of_command(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->GetQuestRewardStatus(7761))
+ pPlayer->CastSpell(pPlayer,23460,true);
+
+ return true;
+}
+
+/*######
+## go_tablet_of_madness
+######*/
+
+bool GOHello_go_tablet_of_madness(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetSkillValue(SKILL_ALCHEMY) >= 300 && !pPlayer->HasSpell(24266))
+ {
+ pPlayer->CastSpell(pPlayer,24267,false);
+ }
+ return true;
+}
+
+/*######
+## go_tablet_of_the_seven
+######*/
+
+//TODO: use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
+bool GOHello_go_tablet_of_the_seven(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
+ return true;
+
+ if (pPlayer->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->CastSpell(pPlayer,15065,false);
+
+ return true;
+}
+
+/*#####
+## go_jump_a_tron
+######*/
+
+bool GOHello_go_jump_a_tron(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->CastSpell(pPlayer,33382,true);
+
+ return true;
+}
+
+/*######
+## go_ethereum_prison
+######*/
+
+enum eEthereumPrison
+{
+ SPELL_REP_LC = 39456,
+ SPELL_REP_SHAT = 39457,
+ SPELL_REP_CE = 39460,
+ SPELL_REP_CON = 39474,
+ SPELL_REP_KT = 39475,
+ SPELL_REP_SPOR = 39476
+};
+
+const uint32 NpcPrisonEntry[] =
+{
+ 22810, 22811, 22812, 22813, 22814, 22815, //good guys
+ 20783, 20784, 20785, 20786, 20788, 20789, 20790 //bad guys
+};
+
+bool GOHello_go_ethereum_prison(Player *pPlayer, GameObject *pGO)
+{
+ int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
+
+ if (Creature* pCreature = pPlayer->SummonCreature(NpcPrisonEntry[Random],
+ pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(pPlayer),
+ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ {
+ if (!pCreature->IsHostileTo(pPlayer))
+ {
+ uint32 Spell = 0;
+
+ if (FactionTemplateEntry const* pFaction = pCreature->getFactionTemplateEntry())
+ {
+ switch(pFaction->faction)
+ {
+ case 1011: Spell = SPELL_REP_LC; break;
+ case 935: Spell = SPELL_REP_SHAT; break;
+ case 942: Spell = SPELL_REP_CE; break;
+ case 933: Spell = SPELL_REP_CON; break;
+ case 989: Spell = SPELL_REP_KT; break;
+ case 970: Spell = SPELL_REP_SPOR; break;
+ }
+
+ if (Spell)
+ pCreature->CastSpell(pPlayer, Spell, false);
+ else
+ error_log("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
+ }
+ }
+ }
+
+ return false;
+}
+
+/*######
+## go_ethereum_stasis
+######*/
+
+const uint32 NpcStasisEntry[] =
+{
+ 22825, 20888, 22827, 22826, 22828
+};
+
+bool GOHello_go_ethereum_stasis(Player *pPlayer, GameObject *pGO)
+{
+ int Random = rand() % (sizeof(NpcStasisEntry) / sizeof(uint32));
+
+ pPlayer->SummonCreature(NpcStasisEntry[Random],
+ pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(pPlayer),
+ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+
+ return false;
+}
+
+/*######
+## go_resonite_cask
+######*/
+
+enum eResoniteCask
+{
+ NPC_GOGGEROC = 11920
+};
+
+bool GOHello_go_resonite_cask(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
+ pGO->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
+
+ return false;
+}
+
+/*######
+## go_sacred_fire_of_life
+######*/
+
+#define NPC_ARIKARA 10882
+
+bool GOHello_go_sacred_fire_of_life(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
+ pPlayer->SummonCreature(NPC_ARIKARA, -5008.338, -2118.894, 83.657, 0.874, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+
+ return true;
+}
+
+/*######
+## go_shrine_of_the_birds
+######*/
+
+enum eShrineOfTheBirds
+{
+ NPC_HAWK_GUARD = 22992,
+ NPC_EAGLE_GUARD = 22993,
+ NPC_FALCON_GUARD = 22994,
+ GO_SHRINE_HAWK = 185551,
+ GO_SHRINE_EAGLE = 185547,
+ GO_SHRINE_FALCON = 185553
+};
+
+bool GOHello_go_shrine_of_the_birds(Player *pPlayer, GameObject *pGO)
+{
+ uint32 BirdEntry = 0;
+
+ float fX, fY, fZ;
+ pGO->GetClosePoint(fX, fY, fZ, pGO->GetObjectSize(), INTERACTION_DISTANCE);
+
+ switch(pGO->GetEntry())
+ {
+ case GO_SHRINE_HAWK:
+ BirdEntry = NPC_HAWK_GUARD;
+ break;
+ case GO_SHRINE_EAGLE:
+ BirdEntry = NPC_EAGLE_GUARD;
+ break;
+ case GO_SHRINE_FALCON:
+ BirdEntry = NPC_FALCON_GUARD;
+ break;
+ }
+
+ if (BirdEntry)
+ pPlayer->SummonCreature(BirdEntry, fX, fY, fZ, pGO->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+
+ return false;
+}
+
+/*######
+## go_southfury_moonstone
+######*/
+
+enum eSouthfury
+{
+ NPC_RIZZLE = 23002,
+ SPELL_BLACKJACK = 39865, //stuns player
+ SPELL_SUMMON_RIZZLE = 39866
+
+};
+
+bool GOHello_go_southfury_moonstone(Player *pPlayer, GameObject *pGO)
+{
+ //implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
+ //pPlayer->CastSpell(pPlayer,SPELL_SUMMON_RIZZLE,false);
+
+ if (Creature* pCreature = pPlayer->SummonCreature(NPC_RIZZLE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0))
+ pCreature->CastSpell(pPlayer,SPELL_BLACKJACK,false);
+
+ return false;
+}
+
+/*######
+## go_tele_to_dalaran_crystal
+######*/
+
+enum eDalaranCrystal
+{
+ QUEST_LEARN_LEAVE_RETURN = 12790,
+ QUEST_TELE_CRYSTAL_FLAG = 12845
+};
+
+bool GOHello_go_tele_to_dalaran_crystal(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
+ return false;
+
+ //TODO: must send error message (what kind of message? On-screen?)
+ return true;
+}
+
+/*######
+## go_tele_to_violet_stand
+######*/
+
+bool GOHello_go_tele_to_violet_stand(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || pPlayer->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
+ return false;
+
+ return true;
+}
+
+/*######
+## go_fel_crystalforge
+######*/
+
+#define GOSSIP_FEL_CRYSTALFORGE_TEXT 31000
+#define GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN 31001
+#define GOSSIP_FEL_CRYSTALFORGE_ITEM_1 "Purchase 1 Unstable Flask of the Beast for the cost of 10 Apexis Shards"
+#define GOSSIP_FEL_CRYSTALFORGE_ITEM_5 "Purchase 5 Unstable Flask of the Beast for the cost of 50 Apexis Shards"
+#define GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN "Use the fel crystalforge to make another purchase."
+
+enum eFelCrystalforge
+{
+ SPELL_CREATE_1_FLASK_OF_BEAST = 40964,
+ SPELL_CREATE_5_FLASK_OF_BEAST = 40965,
+};
+
+bool GOHello_go_fel_crystalforge(Player *pPlayer, GameObject *pGO)
+{
+ if ( pGO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER ) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
+ pPlayer->PrepareQuestMenu(pGO->GetGUID()); /* return true*/
+
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+
+ pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, pGO->GetGUID());
+
+ return true;
+}
+
+bool GOSelect_go_fel_crystalforge(Player *pPlayer, GameObject *pGO, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF:
+ pPlayer->CastSpell(pPlayer,SPELL_CREATE_1_FLASK_OF_BEAST,false);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ pPlayer->CastSpell(pPlayer,SPELL_CREATE_5_FLASK_OF_BEAST,false);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_RETURN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_ITEM_TEXT_RETURN, pGO->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FEL_CRYSTALFORGE_ITEM_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->SEND_GOSSIP_MENU(GOSSIP_FEL_CRYSTALFORGE_TEXT, pGO->GetGUID());
+ break;
+ }
+ return true;
+}
+
+/*######
+## go_bashir_crystalforge
+######*/
+
+enum eBashirCrystalforge
+{
+ SPELL_CREATE_1_FLASK_OF_SORCERER = 40968,
+ SPELL_CREATE_5_FLASK_OF_SORCERER = 40970,
+};
+
+bool GOHello_go_bashir_crystalforge(Player *pPlayer, GameObject *pGO)
+{
+ pPlayer->CastSpell(pPlayer,SPELL_CREATE_1_FLASK_OF_SORCERER,false);
+ return false;
+}
+
+/*######
+## matrix_punchograph
+######*/
+
+enum eMatrixPunchograph
+{
+ ITEM_WHITE_PUNCH_CARD = 9279,
+ ITEM_YELLOW_PUNCH_CARD = 9280,
+ ITEM_BLUE_PUNCH_CARD = 9282,
+ ITEM_RED_PUNCH_CARD = 9281,
+ ITEM_PRISMATIC_PUNCH_CARD = 9316,
+ SPELL_YELLOW_PUNCH_CARD = 11512,
+ SPELL_BLUE_PUNCH_CARD = 11525,
+ SPELL_RED_PUNCH_CARD = 11528,
+ SPELL_PRISMATIC_PUNCH_CARD = 11545,
+ MATRIX_PUNCHOGRAPH_3005_A = 142345,
+ MATRIX_PUNCHOGRAPH_3005_B = 142475,
+ MATRIX_PUNCHOGRAPH_3005_C = 142476,
+ MATRIX_PUNCHOGRAPH_3005_D = 142696,
+};
+
+bool GOHello_go_matrix_punchograph(Player *pPlayer, GameObject *pGO)
+{
+ switch(pGO->GetEntry())
+ {
+ case MATRIX_PUNCHOGRAPH_3005_A:
+ if(pPlayer->HasItemCount(ITEM_WHITE_PUNCH_CARD, 1))
+ {
+ pPlayer->DestroyItemCount(ITEM_WHITE_PUNCH_CARD, 1, true);
+ pPlayer->CastSpell(pPlayer,SPELL_YELLOW_PUNCH_CARD,true);
+ }
+ break;
+ case MATRIX_PUNCHOGRAPH_3005_B:
+ if(pPlayer->HasItemCount(ITEM_YELLOW_PUNCH_CARD, 1))
+ {
+ pPlayer->DestroyItemCount(ITEM_YELLOW_PUNCH_CARD, 1, true);
+ pPlayer->CastSpell(pPlayer,SPELL_BLUE_PUNCH_CARD,true);
+ }
+ break;
+ case MATRIX_PUNCHOGRAPH_3005_C:
+ if(pPlayer->HasItemCount(ITEM_BLUE_PUNCH_CARD, 1))
+ {
+ pPlayer->DestroyItemCount(ITEM_BLUE_PUNCH_CARD, 1, true);
+ pPlayer->CastSpell(pPlayer,SPELL_RED_PUNCH_CARD,true);
+ }
+ break;
+ case MATRIX_PUNCHOGRAPH_3005_D:
+ if(pPlayer->HasItemCount(ITEM_RED_PUNCH_CARD, 1))
+ {
+ pPlayer->DestroyItemCount(ITEM_RED_PUNCH_CARD, 1, true);
+ pPlayer->CastSpell(pPlayer, SPELL_PRISMATIC_PUNCH_CARD, true);
+ }
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+/*######
+## go_rusty_cage
+######*/
+
+enum eRustyCage
+{
+ NPC_GOBLIN_PRISIONER = 29466
+};
+
+bool GOHello_go_rusty_cage(Player *pPlayer, GameObject *pGO)
+{
+ if(Creature *pGoblinPrisoner = pGO->FindNearestCreature(NPC_GOBLIN_PRISIONER, 5.0f, true))
+ {
+ pGO->SetGoState(GO_STATE_ACTIVE);
+ pPlayer->KilledMonsterCredit(NPC_GOBLIN_PRISIONER, pGoblinPrisoner->GetGUID());
+ pGoblinPrisoner->DisappearAndDie();
+ }
+
+ return true;
+}
+
+/*######
+## go_scourge_cage
+######*/
+
+enum eScourgeCage
+{
+ NPC_SCOURGE_PRISONER = 25610
+};
+
+bool GOHello_go_scourge_cage(Player *pPlayer, GameObject *pGO)
+{
+ if (Creature *pNearestPrisoner = pGO->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
+ {
+ pGO->SetGoState(GO_STATE_ACTIVE);
+ pPlayer->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID());
+ pNearestPrisoner->DisappearAndDie();
+ }
+
+ return true;
+}
+
+/*######
+## go_arcane_prison
+######*/
+
+enum eArcanePrison
+{
+ QUEST_PRISON_BREAK = 11587,
+ SPELL_ARCANE_PRISONER_KILL_CREDIT = 45456
+};
+
+bool GOHello_go_arcane_prison(Player *pPlayer, GameObject *pGO)
+{
+ if (pPlayer->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
+ {
+ pGO->SummonCreature(25318, 3485.089844, 6115.7422188, 70.966812, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
+ pPlayer->CastSpell(pPlayer, SPELL_ARCANE_PRISONER_KILL_CREDIT, true);
+ return true;
+ } else
+ return false;
+}
+
+/*######
+## go_blood_filled_orb
+######*/
+
+#define NPC_ZELEMAR 17830
+
+bool GOHello_go_blood_filled_orb(Player *pPlayer, GameObject *pGO)
+{
+ if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
+ pPlayer->SummonCreature(NPC_ZELEMAR, -369.746, 166.759, -21.50, 5.235, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+
+ return true;
+}
+
+/*######
+## go_jotunheim_cage
+######*/
+
+enum eJotunheimCage
+{
+ NPC_EBON_BLADE_PRISONER_HUMAN = 30186,
+ NPC_EBON_BLADE_PRISONER_NE = 30194,
+ NPC_EBON_BLADE_PRISONER_TROLL = 30196,
+ NPC_EBON_BLADE_PRISONER_ORC = 30195,
+
+ SPELL_SUMMON_BLADE_KNIGHT_H = 56207,
+ SPELL_SUMMON_BLADE_KNIGHT_NE = 56209,
+ SPELL_SUMMON_BLADE_KNIGHT_ORC = 56212,
+ SPELL_SUMMON_BLADE_KNIGHT_TROLL = 56214
+};
+
+bool GOHello_go_jotunheim_cage(Player* pPlayer, GameObject* pGO)
+{
+ Creature* pPrisoner;
+ pPrisoner = NULL;
+
+ if ((pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_TROLL, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_ORC, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_NE, 5.0f, true)))
+ {
+ if (pPrisoner && pPrisoner->isAlive())
+ {
+ pPrisoner->DisappearAndDie();
+ pPlayer->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
+ switch(pPrisoner->GetEntry())
+ {
+ case NPC_EBON_BLADE_PRISONER_HUMAN:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_H,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_NE:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_NE,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_TROLL:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_TROLL,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_ORC:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_ORC,true);
+ break;
+ }
+ }
+ }
+ return true;
+}
+enum eTableTheka
+{
+ GOSSIP_TABLE_THEKA = 1653,
+
+ QUEST_SPIDER_GOLD = 2936
+};
+
+bool GOHello_go_table_theka(Player* pPlayer, GameObject* pGO)
+{
+ if (pPlayer->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
+
+ pPlayer->SEND_GOSSIP_MENU(GOSSIP_TABLE_THEKA, pGO->GetGUID());
+
+ return true;
+}
+
+/*######
+ * ## go_inconspicuous_landmark
+ * ######*/
+
+enum eInconspicuousLandmark
+{
+ SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB = 11462,
+ ITEM_CUERGOS_KEY = 9275,
+};
+
+bool GOHello_go_inconspicuous_landmark(Player *pPlayer, GameObject* pGO)
+{
+ if (pPlayer->HasItemCount(ITEM_CUERGOS_KEY,1))
+ return false;
+
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB,true);
+
+ return true;
+}
+
+
+void AddSC_go_scripts()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "go_cat_figurine";
+ newscript->pGOHello = &GOHello_go_cat_figurine;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_northern_crystal_pylon";
+ newscript->pGOHello = &GOHello_go_northern_crystal_pylon;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_eastern_crystal_pylon";
+ newscript->pGOHello = &GOHello_go_eastern_crystal_pylon;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_western_crystal_pylon";
+ newscript->pGOHello = &GOHello_go_western_crystal_pylon;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_barov_journal";
+ newscript->pGOHello = &GOHello_go_barov_journal;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_field_repair_bot_74A";
+ newscript->pGOHello = &GOHello_go_field_repair_bot_74A;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_gilded_brazier";
+ newscript->pGOHello = &GOHello_go_gilded_brazier;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_orb_of_command";
+ newscript->pGOHello = &GOHello_go_orb_of_command;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_shrine_of_the_birds";
+ newscript->pGOHello = &GOHello_go_shrine_of_the_birds;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_southfury_moonstone";
+ newscript->pGOHello = &GOHello_go_southfury_moonstone;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_tablet_of_madness";
+ newscript->pGOHello = &GOHello_go_tablet_of_madness;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_tablet_of_the_seven";
+ newscript->pGOHello = &GOHello_go_tablet_of_the_seven;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_jump_a_tron";
+ newscript->pGOHello = &GOHello_go_jump_a_tron;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_ethereum_prison";
+ newscript->pGOHello = &GOHello_go_ethereum_prison;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_ethereum_stasis";
+ newscript->pGOHello = &GOHello_go_ethereum_stasis;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_resonite_cask";
+ newscript->pGOHello = &GOHello_go_resonite_cask;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_sacred_fire_of_life";
+ newscript->pGOHello = &GOHello_go_sacred_fire_of_life;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_tele_to_dalaran_crystal";
+ newscript->pGOHello = &GOHello_go_tele_to_dalaran_crystal;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_tele_to_violet_stand";
+ newscript->pGOHello = &GOHello_go_tele_to_violet_stand;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_fel_crystalforge";
+ newscript->pGOHello = &GOHello_go_fel_crystalforge;
+ newscript->pGOSelect = &GOSelect_go_fel_crystalforge;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_bashir_crystalforge";
+ newscript->pGOHello = &GOHello_go_bashir_crystalforge;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_matrix_punchograph";
+ newscript->pGOHello = &GOHello_go_matrix_punchograph;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_rusty_cage";
+ newscript->pGOHello = &GOHello_go_rusty_cage;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_scourge_cage";
+ newscript->pGOHello = &GOHello_go_scourge_cage;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_arcane_prison";
+ newscript->pGOHello = &GOHello_go_arcane_prison;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_blood_filled_orb";
+ newscript->pGOHello = &GOHello_go_blood_filled_orb;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_jotunheim_cage";
+ newscript->pGOHello = &GOHello_go_jotunheim_cage;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_table_theka";
+ newscript->pGOHello = &GOHello_go_table_theka;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_inconspicuous_landmark";
+ newscript->pGOHello = &GOHello_go_inconspicuous_landmark;
+ newscript->RegisterSelf();
+}
diff --git a/src/scripts/world/guards.cpp b/src/scripts/world/guards.cpp
new file mode 100644
index 00000000000..34a537ee627
--- /dev/null
+++ b/src/scripts/world/guards.cpp
@@ -0,0 +1,4111 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Guards
+SD%Complete: 100
+SDComment: All Guard gossip data, quite some npc_text-id's still missing, adding constantly as new id's are known. CombatAI should be organized better for future.
+SDCategory: Guards
+EndScriptData */
+
+/* ContentData
+guard_azuremyst
+guard_bluffwatcher
+guard_contested
+guard_dalaran
+guard_darnassus
+guard_dunmorogh
+guard_durotar
+guard_elwynnforest
+guard_eversong
+guard_exodar
+guard_ironforge
+guard_mulgore
+guard_orgrimmar
+guard_shattrath
+guard_shattrath_aldor
+guard_shattrath_scryer
+guard_silvermoon
+guard_stormwind
+guard_teldrassil
+guard_tirisfal
+guard_undercity
+EndContentData */
+
+#include "ScriptedPch.h"
+#include "ScriptedGuardAI.h"
+
+//script spesific action
+#define GOSSIP_ACTION_TAVERN 101
+#define GOSSIP_ACTION_GEMMERCHANT 102
+#define GOSSIP_ACTION_MANALOOM 103
+
+//script spesific sender
+#define GOSSIP_SENDER_SEC_GEMMERCHANT 101
+#define GOSSIP_SENDER_SEC_AUCTIONHOUSE 102
+
+//script spesific gossip text
+#define GOSSIP_TEXT_TAVERN "Worlds End Tavern"
+#define GOSSIP_TEXT_BANKSCYERS "Scyers bank"
+#define GOSSIP_TEXT_BANKALDOR "Aldor Bank"
+#define GOSSIP_TEXT_INNSCYERS "Scyers Inn"
+#define GOSSIP_TEXT_INNALDOR "Aldor Inn"
+#define GOSSIP_TEXT_STABLESCYERS "Scyers Stable"
+#define GOSSIP_TEXT_STABLEALDOR "Aldor Stable"
+#define GOSSIP_TEXT_BATTLEMASTERALLIANCE "Alliance Battlemasters"
+#define GOSSIP_TEXT_BATTLEMASTERHORDE "Horde Battlemasters"
+#define GOSSIP_TEXT_BATTLEMASTERARENA "Arena Battlemasters"
+#define GOSSIP_TEXT_MANALOOM "Mana Loom"
+#define GOSSIP_TEXT_ALCHEMYLAB "Alchemy Lab"
+#define GOSSIP_TEXT_GEMMERCHANT "Gem Merchant"
+#define GOSSIP_TEXT_GEMSCYERS "Scyers Gem Merchant"
+#define GOSSIP_TEXT_GEMALDOR "Aldor Gem Merchant"
+
+#define GOSSIP_TEXT_AH_SILVERMOON_1 "Western Auction House"
+#define GOSSIP_TEXT_AH_SILVERMOON_2 "Royal Exchange Auction House"
+
+#define GOSSIP_TEXT_INN_SILVERMOON_1 "Silvermoon City Inn"
+#define GOSSIP_TEXT_INN_SILVERMOON_2 "Wayfarer's Rest tavern"
+
+/*******************************************************
+ * guard_azuremyst start
+ *******************************************************/
+
+bool GossipHello_guard_azuremyst(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(10066, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_POI(-3918.95, -11544.7, 7, 6, 0, "Bank");
+ pPlayer->SEND_GOSSIP_MENU(10067, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hippogryph Master
+ pPlayer->SEND_POI(-4057.15, -11788.6, 7, 6, 0, "Stephanos");
+ pPlayer->SEND_GOSSIP_MENU(10071, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_POI(-4092.43, -11626.6, 7, 6, 0, "Funaam");
+ pPlayer->SEND_GOSSIP_MENU(10073, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(-4129.43, -12469, 7, 6, 0, "Caregiver Chellan");
+ pPlayer->SEND_GOSSIP_MENU(10074, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master
+ pPlayer->SEND_POI(-4146.42, -12492.7, 7, 6, 0, "Esbina");
+ pPlayer->SEND_GOSSIP_MENU(10075, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(10076, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 14);
+ pPlayer->SEND_GOSSIP_MENU(10087, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(-4274.81, -11495.3, 7, 6, 0, "Shalannius");
+ pPlayer->SEND_GOSSIP_MENU(10077, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(-4203.65, -12526.5, 7, 6, 0, "Acteon");
+ pPlayer->SEND_GOSSIP_MENU(10078, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Mage
+ pPlayer->SEND_POI(-4149.62, -12530.1, 7, 6, 0, "Semid");
+ pPlayer->SEND_GOSSIP_MENU(10081, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Paladin
+ pPlayer->SEND_POI(-4138.98, -12468.5, 7, 6, 0, "Tullas");
+ pPlayer->SEND_GOSSIP_MENU(10083, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Priest
+ pPlayer->SEND_POI(-4131.66, -12478.6, 7, 6, 0, "Guvan");
+ pPlayer->SEND_GOSSIP_MENU(10084, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Shaman
+ pPlayer->SEND_POI(-4162.33, -12456.1, 7, 6, 0, "Tuluun");
+ pPlayer->SEND_GOSSIP_MENU(10085, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warrior
+ pPlayer->SEND_POI(-4165.05, -12536.4, 7, 6, 0, "Ruada");
+ pPlayer->SEND_GOSSIP_MENU(10086, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-4191.15, -12470, 7, 6, 0, "Daedal");
+ pPlayer->SEND_GOSSIP_MENU(10088, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-4726.29, -12387, 7, 6, 0, "Blacksmith Calypso");
+ pPlayer->SEND_GOSSIP_MENU(10089, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-4710.87, -12400.6, 7, 6, 0, "'Cookie' McWeaksauce");
+ pPlayer->SEND_GOSSIP_MENU(10090, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-3882.85, -11496.7, 7, 6, 0, "Nahogg");
+ pPlayer->SEND_GOSSIP_MENU(10091, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(-4157.57, -12470.2, 7, 6, 0, "Artificer Daelo");
+ pPlayer->SEND_GOSSIP_MENU(10092, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(-4199.11, -12469.9, 7, 6, 0, "Anchorite Fateema");
+ pPlayer->SEND_GOSSIP_MENU(10093, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-4266.38, -12985.1, 7, 6, 0, "Diktynna");
+ pPlayer->SEND_GOSSIP_MENU(10094, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_GOSSIP_MENU(10095, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(-3881.63, -11488.59, 7, 6, 0, "Thoth");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Jewelcrafting
+ pPlayer->SEND_POI(-3781.55, -11541.8, 7, 6, 0, "Farii");
+ pPlayer->SEND_GOSSIP_MENU(10096, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Leatherworking
+ pPlayer->SEND_POI(-3442.68, -12322.2, 7, 6, 0, "Moordo");
+ pPlayer->SEND_GOSSIP_MENU(10098, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Mining
+ pPlayer->SEND_POI(-4179.89, -12493.1, 7, 6, 0, "Dulvi");
+ pPlayer->SEND_GOSSIP_MENU(10097, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Skinning
+ pPlayer->SEND_POI(-3431.17, -12316.5, 7, 6, 0, "Gurf");
+ pPlayer->SEND_GOSSIP_MENU(10098, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 14: //Tailoring
+ pPlayer->SEND_POI(-4711.54, -12386.7, 7, 6, 0, "Erin Kelly");
+ pPlayer->SEND_GOSSIP_MENU(10099, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_azuremyst(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_azuremyst(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_azuremyst(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_azuremyst end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_azuremyst(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_bluffwatcher start
+ *******************************************************/
+
+bool GossipHello_guard_bluffwatcher(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(3543, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_POI(-1257.8, 24.14, 7, 6, 0, "Thunder Bluff Bank");
+ pPlayer->SEND_GOSSIP_MENU(1292, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Wind master
+ pPlayer->SEND_POI(-1196.43, 28.26, 7, 6, 0, "Wind Rider Roost");
+ pPlayer->SEND_GOSSIP_MENU(1293, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_POI(-1296.5, 127.57, 7, 6, 0, "Thunder Bluff Civic Information");
+ pPlayer->SEND_GOSSIP_MENU(1291, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(-1296, 39.7, 7, 6, 0, "Thunder Bluff Inn");
+ pPlayer->SEND_GOSSIP_MENU(3153, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox
+ pPlayer->SEND_POI(-1263.59, 44.36, 7, 6, 0, "Thunder Bluff Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(3154, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Auction House
+ pPlayer->SEND_POI(1381.77, -4371.16, 7, 6, 0, GOSSIP_TEXT_AUCTIONHOUSE);
+ pPlayer->SEND_GOSSIP_MENU(3155, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Weapon master
+ pPlayer->SEND_POI(-1282.31, 89.56, 7, 6, 0, "Ansekhwa");
+ pPlayer->SEND_GOSSIP_MENU(4520, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Stable master
+ pPlayer->SEND_POI(-1270.19, 48.84, 7, 6, 0, "Bulrug");
+ pPlayer->SEND_GOSSIP_MENU(5977, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(7527, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->SEND_GOSSIP_MENU(3542, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->SEND_GOSSIP_MENU(3541, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(-1387.82, -97.55, 7, 6, 0, "Taim Ragetotem");
+ pPlayer->SEND_GOSSIP_MENU(7522, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(-997, 214.12, 7, 6, 0, "Martin Lindsey");
+ pPlayer->SEND_GOSSIP_MENU(7648, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //WSG
+ pPlayer->SEND_POI(-1384.94, -75.91, 7, 6, 0, "Kergul Bloodaxe");
+ pPlayer->SEND_GOSSIP_MENU(7523, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(-1054.47, -285, 7, 6, 0, "Hall of Elders");
+ pPlayer->SEND_GOSSIP_MENU(1294, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(-1416.32, -114.28, 7, 6, 0, "Hunter's Hall");
+ pPlayer->SEND_GOSSIP_MENU(1295, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Mage
+ pPlayer->SEND_POI(-1061.2, 195.5, 7, 6, 0, "Pools of Vision");
+ pPlayer->SEND_GOSSIP_MENU(1296, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Priest
+ pPlayer->SEND_POI(-1061.2, 195.5, 7, 6, 0, "Pools of Vision");
+ pPlayer->SEND_GOSSIP_MENU(1297, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Shaman
+ pPlayer->SEND_POI(-989.54, 278.25, 7, 6, 0, "Hall of Spirits");
+ pPlayer->SEND_GOSSIP_MENU(1298, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Warrior
+ pPlayer->SEND_POI(-1416.32, -114.28, 7, 6, 0, "Hunter's Hall");
+ pPlayer->SEND_GOSSIP_MENU(1299, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-1085.56, 27.29, 7, 6, 0, "Bena's Alchemy");
+ pPlayer->SEND_GOSSIP_MENU(1332, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-1239.75, 104.88, 7, 6, 0, "Karn's Smithy");
+ pPlayer->SEND_GOSSIP_MENU(1333, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-1214.5, -21.23, 7, 6, 0, "Aska's Kitchen");
+ pPlayer->SEND_GOSSIP_MENU(1334, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-1112.65, 48.26, 7, 6, 0, "Dawnstrider Enchanters");
+ pPlayer->SEND_GOSSIP_MENU(1335, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //First Aid
+ pPlayer->SEND_POI(-996.58, 200.5, 7, 6, 0, "Spiritual Healing");
+ pPlayer->SEND_GOSSIP_MENU(1336, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Fishing
+ pPlayer->SEND_POI(-1169.35, -68.87, 7, 6, 0, "Mountaintop Bait & Tackle");
+ pPlayer->SEND_GOSSIP_MENU(1337, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism
+ pPlayer->SEND_POI(-1137.7, -1.51, 7, 6, 0, "Holistic Herbalism");
+ pPlayer->SEND_GOSSIP_MENU(1338, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Inscription
+ pPlayer->SEND_POI(-1000.26, 209.52, 7, 6, 0, "Poshken Hardbinder");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking
+ pPlayer->SEND_POI(-1156.22, 66.86, 7, 6, 0, "Thunder Bluff Armorers");
+ pPlayer->SEND_GOSSIP_MENU(1339, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Mining
+ pPlayer->SEND_POI(-1249.17, 155, 7, 6, 0, "Stonehoof Geology");
+ pPlayer->SEND_GOSSIP_MENU(1340, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Skinning
+ pPlayer->SEND_POI(-1148.56, 51.18, 7, 6, 0, "Mooranta");
+ pPlayer->SEND_GOSSIP_MENU(1343, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring
+ pPlayer->SEND_POI(-1156.22, 66.86, 7, 6, 0, "Thunder Bluff Armorers");
+ pPlayer->SEND_GOSSIP_MENU(1341, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_bluffwatcher end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_bluffwatcher(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_contested start
+ *******************************************************/
+
+CreatureAI* GetAI_guard_contested(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+/*******************************************************
+ * guard_contested end
+ *******************************************************/
+
+/*******************************************************
+ * guard_darnassus start
+ *******************************************************/
+
+bool GossipHello_guard_darnassus(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(3016, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Auction house
+ pPlayer->SEND_POI(9861.23, 2334.55, 7, 6, 0, "Darnassus Auction House");
+ pPlayer->SEND_GOSSIP_MENU(3833, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(9938.45, 2512.35, 7, 6, 0, "Darnassus Bank");
+ pPlayer->SEND_GOSSIP_MENU(3017, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Wind master
+ pPlayer->SEND_POI(9945.65, 2618.94, 7, 6, 0, "Rut'theran Village");
+ pPlayer->SEND_GOSSIP_MENU(3018, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Guild master
+ pPlayer->SEND_POI(10076.40, 2199.59, 7, 6, 0, "Darnassus Guild Master");
+ pPlayer->SEND_GOSSIP_MENU(3019, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Inn
+ pPlayer->SEND_POI(10133.29, 2222.52, 7, 6, 0, "Darnassus Inn");
+ pPlayer->SEND_GOSSIP_MENU(3020, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Mailbox
+ pPlayer->SEND_POI(9942.17, 2495.48, 7, 6, 0, "Darnassus Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(3021, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Stable master
+ pPlayer->SEND_POI(10167.20, 2522.66, 7, 6, 0, "Alassin");
+ pPlayer->SEND_GOSSIP_MENU(5980, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Weapon trainer
+ pPlayer->SEND_POI(9907.11, 2329.70, 7, 6, 0, "Ilyenia Moonfire");
+ pPlayer->SEND_GOSSIP_MENU(4517, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(7519, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->SEND_GOSSIP_MENU(4264, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->SEND_GOSSIP_MENU(4273, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(9923.61, 2327.43, 7, 6, 0, "Brogun Stoneshield");
+ pPlayer->SEND_GOSSIP_MENU(7518, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(9977.37, 2324.39, 7, 6, 0, "Keras Wolfheart");
+ pPlayer->SEND_GOSSIP_MENU(7651, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //WSG
+ pPlayer->SEND_POI(9979.84, 2315.79, 7, 6, 0, "Aethalas");
+ pPlayer->SEND_GOSSIP_MENU(7482, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(10186, 2570.46, 7, 6, 0, "Darnassus Druid Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3024, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(10177.29, 2511.10, 7, 6, 0, "Darnassus Hunter Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3023, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Priest
+ pPlayer->SEND_POI(9659.12, 2524.88, 7, 6, 0, "Temple of the Moon");
+ pPlayer->SEND_GOSSIP_MENU(3025, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Rogue
+ pPlayer->SEND_POI(10122, 2599.12, 7, 6, 0, "Darnassus Rogue Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3026, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Warrior
+ pPlayer->SEND_POI(9951.91, 2280.38, 7, 6, 0, "Warrior's Terrace");
+ pPlayer->SEND_GOSSIP_MENU(3033, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(10075.90, 2356.76, 7, 6, 0, "Darnassus Alchemy Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3035, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Cooking
+ pPlayer->SEND_POI(10088.59, 2419.21, 7, 6, 0, "Darnassus Cooking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3036, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Enchanting
+ pPlayer->SEND_POI(10146.09, 2313.42, 7, 6, 0, "Darnassus Enchanting Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3337, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //First Aid
+ pPlayer->SEND_POI(10150.09, 2390.43, 7, 6, 0, "Darnassus First Aid Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3037, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Fishing
+ pPlayer->SEND_POI(9836.20, 2432.17, 7, 6, 0, "Darnassus Fishing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3038, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Herbalism
+ pPlayer->SEND_POI(9757.17, 2430.16, 7, 6, 0, "Darnassus Herbalism Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3039, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Inscription
+ pPlayer->SEND_POI(10139.00, 2343.31, 7, 6, 0, "Feyden Darkin");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Leatherworking
+ pPlayer->SEND_POI(10086.59, 2255.77, 7, 6, 0, "Darnassus Leatherworking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3040, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Skinning
+ pPlayer->SEND_POI(10081.40, 2257.18, 7, 6, 0, "Darnassus Skinning Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3042, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Tailoring
+ pPlayer->SEND_POI(10079.70, 2268.19, 7, 6, 0, "Darnassus Tailor");
+ pPlayer->SEND_GOSSIP_MENU(3044, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_darnassus(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_darnassus(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_darnassus(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_darnassus(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_darnassus end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_darnassus(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_dunmorogh start
+ *******************************************************/
+
+bool GossipHello_guard_dunmorogh(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(4287, pCreature->GetGUID());
+
+ return true;
+}
+
+void SendDefaultMenu_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_GOSSIP_MENU(4288, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Gryphon master
+ pPlayer->SEND_GOSSIP_MENU(4289, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_GOSSIP_MENU(4290, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(-5582.66, -525.89, 7, 6, 0, "Thunderbrew Distillery");
+ pPlayer->SEND_GOSSIP_MENU(4291, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master
+ pPlayer->SEND_POI(-5604, -509.58, 7, 6, 0, "Shelby Stoneflint");
+ pPlayer->SEND_GOSSIP_MENU(5985, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(4292, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(4300, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Hunter
+ pPlayer->SEND_POI(-5618.29, -454.25, 7, 6, 0, "Grif Wildheart");
+ pPlayer->SEND_GOSSIP_MENU(4293, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Mage
+ pPlayer->SEND_POI(-5585.6, -539.99, 7, 6, 0, "Magis Sparkmantle");
+ pPlayer->SEND_GOSSIP_MENU(4294, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Paladin
+ pPlayer->SEND_POI(-5585.6, -539.99, 7, 6, 0, "Azar Stronghammer");
+ pPlayer->SEND_GOSSIP_MENU(4295, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Priest
+ pPlayer->SEND_POI(-5591.74, -525.61, 7, 6, 0, "Maxan Anvol");
+ pPlayer->SEND_GOSSIP_MENU(4296, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Rogue
+ pPlayer->SEND_POI(-5602.75, -542.4, 7, 6, 0, "Hogral Bakkan");
+ pPlayer->SEND_GOSSIP_MENU(4297, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Warlock
+ pPlayer->SEND_POI(-5641.97, -523.76, 7, 6, 0, "Gimrizz Shadowcog");
+ pPlayer->SEND_GOSSIP_MENU(4298, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warrior
+ pPlayer->SEND_POI(-5604.79, -529.38, 7, 6, 0, "Granis Swiftaxe");
+ pPlayer->SEND_GOSSIP_MENU(4299, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_GOSSIP_MENU(4301, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-5584.72, -428.41, 7, 6, 0, "Tognus Flintfire");
+ pPlayer->SEND_GOSSIP_MENU(4302, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-5596.85, -541.43, 7, 6, 0, "Gremlock Pilsnor");
+ pPlayer->SEND_GOSSIP_MENU(4303, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_GOSSIP_MENU(4304, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(-5531, -666.53, 7, 6, 0, "Bronk Guzzlegear");
+ pPlayer->SEND_GOSSIP_MENU(4305, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(-5603.67, -523.57, 7, 6, 0, "Thamner Pol");
+ pPlayer->SEND_GOSSIP_MENU(4306, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-5199.9, 58.58, 7, 6, 0, "Paxton Ganter");
+ pPlayer->SEND_GOSSIP_MENU(4307, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_GOSSIP_MENU(4308, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_GOSSIP_MENU(30001, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_GOSSIP_MENU(4310, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Mining
+ pPlayer->SEND_POI(-5531, -666.53, 7, 6, 0, "Yarr Hamerstone");
+ pPlayer->SEND_GOSSIP_MENU(4311, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_GOSSIP_MENU(4312, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_GOSSIP_MENU(4313, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_dunmorogh(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_dunmorogh(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_dunmorogh(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_dunmorogh end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_dunmorogh(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_durotar start
+ *******************************************************/
+
+bool GossipHello_guard_durotar(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->SEND_GOSSIP_MENU(4037, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_GOSSIP_MENU(4032, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Wind rider
+ pPlayer->SEND_GOSSIP_MENU(4033, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->SEND_POI(338.7, -4688.87, 7, 6, 0, "Razor Hill Inn");
+ pPlayer->SEND_GOSSIP_MENU(4034, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Stable master
+ pPlayer->SEND_POI(330.31, -4710.66, 7, 6, 0, "Shoja'my");
+ pPlayer->SEND_GOSSIP_MENU(5973, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(4035, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(4036, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Hunter
+ pPlayer->SEND_POI(276, -4706.72, 7, 6, 0, "Thotar");
+ pPlayer->SEND_GOSSIP_MENU(4013, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Mage
+ pPlayer->SEND_POI(-839.33, -4935.6, 7, 6, 0, "Un'Thuwa");
+ pPlayer->SEND_GOSSIP_MENU(4014, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Priest
+ pPlayer->SEND_POI(296.22, -4828.1, 7, 6, 0, "Tai'jin");
+ pPlayer->SEND_GOSSIP_MENU(4015, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Rogue
+ pPlayer->SEND_POI(265.76, -4709, 7, 6, 0, "Kaplak");
+ pPlayer->SEND_GOSSIP_MENU(4016, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Shaman
+ pPlayer->SEND_POI(307.79, -4836.97, 7, 6, 0, "Swart");
+ pPlayer->SEND_GOSSIP_MENU(4017, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Warlock
+ pPlayer->SEND_POI(355.88, -4836.45, 7, 6, 0, "Dhugru Gorelust");
+ pPlayer->SEND_GOSSIP_MENU(4018, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warrior
+ pPlayer->SEND_POI(312.3, -4824.66, 7, 6, 0, "Tarshaw Jaggedscar");
+ pPlayer->SEND_GOSSIP_MENU(4019, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-800.25, -4894.33, 7, 6, 0, "Miao'zan");
+ pPlayer->SEND_GOSSIP_MENU(4020, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(373.24, -4716.45, 7, 6, 0, "Dwukk");
+ pPlayer->SEND_GOSSIP_MENU(4021, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_GOSSIP_MENU(4022, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_GOSSIP_MENU(4023, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(368.95, -4723.95, 7, 6, 0, "Mukdrak");
+ pPlayer->SEND_GOSSIP_MENU(4024, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(327.17, -4825.62, 7, 6, 0, "Rawrk");
+ pPlayer->SEND_GOSSIP_MENU(4025, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-1065.48, -4777.43, 7, 6, 0, "Lau'Tiki");
+ pPlayer->SEND_GOSSIP_MENU(4026, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(-836.25, -4896.89, 7, 6, 0, "Mishiki");
+ pPlayer->SEND_GOSSIP_MENU(4027, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking
+ pPlayer->SEND_GOSSIP_MENU(4028, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Mining
+ pPlayer->SEND_POI(366.94, -4705, 7, 6, 0, "Krunn");
+ pPlayer->SEND_GOSSIP_MENU(4029, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Skinning
+ pPlayer->SEND_GOSSIP_MENU(4030, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring
+ pPlayer->SEND_GOSSIP_MENU(4031, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_durotar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_durotar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_durotar(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_durotar end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_durotar(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_elwynnforest start
+ *******************************************************/
+
+bool GossipHello_guard_elwynnforest(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GRYPHON , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(933, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_GOSSIP_MENU(4260, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Gryphon master
+ pPlayer->SEND_GOSSIP_MENU(4261, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_GOSSIP_MENU(4262, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(-9459.34, 42.08, 7, 6, 0, "Lion's Pride Inn");
+ pPlayer->SEND_GOSSIP_MENU(4263, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master
+ pPlayer->SEND_POI(-9466.62, 45.87, 7, 6, 0, "Erma");
+ pPlayer->SEND_GOSSIP_MENU(5983, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->SEND_GOSSIP_MENU(4264, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->SEND_GOSSIP_MENU(4273, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_GOSSIP_MENU(4265, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_GOSSIP_MENU(4266, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Mage
+ pPlayer->SEND_POI(-9471.12, 33.44, 7, 6, 0, "Zaldimar Wefhellt");
+ pPlayer->SEND_GOSSIP_MENU(4268, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Paladin
+ pPlayer->SEND_POI(-9469, 108.05, 7, 6, 0, "Brother Wilhelm");
+ pPlayer->SEND_GOSSIP_MENU(4269, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Priest
+ pPlayer->SEND_POI(-9461.07, 32.6, 7, 6, 0, "Priestess Josetta");
+ pPlayer->SEND_GOSSIP_MENU(4267, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Rogue
+ pPlayer->SEND_POI(-9465.13, 13.29, 7, 6, 0, "Keryn Sylvius");
+ pPlayer->SEND_GOSSIP_MENU(4270, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warlock
+ pPlayer->SEND_POI(-9473.21, -4.08, 7, 6, 0, "Maximillian Crowe");
+ pPlayer->SEND_GOSSIP_MENU(4272, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Warrior
+ pPlayer->SEND_POI(-9461.82, 109.50, 7, 6, 0, "Lyria Du Lac");
+ pPlayer->SEND_GOSSIP_MENU(4271, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-9057.04, 153.63, 7, 6, 0, "Alchemist Mallory");
+ pPlayer->SEND_GOSSIP_MENU(4274, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-9456.58, 87.90, 7, 6, 0, "Smith Argus");
+ pPlayer->SEND_GOSSIP_MENU(4275, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-9467.54, -3.16, 7, 6, 0, "Tomas");
+ pPlayer->SEND_GOSSIP_MENU(4276, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_GOSSIP_MENU(4277, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_GOSSIP_MENU(4278, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(-9456.82, 30.49, 7, 6, 0, "Michelle Belle");
+ pPlayer->SEND_GOSSIP_MENU(4279, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-9386.54, -118.73, 7, 6, 0, "Lee Brown");
+ pPlayer->SEND_GOSSIP_MENU(4280, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(-9060.70, 149.23, 7, 6, 0, "Herbalist Pomeroy");
+ pPlayer->SEND_GOSSIP_MENU(4281, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(-8862.50, 875.19, 7, 6, 0, "Catarina Stanford");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_POI(-9376.12, -75.23, 7, 6, 0, "Adele Fielder");
+ pPlayer->SEND_GOSSIP_MENU(4282, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Mining
+ pPlayer->SEND_GOSSIP_MENU(4283, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_POI(-9536.91, -1212.76, 7, 6, 0, "Helene Peltskinner");
+ pPlayer->SEND_GOSSIP_MENU(4284, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_POI(-9376.12, -75.23, 7, 6, 0, "Eldrin");
+ pPlayer->SEND_GOSSIP_MENU(4285, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_elwynnforest(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_elwynnforest(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_elwynnforest(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_elwynnforest end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_elwynnforest(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_eversong start
+ *******************************************************/
+
+bool GossipHello_guard_eversong(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATHANDLER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->SEND_GOSSIP_MENU(10180, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bat Handler
+ pPlayer->SEND_POI(9371.93, -7164.80, 7, 6, 0, "Skymistress Gloaming");
+ pPlayer->SEND_GOSSIP_MENU(10181, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Guild master
+ pPlayer->SEND_GOSSIP_MENU(10182, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->SEND_POI(9483.74, -6844.58, 7, 6, 0, "Delaniel's inn");
+ pPlayer->SEND_GOSSIP_MENU(10183, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Stable Master
+ pPlayer->SEND_POI(9489.62, -6829.93, 7, 6, 0, "Anathos");
+ pPlayer->SEND_GOSSIP_MENU(10184, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(10180, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(10180, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_GOSSIP_MENU(10185, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(9527.44, -6865.25, 7, 6, 0, "Hannovia");
+ pPlayer->SEND_GOSSIP_MENU(10186, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Mage
+ pPlayer->SEND_POI(9464.24, -6855.52, 7, 6, 0, "Garridel");
+ pPlayer->SEND_GOSSIP_MENU(10187, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Paladin
+ pPlayer->SEND_POI(9517.61, -6871.04, 7, 6, 0, "Noellene");
+ pPlayer->SEND_GOSSIP_MENU(10189, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Priest
+ pPlayer->SEND_POI(9467.39, -6845.72, 7, 6, 0, "Ponaris");
+ pPlayer->SEND_GOSSIP_MENU(10190, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Rogue
+ pPlayer->SEND_POI(9533.67, -6877.39, 7, 6, 0, "Tannaria");
+ pPlayer->SEND_GOSSIP_MENU(10191, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warlock
+ pPlayer->SEND_POI(9468.99, -6865.60, 7, 6, 0, "Celoenus");
+ pPlayer->SEND_GOSSIP_MENU(10192, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(8659.90, -6368.12, 7, 6, 0, "Arcanist Sheynathren");
+ pPlayer->SEND_GOSSIP_MENU(10193, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(8984.21, -7419.21, 7, 6, 0, "Arathel Sunforge");
+ pPlayer->SEND_GOSSIP_MENU(10194, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(9494.04, -6881.51, 7, 6, 0, "Quarelestra");
+ pPlayer->SEND_GOSSIP_MENU(10195, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Engineering
+ pPlayer->SEND_GOSSIP_MENU(10197, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //First Aid
+ pPlayer->SEND_POI(9479.46, -6879.16, 7, 6, 0, "Kanaria");
+ pPlayer->SEND_GOSSIP_MENU(10198, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Fishing
+ pPlayer->SEND_GOSSIP_MENU(10199, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism
+ pPlayer->SEND_POI(8678.92, -6329.09, 7, 6, 0, "Botanist Tyniarrel");
+ pPlayer->SEND_GOSSIP_MENU(10200, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Inscription
+ pPlayer->SEND_POI(9959.29, -7248.38, 7, 6, 0, "Zantasia");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Jewelcrafting
+ pPlayer->SEND_POI(9484.32, -6874.98, 7, 6, 0, "Aleinia");
+ pPlayer->SEND_GOSSIP_MENU(10203, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_POI(9362.04, -7130.33, 7, 6, 0, "Sathein");
+ pPlayer->SEND_GOSSIP_MENU(10204, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Mining
+ pPlayer->SEND_GOSSIP_MENU(10205, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_POI(9362.04, -7130.33, 7, 6, 0, "Mathreyn");
+ pPlayer->SEND_GOSSIP_MENU(10206, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_POI(8680.36, -6327.51, 7, 6, 0, "Sempstress Ambershine");
+ pPlayer->SEND_GOSSIP_MENU(10207, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_eversong(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_eversong(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_eversong(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_eversong end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_eversong(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_exodar start
+ *******************************************************/
+
+bool GossipHello_guard_exodar(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(9551, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Auction house
+ pPlayer->SEND_POI(-4023.6, -11739.3, 7, 6, 0, "Exodar Auction House");
+ pPlayer->SEND_GOSSIP_MENU(9528, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(-3923.89, -11544.5, 7, 6, 0, "Exodar Bank");
+ pPlayer->SEND_GOSSIP_MENU(9529, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_POI(-4092.57, -11626.5, 7, 6, 0, "Exodar Guild Master");
+ pPlayer->SEND_GOSSIP_MENU(9539, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Hippogryph master
+ pPlayer->SEND_POI(-4060.46, -11787.1, 7, 6, 0, "Exodar Hippogryph Master");
+ pPlayer->SEND_GOSSIP_MENU(9530, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Inn
+ pPlayer->SEND_POI(-3741.87, -11695.1, 7, 6, 0, "Exodar Inn");
+ pPlayer->SEND_GOSSIP_MENU(9545, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Mailbox
+ pPlayer->SEND_POI(-3972.5, -11696.0, 7, 6, 0, "Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(10254, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Stable master
+ pPlayer->SEND_POI(-3786.5, -11702.5, 7, 6, 0, "Stable Master Arthaid");
+ pPlayer->SEND_GOSSIP_MENU(9558, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Weapon trainer
+ pPlayer->SEND_POI(-4215.68, -11628.9, 7, 6, 0, "Weapon Master Handiir");
+ pPlayer->SEND_GOSSIP_MENU(9565, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_EYEOFTHESTORM , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(9533, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 14);
+ pPlayer->SEND_GOSSIP_MENU(9555, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(-3978.1, -11357, 7, 6, 0, "Alterac Valley Battlemaster");
+ pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(-3998.9, -11345.2, 7, 6, 0, "Arathi Basin Battlemaster");
+ pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //A
+ pPlayer->SEND_POI(-3759.27, -11695.63, 7, 6, 0, "Miglik Blotstrom");
+ pPlayer->SEND_GOSSIP_MENU(10223, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //EOS
+ pPlayer->SEND_POI(-3978.1, -11357, 7, 6, 0, "Eye Of The Storm Battlemaster");
+ pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //WSG
+ pPlayer->SEND_POI(-3977.5, -11381.2, 7, 6, 0, "Warsong Gulch Battlemaster");
+ pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(-4276.0, -11495, 7, 6, 0, "Exodar Druid Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9534, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(-4210.6, -11575.2, 7, 6, 0, "Exodar Hunter Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9544, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Mage
+ pPlayer->SEND_POI(-4057.32, -11556.5, 7, 6, 0, "Exodar Mage Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9550, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Paladin
+ pPlayer->SEND_POI(-4191.2, -11470.4, 7, 6, 0, "Exodar Paladin Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9553, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Priest
+ pPlayer->SEND_POI(-3969.63, -11482.8, 7, 6, 0, "Exodar Priest Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9554, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Shaman
+ pPlayer->SEND_POI(-3805.5, -11380.7, 7, 6, 0, "Exodar Shaman Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9556, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warrior
+ pPlayer->SEND_POI(-4189.43, -11653.7, 7, 6, 0, "Exodar Warrior Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9562, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-4040.6, -11364.5, 7, 6, 0, "Exodar Alchemy Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9527, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-4229.5, -11706, 7, 6, 0, "Exodar Blacksmithing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9532, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-3798.3, -11651.7, 7, 6, 0, "Exodar Cooking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9551, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-3889.3, -11495, 7, 6, 0, "Exodar Enchanting Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9535, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(-4257.68, -11640.3, 7, 6, 0, "Exodar Engineering Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9536, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(-3769.5, -11479.6, 7, 6, 0, "Exodar First Aid Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9537, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-3725.5, -11385.2, 7, 6, 0, "Exodar Fishing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9538, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(-4040.6, -11364.5, 7, 6, 0, "Exodar Herbalist Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9543, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(-3881.63, -11488.59, 7, 6, 0, "Thoth");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Jewelcrafting
+ pPlayer->SEND_POI(-3783, -11546, 7, 6, 0, "Exodar Jewelcrafting Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9547, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Leatherworking
+ pPlayer->SEND_POI(-4140.6, -11776.7, 7, 6, 0, "Exodar Leatherworking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9549, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Mining
+ pPlayer->SEND_POI(-4228, -11697, 7, 6, 0, "Exodar Mining Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9552, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Skinning
+ pPlayer->SEND_POI(-4134.97, -11760.5, 7, 6, 0, "Exodar Skinning Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9557, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 14: //Tailoring
+ pPlayer->SEND_POI(-4092.5, -11744.5, 7, 6, 0, "Exodar Tailor Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9559, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_exodar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_exodar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_exodar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_exodar(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_exodar end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_exodar(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_ironforge start
+ *******************************************************/
+
+bool GossipHello_guard_ironforge(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_IRONFORGE_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DEEPRUNTRAM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GRYPHON , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->SEND_GOSSIP_MENU(2760, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Auction House
+ pPlayer->SEND_POI(-4957.39, -911.6, 7, 6, 0, "Ironforge Auction House");
+ pPlayer->SEND_GOSSIP_MENU(3014, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(-4891.91, -991.47, 7, 6, 0, "The Vault");
+ pPlayer->SEND_GOSSIP_MENU(2761, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Tram
+ pPlayer->SEND_POI(-4835.27, -1294.69, 7, 6, 0, "Deeprun Tram");
+ pPlayer->SEND_GOSSIP_MENU(3814, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Gryphon Master
+ pPlayer->SEND_POI(-4821.52, -1152.3, 7, 6, 0, "Ironforge Gryphon Master");
+ pPlayer->SEND_GOSSIP_MENU(2762, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Guild Master
+ pPlayer->SEND_POI(-5021, -996.45, 7, 6, 0, "Ironforge Visitor's Center");
+ pPlayer->SEND_GOSSIP_MENU(2764, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Inn
+ pPlayer->SEND_POI(-4850.47, -872.57, 7, 6, 0, "Stonefire Tavern");
+ pPlayer->SEND_GOSSIP_MENU(2768, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Mailbox
+ pPlayer->SEND_POI(-4845.7, -880.55, 7, 6, 0, "Ironforge Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(2769, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Stable Master
+ pPlayer->SEND_POI(-5010.2, -1262, 7, 6, 0, "Ulbrek Firehand");
+ pPlayer->SEND_GOSSIP_MENU(5986, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Weapons Trainer
+ pPlayer->SEND_POI(-5040, -1201.88, 7, 6, 0, "Bixi and Buliwyf");
+ pPlayer->SEND_GOSSIP_MENU(4518, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(7529, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Class Trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->SEND_GOSSIP_MENU(2766, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Profession Trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(2793, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(-5047.87, -1263.77, 7, 6, 0, "Glordrum Steelbeard");
+ pPlayer->SEND_GOSSIP_MENU(7483, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(-5038.37, -1266.39, 7, 6, 0, "Donal Osgood");
+ pPlayer->SEND_GOSSIP_MENU(7649, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //WSG
+ pPlayer->SEND_POI(-5037.24, -1274.82, 7, 6, 0, "Lylandris");
+ pPlayer->SEND_GOSSIP_MENU(7528, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Hunter
+ pPlayer->SEND_POI(-5023, -1253.68, 7, 6, 0, "Hall of Arms");
+ pPlayer->SEND_GOSSIP_MENU(2770, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Mage
+ pPlayer->SEND_POI(-4627, -926.45, 7, 6, 0, "Hall of Mysteries");
+ pPlayer->SEND_GOSSIP_MENU(2771, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Paladin
+ pPlayer->SEND_POI(-4627.02, -926.45, 7, 6, 0, "Hall of Mysteries");
+ pPlayer->SEND_GOSSIP_MENU(2773, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Priest
+ pPlayer->SEND_POI(-4627, -926.45, 7, 6, 0, "Hall of Mysteries");
+ pPlayer->SEND_GOSSIP_MENU(2772, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Rogue
+ pPlayer->SEND_POI(-4647.83, -1124, 7, 6, 0, "Ironforge Rogue Trainer");
+ pPlayer->SEND_GOSSIP_MENU(2774, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Warlock
+ pPlayer->SEND_POI(-4605, -1110.45, 7, 6, 0, "Ironforge Warlock Trainer");
+ pPlayer->SEND_GOSSIP_MENU(2775, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warrior
+ pPlayer->SEND_POI(-5023.08, -1253.68, 7, 6, 0, "Hall of Arms");
+ pPlayer->SEND_GOSSIP_MENU(2776, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Shaman
+ pPlayer->SEND_POI(-4732, -1147, 7, 6, 0, "Ironforge Shaman Trainer");
+ //incorrect id
+ pPlayer->SEND_GOSSIP_MENU(2766, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-4858.5, -1241.83, 7, 6, 0, "Berryfizz's Potions and Mixed Drinks");
+ pPlayer->SEND_GOSSIP_MENU(2794, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-4796.97, -1110.17, 7, 6, 0, "The Great Forge");
+ pPlayer->SEND_GOSSIP_MENU(2795, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-4767.83, -1184.59, 7, 6, 0, "The Bronze Kettle");
+ pPlayer->SEND_GOSSIP_MENU(2796, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-4803.72, -1196.53, 7, 6, 0, "Thistlefuzz Arcanery");
+ pPlayer->SEND_GOSSIP_MENU(2797, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(-4799.56, -1250.23, 7, 6, 0, "Springspindle's Gadgets");
+ pPlayer->SEND_GOSSIP_MENU(2798, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(-4881.6, -1153.13, 7, 6, 0, "Ironforge Physician");
+ pPlayer->SEND_GOSSIP_MENU(2799, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-4597.91, -1091.93, 7, 6, 0, "Traveling Fisherman");
+ pPlayer->SEND_GOSSIP_MENU(2800, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(-4876.9, -1151.92, 7, 6, 0, "Ironforge Physician");
+ pPlayer->SEND_GOSSIP_MENU(2801, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(-4807.02, -1194.43, 7, 6, 0, "Elise Brightletter");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_POI(-4745, -1027.57, 7, 6, 0, "Finespindle's Leather Goods");
+ pPlayer->SEND_GOSSIP_MENU(2802, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Minning
+ pPlayer->SEND_POI(-4705.06, -1116.43, 7, 6, 0, "Deepmountain Mining Guild");
+ pPlayer->SEND_GOSSIP_MENU(2804, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_POI(-4745, -1027.57, 7, 6, 0, "Finespindle's Leather Goods");
+ pPlayer->SEND_GOSSIP_MENU(2805, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_POI(-4719.60, -1056.96, 7, 6, 0, "Stonebrow's Clothier");
+ pPlayer->SEND_GOSSIP_MENU(2807, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_ironforge(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_ironforge(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_ironforge(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_ironforge(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_ironforge end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_ironforge(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_mulgore start
+ *******************************************************/
+
+bool GossipHello_guard_mulgore(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->SEND_GOSSIP_MENU(3543, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_GOSSIP_MENU(4051, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Wind rider
+ pPlayer->SEND_GOSSIP_MENU(4052, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->SEND_POI(-2361.38, -349.19, 7, 6, 0, "Bloodhoof Village Inn");
+ pPlayer->SEND_GOSSIP_MENU(4053, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Stable master
+ pPlayer->SEND_POI(-2338.86, -357.56, 7, 6, 0, "Seikwa");
+ pPlayer->SEND_GOSSIP_MENU(5976, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->SEND_GOSSIP_MENU(4069, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->SEND_GOSSIP_MENU(4070, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(-2312.15, -443.69, 7, 6, 0, "Gennia Runetotem");
+ pPlayer->SEND_GOSSIP_MENU(4054, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(-2178.14, -406.14, 7, 6, 0, "Yaw Sharpmane");
+ pPlayer->SEND_GOSSIP_MENU(4055, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Shaman
+ pPlayer->SEND_POI(-2301.5, -439.87, 7, 6, 0, "Narm Skychaser");
+ pPlayer->SEND_GOSSIP_MENU(4056, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Warrior
+ pPlayer->SEND_POI(-2345.43, -494.11, 7, 6, 0, "Krang Stonehoof");
+ pPlayer->SEND_GOSSIP_MENU(4057, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_GOSSIP_MENU(4058, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_GOSSIP_MENU(4059, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-2263.34, -287.91, 7, 6, 0, "Pyall Silentstride");
+ pPlayer->SEND_GOSSIP_MENU(4060, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_GOSSIP_MENU(4061, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //First Aid
+ pPlayer->SEND_POI(-2353.52, -355.82, 7, 6, 0, "Vira Younghoof");
+ pPlayer->SEND_GOSSIP_MENU(4062, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Fishing
+ pPlayer->SEND_POI(-2349.21, -241.37, 7, 6, 0, "Uthan Stillwater");
+ pPlayer->SEND_GOSSIP_MENU(4063, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism
+ pPlayer->SEND_GOSSIP_MENU(4064, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Inscription
+ pPlayer->SEND_GOSSIP_MENU(30001, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking
+ pPlayer->SEND_POI(-2257.12, -288.63, 7, 6, 0, "Chaw Stronghide");
+ pPlayer->SEND_GOSSIP_MENU(4065, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Mining
+ pPlayer->SEND_GOSSIP_MENU(4066, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Skinning
+ pPlayer->SEND_POI(-2252.94, -291.32, 7, 6, 0, "Yonn Deepcut");
+ pPlayer->SEND_GOSSIP_MENU(4067, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring
+ pPlayer->SEND_GOSSIP_MENU(4068, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_mulgore(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_mulgore(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_mulgore(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_mulgore end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_mulgore(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_orgrimmar start
+ *******************************************************/
+
+bool GossipHello_guard_orgrimmar(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ZEPPLINMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_OFFICERS , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(2593, pCreature->GetGUID());
+
+ return true;
+}
+
+void SendDefaultMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_POI(1631.51, -4375.33, 7, 6, 0, "Bank of Orgrimmar");
+ pPlayer->SEND_GOSSIP_MENU(2554, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //wind rider
+ pPlayer->SEND_POI(1676.6, -4332.72, 7, 6, 0, "The Sky Tower");
+ pPlayer->SEND_GOSSIP_MENU(2555, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //guild master
+ pPlayer->SEND_POI(1576.93, -4294.75, 7, 6, 0, "Horde Embassy");
+ pPlayer->SEND_GOSSIP_MENU(2556, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(1644.51, -4447.27, 7, 6, 0, "Orgrimmar Inn");
+ pPlayer->SEND_GOSSIP_MENU(2557, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //mailbox
+ pPlayer->SEND_POI(1622.53, -4388.79, 7, 6, 0, "Orgrimmar Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(2558, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //auction house
+ pPlayer->SEND_POI(1679.21, -4450.1, 7, 6, 0, "Orgrimmar Auction House");
+ pPlayer->SEND_GOSSIP_MENU(3075, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //zeppelin
+ pPlayer->SEND_POI(1337.36, -4632.7, 7, 6, 0, "Orgrimmar Zeppelin Tower");
+ pPlayer->SEND_GOSSIP_MENU(3173, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //weapon master
+ pPlayer->SEND_POI(2092.56, -4823.95, 7, 6, 0, "Sayoc & Hanashi");
+ pPlayer->SEND_GOSSIP_MENU(4519, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //stable master
+ pPlayer->SEND_POI(2133.12, -4663.93, 7, 6, 0, "Xon'cha");
+ pPlayer->SEND_GOSSIP_MENU(5974, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //officers lounge
+ pPlayer->SEND_POI(1633.56, -4249.37, 7, 6, 0, "Hall of Legends");
+ pPlayer->SEND_GOSSIP_MENU(7046, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(7521, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->SEND_GOSSIP_MENU(2599, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(2594, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave");
+ pPlayer->SEND_GOSSIP_MENU(7484, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave");
+ pPlayer->SEND_GOSSIP_MENU(7644, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //WSG
+ pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave");
+ pPlayer->SEND_GOSSIP_MENU(7520, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Hunter
+ pPlayer->SEND_POI(2114.84, -4625.31, 7, 6, 0, "Orgrimmar Hunter's Hall");
+ pPlayer->SEND_GOSSIP_MENU(2559, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Mage
+ pPlayer->SEND_POI(1451.26, -4223.33, 7, 6, 0, "Darkbriar Lodge");
+ pPlayer->SEND_GOSSIP_MENU(2560, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Priest
+ pPlayer->SEND_POI(1442.21, -4183.24, 7, 6, 0, "Spirit Lodge");
+ pPlayer->SEND_GOSSIP_MENU(2561, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Shaman
+ pPlayer->SEND_POI(1925.34, -4181.89, 7, 6, 0, "Thrall's Fortress");
+ pPlayer->SEND_GOSSIP_MENU(2562, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Rogue
+ pPlayer->SEND_POI(1773.39, -4278.97, 7, 6, 0, "Shadowswift Brotherhood");
+ pPlayer->SEND_GOSSIP_MENU(2563, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Warlock
+ pPlayer->SEND_POI(1849.57, -4359.68, 7, 6, 0, "Darkfire Enclave");
+ pPlayer->SEND_GOSSIP_MENU(2564, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warrior
+ pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave");
+ pPlayer->SEND_GOSSIP_MENU(2565, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Paladin
+ pPlayer->SEND_POI(1906.65, -4134.26, 7, 6, 0, "Valley of Wisdom");
+ pPlayer->SEND_GOSSIP_MENU(10843, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(1955.17, -4475.79, 7, 6, 0, "Yelmak's Alchemy and Potions");
+ pPlayer->SEND_GOSSIP_MENU(2497, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(2054.34, -4831.85, 7, 6, 0, "The Burning Anvil");
+ pPlayer->SEND_GOSSIP_MENU(2499, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(1780.96, -4481.31, 7, 6, 0, "Borstan's Firepit");
+ pPlayer->SEND_GOSSIP_MENU(2500, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(1917.5, -4434.95, 7, 6, 0, "Godan's Runeworks");
+ pPlayer->SEND_GOSSIP_MENU(2501, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(2038.45, -4744.75, 7, 6, 0, "Nogg's Machine Shop");
+ pPlayer->SEND_GOSSIP_MENU(2653, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(1485.21, -4160.91, 7, 6, 0, "Survival of the Fittest");
+ pPlayer->SEND_GOSSIP_MENU(2502, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(1994.15, -4655.7, 7, 6, 0, "Lumak's Fishing");
+ pPlayer->SEND_GOSSIP_MENU(2503, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(1898.61, -4454.93, 7, 6, 0, "Jandi's Arboretum");
+ pPlayer->SEND_GOSSIP_MENU(2504, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(1839.02, -4465.97, 7, 6, 0, "Jo'mah");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_POI(1852.82, -4562.31, 7, 6, 0, "Kodohide Leatherworkers");
+ pPlayer->SEND_GOSSIP_MENU(2513, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Mining
+ pPlayer->SEND_POI(2029.79, -4704, 7, 6, 0, "Red Canyon Mining");
+ pPlayer->SEND_GOSSIP_MENU(2515, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_POI(1852.82, -4562.31, 7, 6, 0, "Kodohide Leatherworkers");
+ pPlayer->SEND_GOSSIP_MENU(2516, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_POI(1802.66, -4560.66, 7, 6, 0, "Magar's Cloth Goods");
+ pPlayer->SEND_GOSSIP_MENU(2518, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_orgrimmar end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_orgrimmar(Creature* pCreature)
+{
+ return new guardAI_orgrimmar (pCreature);
+}
+
+/*******************************************************
+ * guard_shattrath start
+ *******************************************************/
+
+bool GossipHello_guard_shattrath(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAVERN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FLIGHTMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MANALOOM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMYLAB , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMMERCHANT , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID());
+
+ return true;
+}
+
+void SendDefaultMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Tavern
+ pPlayer->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern");
+ pPlayer->SEND_GOSSIP_MENU(10394, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKALDOR , GOSSIP_SENDER_SEC_BANK, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKSCYERS , GOSSIP_SENDER_SEC_BANK, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->SEND_GOSSIP_MENU(10379, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNALDOR , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNSCYERS , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->SEND_GOSSIP_MENU(10382, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Flight master
+ pPlayer->SEND_POI(-1832, 5299, 7, 6, 0, "Flight Master");
+ pPlayer->SEND_GOSSIP_MENU(10385, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKALDOR , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNALDOR , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKSCYERS , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNSCYERS , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->SEND_GOSSIP_MENU(10386, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Stable master
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEALDOR , GOSSIP_SENDER_SEC_STABLEMASTER, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLESCYERS , GOSSIP_SENDER_SEC_STABLEMASTER, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->SEND_GOSSIP_MENU(10387, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERALLIANCE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERHORDE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(10388, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Profession master
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->SEND_GOSSIP_MENU(10391, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom
+ pPlayer->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom");
+ pPlayer->SEND_GOSSIP_MENU(10503, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab
+ pPlayer->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab");
+ pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMALDOR , GOSSIP_SENDER_SEC_GEMMERCHANT, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMSCYERS , GOSSIP_SENDER_SEC_GEMMERCHANT, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->SEND_GOSSIP_MENU(10697, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBankMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ {
+ pPlayer->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank");
+ pPlayer->SEND_GOSSIP_MENU(10380, pCreature->GetGUID());
+ }
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
+ {
+ pPlayer->SEND_POI(-1997.7, 5363, 7, 6, 0, "Scyers Bank");
+ pPlayer->SEND_GOSSIP_MENU(10381, pCreature->GetGUID());
+ }
+}
+
+void SendInnMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ {
+ pPlayer->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn");
+ pPlayer->SEND_GOSSIP_MENU(10383, pCreature->GetGUID());
+ }
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
+ {
+ pPlayer->SEND_POI(-2178, 5405, 7, 6, 0, "Scyers Inn");
+ pPlayer->SEND_GOSSIP_MENU(10384, pCreature->GetGUID());
+ }
+}
+
+void SendMailboxMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ pPlayer->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank");
+ pPlayer->SEND_GOSSIP_MENU(10380, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ pPlayer->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn");
+ pPlayer->SEND_GOSSIP_MENU(10383, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ pPlayer->SEND_POI(-1997.7, 5363, 7, 6, 0, "Scyers Bank");
+ pPlayer->SEND_GOSSIP_MENU(10381, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4:
+ pPlayer->SEND_POI(-2178, 5405, 7, 6, 0, "Scyers Inn");
+ pPlayer->SEND_GOSSIP_MENU(10384, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendStableMasterMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ {
+ pPlayer->SEND_POI(-1888.5, 5761, 7, 6, 0, "Aldor Stable");
+ pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID());
+ }
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
+ {
+ pPlayer->SEND_POI(-2170, 5404, 7, 6, 0, "Scyers Stable");
+ pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID());
+ }
+}
+
+void SendBattleMasterMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ pPlayer->SEND_POI(-1774, 5251, 7, 6, 0, "Alliance Battlemasters");
+ pPlayer->SEND_GOSSIP_MENU(10389, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ pPlayer->SEND_POI(-1963, 5263, 7, 6, 0, "Horde Battlemasters");
+ pPlayer->SEND_GOSSIP_MENU(10390, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ pPlayer->SEND_POI(-1960, 5175, 7, 6, 0, "Arena Battlemasters");
+ pPlayer->SEND_GOSSIP_MENU(12510, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem");
+ pPlayer->SEND_GOSSIP_MENU(10392, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury");
+ pPlayer->SEND_GOSSIP_MENU(10400, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper");
+ pPlayer->SEND_GOSSIP_MENU(10393, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan");
+ pPlayer->SEND_GOSSIP_MENU(10395, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //First Aid
+ pPlayer->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher");
+ pPlayer->SEND_GOSSIP_MENU(10396, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting
+ pPlayer->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar");
+ pPlayer->SEND_GOSSIP_MENU(10397, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking
+ pPlayer->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari");
+ pPlayer->SEND_GOSSIP_MENU(10399, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Skinning
+ pPlayer->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour");
+ pPlayer->SEND_GOSSIP_MENU(10398, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendGemMerchantMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ {
+ pPlayer->SEND_POI(-1645, 5669.5, 7, 6, 0, "Aldor Gem Merchant");
+ pPlayer->SEND_GOSSIP_MENU(10698, pCreature->GetGUID());
+ }
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
+ {
+ pPlayer->SEND_POI(-2193, 5424.5, 7, 6, 0, "Scyers Gem Merchant");
+ pPlayer->SEND_GOSSIP_MENU(10699, pCreature->GetGUID());
+ }
+}
+
+bool GossipSelect_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BANK: SendBankMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_INN: SendInnMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_STABLEMASTER: SendStableMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_GEMMERCHANT: SendGemMerchantMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_MAILBOX: SendMailboxMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_shattrath end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_shattrath(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_shattrath_aldor
+ *******************************************************/
+
+#define SPELL_BANISHED_SHATTRATH_A 36642
+#define SPELL_BANISHED_SHATTRATH_S 36671
+#define SPELL_BANISH_TELEPORT 36643
+#define SPELL_EXILE 39533
+
+struct TRINITY_DLL_DECL guard_shattrath_aldorAI : public guardAI
+{
+ guard_shattrath_aldorAI(Creature *c) : guardAI(c) {}
+
+ uint32 Exile_Timer;
+ uint32 Banish_Timer;
+ uint64 PlayerGUID;
+ bool CanTeleport;
+
+ void Reset()
+ {
+ Banish_Timer = 5000;
+ Exile_Timer = 8500;
+ PlayerGUID = 0;
+ CanTeleport = false;
+ }
+
+ void EnterCombat(Unit *who) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (CanTeleport)
+ {
+ if (Exile_Timer <= diff)
+ {
+ if (Unit* temp = Unit::GetUnit(*m_creature,PlayerGUID))
+ {
+ temp->CastSpell(temp,SPELL_EXILE,true);
+ temp->CastSpell(temp,SPELL_BANISH_TELEPORT,true);
+ }
+ PlayerGUID = 0;
+ Exile_Timer = 8500;
+ CanTeleport = false;
+ } else Exile_Timer -= diff;
+ }
+ else if (Banish_Timer <= diff)
+ {
+ Unit* temp = m_creature->getVictim();
+ if (temp && temp->GetTypeId() == TYPEID_PLAYER)
+ {
+ DoCast(temp, SPELL_BANISHED_SHATTRATH_A);
+ Banish_Timer = 9000;
+ PlayerGUID = temp->GetGUID();
+ if (PlayerGUID)
+ CanTeleport = true;
+ }
+ } else Banish_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+bool GossipHello_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAVERN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FLIGHTMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MANALOOM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMYLAB , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMMERCHANT , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(10524, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Tavern
+ pPlayer->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern");
+ pPlayer->SEND_GOSSIP_MENU(10394, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank");
+ pPlayer->SEND_GOSSIP_MENU(10380, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn");
+ pPlayer->SEND_GOSSIP_MENU(10525, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Flight master
+ pPlayer->SEND_POI(-1832, 5299, 7, 6, 0, "Shattrath Flight Master");
+ pPlayer->SEND_GOSSIP_MENU(10402, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox
+ pPlayer->SEND_POI(0, 0, 7, 6, 0, "Aldor Mailbox");
+ //unknown
+ pPlayer->SEND_GOSSIP_MENU(10524, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Stable master
+ pPlayer->SEND_POI(-1888.5, 5761, 7, 6, 0, "Aldor Stable Master");
+ pPlayer->SEND_GOSSIP_MENU(10527, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERALLIANCE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERHORDE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(10388, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Profession master
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->SEND_GOSSIP_MENU(10391, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom
+ pPlayer->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom");
+ pPlayer->SEND_GOSSIP_MENU(10522, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab
+ pPlayer->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab");
+ pPlayer->SEND_GOSSIP_MENU(10696, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant
+ pPlayer->SEND_POI(-1645, 5669.5, 7, 6, 0, "Aldor Gem Merchant");
+ pPlayer->SEND_GOSSIP_MENU(10411, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem");
+ pPlayer->SEND_GOSSIP_MENU(10392, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury");
+ pPlayer->SEND_GOSSIP_MENU(10400, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper");
+ pPlayer->SEND_GOSSIP_MENU(10393, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan");
+ pPlayer->SEND_GOSSIP_MENU(10528, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //First Aid
+ pPlayer->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher");
+ pPlayer->SEND_GOSSIP_MENU(10396, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting
+ pPlayer->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar");
+ pPlayer->SEND_GOSSIP_MENU(10529, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking
+ pPlayer->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari");
+ pPlayer->SEND_GOSSIP_MENU(10399, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Skinning
+ pPlayer->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour");
+ pPlayer->SEND_GOSSIP_MENU(10419, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_shattrath_aldor(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_shattrath_aldor(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_shattrath_aldor end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_shattrath_aldor(Creature* pCreature)
+{
+ return new guard_shattrath_aldorAI (pCreature);
+}
+
+/*******************************************************
+ * guard_shattrath_scryer
+ *******************************************************/
+
+struct TRINITY_DLL_DECL guard_shattrath_scryerAI : public guardAI
+{
+ guard_shattrath_scryerAI(Creature *c) : guardAI(c) {}
+
+ uint32 Exile_Timer;
+ uint32 Banish_Timer;
+ uint64 PlayerGUID;
+ bool CanTeleport;
+
+ void Reset()
+ {
+ Banish_Timer = 5000;
+ Exile_Timer = 8500;
+ PlayerGUID = 0;
+ CanTeleport = false;
+ }
+
+ void EnterCombat(Unit *who) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (CanTeleport)
+ {
+ if (Exile_Timer <= diff)
+ {
+ if (Unit* temp = Unit::GetUnit(*m_creature,PlayerGUID))
+ {
+ temp->CastSpell(temp,SPELL_EXILE,true);
+ temp->CastSpell(temp,SPELL_BANISH_TELEPORT,true);
+ }
+ PlayerGUID = 0;
+ Exile_Timer = 8500;
+ CanTeleport = false;
+ } else Exile_Timer -= diff;
+ }
+ else if (Banish_Timer <= diff)
+ {
+ Unit* temp = m_creature->getVictim();
+ if (temp && temp->GetTypeId() == TYPEID_PLAYER)
+ {
+ DoCast(temp, SPELL_BANISHED_SHATTRATH_S);
+ Banish_Timer = 9000;
+ PlayerGUID = temp->GetGUID();
+ if (PlayerGUID)
+ CanTeleport = true;
+ }
+ } else Banish_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+bool GossipHello_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAVERN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FLIGHTMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MANALOOM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMYLAB , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMMERCHANT , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(10430, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Tavern
+ pPlayer->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern");
+ pPlayer->SEND_GOSSIP_MENU(10431, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(-1996.6, 5363.7, 7, 6, 0, "Scryer Bank");
+ pPlayer->SEND_GOSSIP_MENU(10432, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->SEND_POI(-2176.6, 5405.8, 7, 6, 0, "Scryer Inn");
+ pPlayer->SEND_GOSSIP_MENU(10433, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Flight master
+ pPlayer->SEND_POI(-1832, 5299, 7, 6, 0, "Shattrath Flight Master");
+ pPlayer->SEND_GOSSIP_MENU(10435, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox
+ pPlayer->SEND_POI(-2174.3, 5411.4, 7, 6, 0, "Scryer Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(10436, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Stable master
+ pPlayer->SEND_POI(-2169.9, 5405.1, 7, 6, 0, "Scryer Stable Master");
+ pPlayer->SEND_GOSSIP_MENU(10437, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERALLIANCE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERHORDE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(10438, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Profession master
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->SEND_GOSSIP_MENU(10504, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom
+ pPlayer->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom");
+ pPlayer->SEND_GOSSIP_MENU(10522, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab
+ pPlayer->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab");
+ pPlayer->SEND_GOSSIP_MENU(10701, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant
+ pPlayer->SEND_POI(-1645, 5669.5, 7, 6, 0, "Scryer Gem Merchant");
+ pPlayer->SEND_GOSSIP_MENU(10702, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem");
+ pPlayer->SEND_GOSSIP_MENU(10516, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury");
+ pPlayer->SEND_GOSSIP_MENU(10517, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper");
+ pPlayer->SEND_GOSSIP_MENU(10518, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan");
+ pPlayer->SEND_GOSSIP_MENU(10519, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //First Aid
+ pPlayer->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher");
+ pPlayer->SEND_GOSSIP_MENU(10520, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting
+ pPlayer->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar");
+ pPlayer->SEND_GOSSIP_MENU(10521, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking
+ pPlayer->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari");
+ pPlayer->SEND_GOSSIP_MENU(10523, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Skinning
+ pPlayer->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour");
+ pPlayer->SEND_GOSSIP_MENU(10523, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_shattrath_scryer(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_shattrath_scryer(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_shattrath_scryer end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_shattrath_scryer(Creature* pCreature)
+{
+ return new guard_shattrath_scryerAI (pCreature);
+}
+
+/*******************************************************
+ * guard_silvermoon start
+ *******************************************************/
+
+bool GossipHello_guard_silvermoon(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Auction house
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AH_SILVERMOON_1 , GOSSIP_SENDER_SEC_AUCTIONHOUSE, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AH_SILVERMOON_2 , GOSSIP_SENDER_SEC_AUCTIONHOUSE, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->SEND_GOSSIP_MENU(9317, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(9808.4, -7488.16, 7, 6, 0, "Silvermoon Bank");
+ pPlayer->SEND_GOSSIP_MENU(9322, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_POI(9474.97, -7345.21, 7, 6, 0, "Tandrine");
+ pPlayer->SEND_GOSSIP_MENU(9324, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN_SILVERMOON_1 , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN_SILVERMOON_2 , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->SEND_GOSSIP_MENU(9602, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox
+ pPlayer->SEND_POI(9658.33, -7492.17, 7, 6, 0, "Silvermoon Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(9326, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Stable master
+ pPlayer->SEND_POI(9904.95, -7404.31, 7, 6, 0, "Shalenn");
+ pPlayer->SEND_GOSSIP_MENU(9327, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Weapon trainer
+ pPlayer->SEND_POI(9841.17, -7505.13, 7, 6, 0, "Ileda");
+ pPlayer->SEND_GOSSIP_MENU(9328, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Wind master
+ pPlayer->SEND_POI(9378.45, -7163.94, 7, 6, 0, "Silvermoon Wind Master");
+ pPlayer->SEND_GOSSIP_MENU(10181, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_EYEOFTHESTORM , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(9331, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 14);
+ pPlayer->SEND_GOSSIP_MENU(9338, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendAuctionhouseMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ {
+ pPlayer->SEND_POI(9644.47, -7140.22, 7, 6, 0, "Western Auction House");
+ pPlayer->SEND_GOSSIP_MENU(9318, pCreature->GetGUID());
+ }
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
+ {
+ pPlayer->SEND_POI(9683.27, -7521.22, 7, 6, 0, "Royal Exchange Auction House");
+ pPlayer->SEND_GOSSIP_MENU(9319, pCreature->GetGUID());
+ }
+}
+
+void SendInnMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ {
+ pPlayer->SEND_POI(9677.7, -7368, 7, 6, 0, "Silvermoon City Inn");
+ pPlayer->SEND_GOSSIP_MENU(9325, pCreature->GetGUID());
+ }
+ if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
+ {
+ pPlayer->SEND_POI(9561.1, -7517.5, 7, 6, 0, "Wayfarer's Rest tavern");
+ pPlayer->SEND_GOSSIP_MENU(9603, pCreature->GetGUID());
+ }
+}
+
+void SendBattleMasterMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(9850.49, -7572.26, 7, 6, 0, "Gurak");
+ pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(9857.18, -7564.36, 7, 6, 0, "Karen Wentworth");
+ pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //A
+ pPlayer->SEND_POI(9850.6, -7559.25, 7, 6, 0, "Bipp Glizzitor");
+ pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //EOS
+ pPlayer->SEND_POI(9857.18, -7564.36, 7, 6, 0, "Karen Wentworth");
+ pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //WSG
+ pPlayer->SEND_POI(9845.45, -7562.58, 7, 6, 0, "Krukk");
+ pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(9700.55, -7262.57, 7, 6, 0, "Harene Plainwalker");
+ pPlayer->SEND_GOSSIP_MENU(9330, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(9927.48, -7426.14, 7, 6, 0, "Zandine");
+ pPlayer->SEND_GOSSIP_MENU(9332, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Mage
+ pPlayer->SEND_POI(9995.07, -7118.17, 7, 6, 0, "Quithas");
+ pPlayer->SEND_GOSSIP_MENU(9333, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Paladin
+ pPlayer->SEND_POI(9850.22, -7516.93, 7, 6, 0, "Champion Bachi");
+ pPlayer->SEND_GOSSIP_MENU(9334, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Priest
+ pPlayer->SEND_POI(9926.79, -7066.66, 7, 6, 0, "Belestra");
+ pPlayer->SEND_GOSSIP_MENU(9335, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Rogue
+ pPlayer->SEND_POI(9739.88, -7374.33, 7, 6, 0, "Zelanis");
+ pPlayer->SEND_GOSSIP_MENU(9336, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Warlock
+ pPlayer->SEND_POI(9787.57, -7284.63, 7, 6, 0, "Alamma");
+ pPlayer->SEND_GOSSIP_MENU(9337, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(9998.09, -7214.36, 7, 6, 0, "Silvermoon Alchemy Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(9841.43, -7361.53, 7, 6, 0, "Silvermoon Blacksmithing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9340, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(9577.26, -7243.6, 7, 6, 0, "Silvermoon Cooking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(9962.57, -7246.18, 7, 6, 0, "Silvermoon Enchanting Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9341, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(9820.18, -7329.56, 7, 6, 0, "Silvermoon Engineering Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(9579.8, -7343.71, 7, 6, 0, "Silvermoon First Aid Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(9602.73, -7328.3, 7, 6, 0, "Silvermoon Fishing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(10004.4, -7216.86, 7, 6, 0, "Silvermoon Herbalism Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(9959.29, -7248.38, 7, 6, 0, "Zantasia");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Jewelcrafting
+ pPlayer->SEND_POI(9553.54, -7506.43, 7, 6, 0, "Silvermoon Jewelcrafting Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9346, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Leatherworking
+ pPlayer->SEND_POI(9503.72, -7430.16, 7, 6, 0, "Silvermoon Leatherworking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9347, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Mining
+ pPlayer->SEND_POI(9805.1, -7355.56, 7, 6, 0, "Silvermoon Mining Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9348, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Skinning
+ pPlayer->SEND_POI(9513.37, -7429.4, 7, 6, 0, "Silvermoon Skinning Trainer");
+ pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 14: //Tailoring
+ pPlayer->SEND_POI(9750.55, -7095.28, 7, 6, 0, "Silvermoon Tailor");
+ pPlayer->SEND_GOSSIP_MENU(9350, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_AUCTIONHOUSE: SendAuctionhouseMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_INN: SendInnMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_silvermoon end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_silvermoon(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_stormwind start
+ *******************************************************/
+
+bool GossipHello_guard_stormwind(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STORMWIND_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DEEPRUNTRAM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GRYPHON , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_OFFICERS , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(933, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Auction House
+ pPlayer->SEND_POI(-8811.46, 667.46, 7, 6, 0, "Stormwind Auction House");
+ pPlayer->SEND_GOSSIP_MENU(3834, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bank
+ pPlayer->SEND_POI(-8916.87, 622.87, 7, 6, 0, "Stormwind Bank");
+ pPlayer->SEND_GOSSIP_MENU(764, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Deeprun tram
+ pPlayer->SEND_POI(-8378.88, 554.23, 7, 6, 0, "The Deeprun Tram");
+ pPlayer->SEND_GOSSIP_MENU(3813, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(-8869.0, 675.4, 7, 6, 0, "The Gilded Rose");
+ pPlayer->SEND_GOSSIP_MENU(3860, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Gryphon Master
+ pPlayer->SEND_POI(-8837.0, 493.5, 7, 6, 0, "Stormwind Gryphon Master");
+ pPlayer->SEND_GOSSIP_MENU(879, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Guild Master
+ pPlayer->SEND_POI(-8894.0, 611.2, 7, 6, 0, "Stormwind Vistor`s Center");
+ pPlayer->SEND_GOSSIP_MENU(882, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Mailbox
+ pPlayer->SEND_POI(-8876.48, 649.18, 7, 6, 0, "Stormwind Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(3861, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Stable Master
+ pPlayer->SEND_POI(-8433.0, 554.7, 7, 6, 0, "Jenova Stoneshield");
+ pPlayer->SEND_GOSSIP_MENU(5984, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Weapon Trainer
+ pPlayer->SEND_POI(-8797.0, 612.8, 7, 6, 0, "Woo Ping");
+ pPlayer->SEND_GOSSIP_MENU(4516, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Officers Lounge
+ pPlayer->SEND_POI(-8759.92, 399.69, 7, 6, 0, "Champions` Hall");
+ pPlayer->SEND_GOSSIP_MENU(7047, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Battlemasters
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(7499, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Class trainers
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->SEND_GOSSIP_MENU(898, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Profession trainers
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(918, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Thelman Slatefist");
+ pPlayer->SEND_GOSSIP_MENU(7500, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Lady Hoteshem");
+ pPlayer->SEND_GOSSIP_MENU(7650, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //WSG
+ pPlayer->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Elfarran");
+ pPlayer->SEND_GOSSIP_MENU(7501, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Mage
+ pPlayer->SEND_POI(-9012.0, 867.6, 7, 6, 0, "Wizard`s Sanctum");
+ pPlayer->SEND_GOSSIP_MENU(899, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Rogue
+ pPlayer->SEND_POI(-8753.0, 367.8, 7, 6, 0, "Stormwind - Rogue House");
+ pPlayer->SEND_GOSSIP_MENU(900, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Warrior
+ pPlayer->SEND_POI(-8690.11, 324.85, 7, 6, 0, "Command Center");
+ pPlayer->SEND_GOSSIP_MENU(901, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Druid
+ pPlayer->SEND_POI(-8751.0, 1124.5, 7, 6, 0, "The Park");
+ pPlayer->SEND_GOSSIP_MENU(902, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Priest
+ pPlayer->SEND_POI(-8512.0, 862.4, 7, 6, 0, "Catedral Of Light");
+ pPlayer->SEND_GOSSIP_MENU(903, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Paladin
+ pPlayer->SEND_POI(-8577.0, 881.7, 7, 6, 0, "Catedral Of Light");
+ pPlayer->SEND_GOSSIP_MENU(904, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Hunter
+ pPlayer->SEND_POI(-8413.0, 541.5, 7, 6, 0, "Hunter Lodge");
+ pPlayer->SEND_GOSSIP_MENU(905, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Warlock
+ pPlayer->SEND_POI(-8948.91, 998.35, 7, 6, 0, "The Slaughtered Lamb");
+ pPlayer->SEND_GOSSIP_MENU(906, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Shaman
+ pPlayer->SEND_POI(-9033, 550, 7, 6, 0, "Valley Of Heroes");
+ //incorrect id
+ pPlayer->SEND_GOSSIP_MENU(2593, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(-8988.0, 759.60, 7, 6, 0, "Alchemy Needs");
+ pPlayer->SEND_GOSSIP_MENU(919, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(-8424.0, 616.9, 7, 6, 0, "Therum Deepforge");
+ pPlayer->SEND_GOSSIP_MENU(920, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(-8611.0, 364.6, 7, 6, 0, "Pig and Whistle Tavern");
+ pPlayer->SEND_GOSSIP_MENU(921, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(-8858.0, 803.7, 7, 6, 0, "Lucan Cordell");
+ pPlayer->SEND_GOSSIP_MENU(941, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(-8347.0, 644.1, 7, 6, 0, "Lilliam Sparkspindle");
+ pPlayer->SEND_GOSSIP_MENU(922, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(-8513.0, 801.8, 7, 6, 0, "Shaina Fuller");
+ pPlayer->SEND_GOSSIP_MENU(923, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(-8803.0, 767.5, 7, 6, 0, "Arnold Leland");
+ pPlayer->SEND_GOSSIP_MENU(940, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(-8967.0, 779.5, 7, 6, 0, "Alchemy Needs");
+ pPlayer->SEND_GOSSIP_MENU(924, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_POI(-8862.50, 875.19, 7, 6, 0, "Catarina Stanford");
+ pPlayer->SEND_GOSSIP_MENU(30000, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_POI(-8726.0, 477.4, 7, 6, 0, "The Protective Hide");
+ pPlayer->SEND_GOSSIP_MENU(925, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Mining
+ pPlayer->SEND_POI(-8434.0, 692.8, 7, 6, 0, "Gelman Stonehand");
+ pPlayer->SEND_GOSSIP_MENU(927, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_POI(-8716.0, 469.4, 7, 6, 0, "The Protective Hide");
+ pPlayer->SEND_GOSSIP_MENU(928, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_POI(-8938.0, 800.7, 7, 6, 0, "Duncan`s Textiles");
+ pPlayer->SEND_GOSSIP_MENU(929, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_stormwind(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_stormwind(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_stormwind(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_stormwind(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_stormwind end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_stormwind(Creature* pCreature)
+{
+ return new guardAI_stormwind (pCreature);
+}
+
+/*******************************************************
+ * guard_teldrassil start
+ *******************************************************/
+
+bool GossipHello_guard_teldrassil(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FERRY , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->SEND_GOSSIP_MENU(4316, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_GOSSIP_MENU(4317, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Rut`theran
+ pPlayer->SEND_GOSSIP_MENU(4318, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_GOSSIP_MENU(4319, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(9821.49, 960.13, 7, 6, 0, "Dolanaar Inn");
+ pPlayer->SEND_GOSSIP_MENU(4320, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //stable master
+ pPlayer->SEND_POI(9808.37, 931.1, 7, 6, 0, "Seriadne");
+ pPlayer->SEND_GOSSIP_MENU(5982, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->SEND_GOSSIP_MENU(4264, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->SEND_GOSSIP_MENU(4273, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Druid
+ pPlayer->SEND_POI(9741.58, 963.7, 7, 6, 0, "Kal");
+ pPlayer->SEND_GOSSIP_MENU(4323, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Hunter
+ pPlayer->SEND_POI(9815.12, 926.28, 7, 6, 0, "Dazalar");
+ pPlayer->SEND_GOSSIP_MENU(4324, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Priest
+ pPlayer->SEND_POI(9906.16, 986.63, 7, 6, 0, "Laurna Morninglight");
+ pPlayer->SEND_GOSSIP_MENU(4325, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Rogue
+ pPlayer->SEND_POI(9789, 942.86, 7, 6, 0, "Jannok Breezesong");
+ pPlayer->SEND_GOSSIP_MENU(4326, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Warrior
+ pPlayer->SEND_POI(9821.96, 950.61, 7, 6, 0, "Kyra Windblade");
+ pPlayer->SEND_GOSSIP_MENU(4327, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(9767.59, 878.81, 7, 6, 0, "Cyndra Kindwhisper");
+ pPlayer->SEND_GOSSIP_MENU(4329, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Cooking
+ pPlayer->SEND_POI(9751.19, 906.13, 7, 6, 0, "Zarrin");
+ pPlayer->SEND_GOSSIP_MENU(4330, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Enchanting
+ pPlayer->SEND_POI(10677.59, 1946.56, 7, 6, 0, "Alanna Raveneye");
+ pPlayer->SEND_GOSSIP_MENU(4331, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //First Aid
+ pPlayer->SEND_POI(9903.12, 999, 7, 6, 0, "Byancie");
+ pPlayer->SEND_GOSSIP_MENU(4332, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Fishing
+ pPlayer->SEND_GOSSIP_MENU(4333, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Herbalism
+ pPlayer->SEND_POI(9773.78, 875.88, 7, 6, 0, "Malorne Bladeleaf");
+ pPlayer->SEND_GOSSIP_MENU(4334, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Inscription
+ pPlayer->SEND_GOSSIP_MENU(30001, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Leatherworking
+ pPlayer->SEND_POI(10152.59, 1681.46, 7, 6, 0, "Nadyia Maneweaver");
+ pPlayer->SEND_GOSSIP_MENU(4335, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Skinning
+ pPlayer->SEND_POI(10135.59, 1673.18, 7, 6, 0, "Radnaal Maneweaver");
+ pPlayer->SEND_GOSSIP_MENU(4336, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Tailoring
+ pPlayer->SEND_GOSSIP_MENU(4337, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_teldrassil(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_teldrassil(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_teldrassil(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_teldrassil end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_teldrassil(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_tirisfal start
+ *******************************************************/
+
+bool GossipHello_guard_tirisfal(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATHANDLER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->SEND_GOSSIP_MENU(4097, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_GOSSIP_MENU(4074, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //bat handler
+ pPlayer->SEND_GOSSIP_MENU(4075, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Inn
+ pPlayer->SEND_POI(2246.68, 241.89, 7, 6, 0, "Gallows` End Tavern");
+ pPlayer->SEND_GOSSIP_MENU(4076, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Stable Master
+ pPlayer->SEND_POI(2267.66, 319.32, 7, 6, 0, "Morganus");
+ pPlayer->SEND_GOSSIP_MENU(5978, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->SEND_GOSSIP_MENU(4292, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INSCRIPTION , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ pPlayer->SEND_GOSSIP_MENU(4096, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Mage
+ pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Cain Firesong");
+ pPlayer->SEND_GOSSIP_MENU(4077, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Priest
+ pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Dark Cleric Beryl");
+ pPlayer->SEND_GOSSIP_MENU(4078, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Rogue
+ pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Marion Call");
+ pPlayer->SEND_GOSSIP_MENU(4079, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Warlock
+ pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Rupert Boch");
+ pPlayer->SEND_GOSSIP_MENU(4080, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Warrior
+ pPlayer->SEND_POI(2256.48, 240.32, 7, 6, 0, "Austil de Mon");
+ pPlayer->SEND_GOSSIP_MENU(4081, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(2263.25, 344.23, 7, 6, 0, "Carolai Anise");
+ pPlayer->SEND_GOSSIP_MENU(4082, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_GOSSIP_MENU(4083, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_GOSSIP_MENU(4084, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(2250.35, 249.12, 7, 6, 0, "Vance Undergloom");
+ pPlayer->SEND_GOSSIP_MENU(4085, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_GOSSIP_MENU(4086, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(2246.68, 241.89, 7, 6, 0, "Nurse Neela");
+ pPlayer->SEND_GOSSIP_MENU(4087, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(2292.37, -10.72, 7, 6, 0, "Clyde Kellen");
+ pPlayer->SEND_GOSSIP_MENU(4088, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(2268.21, 331.69, 7, 6, 0, "Faruza");
+ pPlayer->SEND_GOSSIP_MENU(4089, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Inscription
+ pPlayer->SEND_GOSSIP_MENU(30001, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
+ pPlayer->SEND_POI(2027, 78.72, 7, 6, 0, "Shelene Rhobart");
+ pPlayer->SEND_GOSSIP_MENU(4090, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Mining
+ pPlayer->SEND_GOSSIP_MENU(4091, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Skinning
+ pPlayer->SEND_POI(2027, 78.72, 7, 6, 0, "Rand Rhobart");
+ pPlayer->SEND_GOSSIP_MENU(4092, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring
+ pPlayer->SEND_POI(2160.45, 659.93, 7, 6, 0, "Bowen Brisboise");
+ pPlayer->SEND_GOSSIP_MENU(4093, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_tirisfal(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_tirisfal(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_tirisfal(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_tirisfal end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_tirisfal(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * guard_undercity start
+ *******************************************************/
+
+bool GossipHello_guard_undercity(Player* pPlayer, Creature* pCreature)
+{
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATHANDLER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ZEPPLINMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->SEND_GOSSIP_MENU(3543, pCreature->GetGUID());
+ return true;
+}
+
+void SendDefaultMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Bank
+ pPlayer->SEND_POI(1595.64, 232.45, 7, 6, 0, "Undercity Bank");
+ pPlayer->SEND_GOSSIP_MENU(3514, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Bat handler
+ pPlayer->SEND_POI(1565.9, 271.43, 7, 6, 0, "Undercity Bat Handler");
+ pPlayer->SEND_GOSSIP_MENU(3515, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Guild master
+ pPlayer->SEND_POI(1594.17, 205.57, 7, 6, 0, "Undercity Guild Master");
+ pPlayer->SEND_GOSSIP_MENU(3516, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Inn
+ pPlayer->SEND_POI(1639.43, 220.99, 7, 6, 0, "Undercity Inn");
+ pPlayer->SEND_GOSSIP_MENU(3517, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox
+ pPlayer->SEND_POI(1632.68, 219.4, 7, 6, 0, "Undercity Mailbox");
+ pPlayer->SEND_GOSSIP_MENU(3518, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //Auction House
+ pPlayer->SEND_POI(1647.9, 258.49, 7, 6, 0, "Undercity Auction House");
+ pPlayer->SEND_GOSSIP_MENU(3519, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Zeppelin
+ pPlayer->SEND_POI(2059, 274.86, 7, 6, 0, "Undercity Zeppelin");
+ pPlayer->SEND_GOSSIP_MENU(3520, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Weapon Master
+ pPlayer->SEND_POI(1670.31, 324.66, 7, 6, 0, "Archibald");
+ pPlayer->SEND_GOSSIP_MENU(4521, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Stable master
+ pPlayer->SEND_POI(1634.18, 226.76, 7, 6, 0, "Anya Maulray");
+ pPlayer->SEND_GOSSIP_MENU(5979, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Battlemaster
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->SEND_GOSSIP_MENU(7527, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Class trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->SEND_GOSSIP_MENU(3542, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Profession trainer
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ pPlayer->SEND_GOSSIP_MENU(3541, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendBattleMasterMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //AV
+ pPlayer->SEND_POI(1329, 333.92, 7, 6, 0, "Grizzle Halfmane");
+ pPlayer->SEND_GOSSIP_MENU(7525, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //AB
+ pPlayer->SEND_POI(1283.3, 287.16, 7, 6, 0, "Sir Malory Wheeler");
+ pPlayer->SEND_GOSSIP_MENU(7646, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //WSG
+ pPlayer->SEND_POI(1265, 351.18, 7, 6, 0, "Kurden Bloodclaw");
+ pPlayer->SEND_GOSSIP_MENU(7526, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendClassTrainerMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Mage
+ pPlayer->SEND_POI(1781, 53, 7, 6, 0, "Undercity Mage Trainers");
+ pPlayer->SEND_GOSSIP_MENU(3513, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Priest
+ pPlayer->SEND_POI(1758.33, 401.5, 7, 6, 0, "Undercity Priest Trainers");
+ pPlayer->SEND_GOSSIP_MENU(3521, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Rogue
+ pPlayer->SEND_POI(1418.56, 65, 7, 6, 0, "Undercity Rogue Trainers");
+ pPlayer->SEND_GOSSIP_MENU(3524, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Warlock
+ pPlayer->SEND_POI(1780.92, 53.16, 7, 6, 0, "Undercity Warlock Trainers");
+ pPlayer->SEND_GOSSIP_MENU(3526, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Warrior
+ pPlayer->SEND_POI(1775.59, 418.19, 7, 6, 0, "Undercity Warrior Trainers");
+ pPlayer->SEND_GOSSIP_MENU(3527, pCreature->GetGUID());
+ break;
+ }
+}
+
+void SendProfTrainerMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy
+ pPlayer->SEND_POI(1419.82, 417.19, 7, 6, 0, "The Apothecarium");
+ pPlayer->SEND_GOSSIP_MENU(3528, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing
+ pPlayer->SEND_POI(1696, 285, 7, 6, 0, "Undercity Blacksmithing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3529, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3: //Cooking
+ pPlayer->SEND_POI(1596.34, 274.68, 7, 6, 0, "Undercity Cooking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3530, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting
+ pPlayer->SEND_POI(1488.54, 280.19, 7, 6, 0, "Undercity Enchanting Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3531, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5: //Engineering
+ pPlayer->SEND_POI(1408.58, 143.43, 7, 6, 0, "Undercity Engineering Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3532, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6: //First Aid
+ pPlayer->SEND_POI(1519.65, 167.19, 7, 6, 0, "Undercity First Aid Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3533, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7: //Fishing
+ pPlayer->SEND_POI(1679.9, 89, 7, 6, 0, "Undercity Fishing Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3534, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism
+ pPlayer->SEND_POI(1558, 349.36, 7, 6, 0, "Undercity Herbalism Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3535, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking
+ pPlayer->SEND_POI(1498.76, 196.43, 7, 6, 0, "Undercity Leatherworking Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3536, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10: //Mining
+ pPlayer->SEND_POI(1642.88, 335.58, 7, 6, 0, "Undercity Mining Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3537, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11: //Skinning
+ pPlayer->SEND_POI(1498.6, 196.46, 7, 6, 0, "Undercity Skinning Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3538, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring
+ pPlayer->SEND_POI(1689.55, 193, 7, 6, 0, "Undercity Tailoring Trainer");
+ pPlayer->SEND_GOSSIP_MENU(3539, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch (uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_undercity(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_undercity(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_undercity(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_undercity(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*******************************************************
+ * guard_undercity end
+ *******************************************************/
+
+CreatureAI* GetAI_guard_undercity(Creature* pCreature)
+{
+ return new guardAI (pCreature);
+}
+
+/*******************************************************
+ * AddSC
+ *******************************************************/
+
+void AddSC_guards()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "guard_azuremyst";
+ newscript->pGossipHello = &GossipHello_guard_azuremyst;
+ newscript->pGossipSelect = &GossipSelect_guard_azuremyst;
+ newscript->GetAI = &GetAI_guard_azuremyst;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_bluffwatcher";
+ newscript->pGossipHello = &GossipHello_guard_bluffwatcher;
+ newscript->pGossipSelect = &GossipSelect_guard_bluffwatcher;
+ newscript->GetAI = &GetAI_guard_bluffwatcher;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_contested";
+ newscript->GetAI = &GetAI_guard_contested;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_darnassus";
+ newscript->pGossipHello = &GossipHello_guard_darnassus;
+ newscript->pGossipSelect = &GossipSelect_guard_darnassus;
+ newscript->GetAI = &GetAI_guard_darnassus;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_dunmorogh";
+ newscript->pGossipHello = &GossipHello_guard_dunmorogh;
+ newscript->pGossipSelect = &GossipSelect_guard_dunmorogh;
+ newscript->GetAI = &GetAI_guard_dunmorogh;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_durotar";
+ newscript->pGossipHello = &GossipHello_guard_durotar;
+ newscript->pGossipSelect = &GossipSelect_guard_durotar;
+ newscript->GetAI = &GetAI_guard_durotar;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_elwynnforest";
+ newscript->pGossipHello = &GossipHello_guard_elwynnforest;
+ newscript->pGossipSelect = &GossipSelect_guard_elwynnforest;
+ newscript->GetAI = &GetAI_guard_elwynnforest;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_eversong";
+ newscript->pGossipHello = &GossipHello_guard_eversong;
+ newscript->pGossipSelect = &GossipSelect_guard_eversong;
+ newscript->GetAI = &GetAI_guard_eversong;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_exodar";
+ newscript->pGossipHello = &GossipHello_guard_exodar;
+ newscript->pGossipSelect = &GossipSelect_guard_exodar;
+ newscript->GetAI = &GetAI_guard_exodar;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_ironforge";
+ newscript->pGossipHello = &GossipHello_guard_ironforge;
+ newscript->pGossipSelect = &GossipSelect_guard_ironforge;
+ newscript->GetAI = &GetAI_guard_ironforge;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_mulgore";
+ newscript->pGossipHello = &GossipHello_guard_mulgore;
+ newscript->pGossipSelect = &GossipSelect_guard_mulgore;
+ newscript->GetAI = &GetAI_guard_mulgore;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_orgrimmar";
+ newscript->pGossipHello = &GossipHello_guard_orgrimmar;
+ newscript->pGossipSelect = &GossipSelect_guard_orgrimmar;
+ newscript->GetAI = &GetAI_guard_orgrimmar;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_shattrath";
+ newscript->pGossipHello = &GossipHello_guard_shattrath;
+ newscript->pGossipSelect = &GossipSelect_guard_shattrath;
+ newscript->GetAI = &GetAI_guard_shattrath;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_shattrath_aldor";
+ newscript->GetAI = &GetAI_guard_shattrath_aldor;
+ newscript->pGossipHello = &GossipHello_guard_shattrath_aldor;
+ newscript->pGossipSelect = &GossipSelect_guard_shattrath_aldor;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_shattrath_scryer";
+ newscript->GetAI = &GetAI_guard_shattrath_scryer;
+ newscript->pGossipHello = &GossipHello_guard_shattrath_scryer;
+ newscript->pGossipSelect = &GossipSelect_guard_shattrath_scryer;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_silvermoon";
+ newscript->pGossipHello = &GossipHello_guard_silvermoon;
+ newscript->pGossipSelect = &GossipSelect_guard_silvermoon;
+ newscript->GetAI = &GetAI_guard_silvermoon;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_stormwind";
+ newscript->pGossipHello = &GossipHello_guard_stormwind;
+ newscript->pGossipSelect = &GossipSelect_guard_stormwind;
+ newscript->GetAI = &GetAI_guard_stormwind;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_teldrassil";
+ newscript->pGossipHello = &GossipHello_guard_teldrassil;
+ newscript->pGossipSelect = &GossipSelect_guard_teldrassil;
+ newscript->GetAI = &GetAI_guard_teldrassil;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_tirisfal";
+ newscript->pGossipHello = &GossipHello_guard_tirisfal;
+ newscript->pGossipSelect = &GossipSelect_guard_tirisfal;
+ newscript->GetAI = &GetAI_guard_tirisfal;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "guard_undercity";
+ newscript->pGossipHello = &GossipHello_guard_undercity;
+ newscript->pGossipSelect = &GossipSelect_guard_undercity;
+ newscript->GetAI = &GetAI_guard_undercity;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/item_scripts.cpp b/src/scripts/world/item_scripts.cpp
new file mode 100644
index 00000000000..658ee379fdf
--- /dev/null
+++ b/src/scripts/world/item_scripts.cpp
@@ -0,0 +1,377 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Item_Scripts
+SD%Complete: 100
+SDComment: Items for a range of different items. See content below (in script)
+SDCategory: Items
+EndScriptData */
+
+/* ContentData
+item_draenei_fishing_net(i23654) Hacklike implements chance to spawn item or creature
+item_nether_wraith_beacon(i31742) Summons creatures for quest Becoming a Spellfire Tailor (q10832)
+item_flying_machine(i34060,i34061) Engineering crafted flying machines
+item_gor_dreks_ointment(i30175) Protecting Our Own(q10488)
+item_only_for_flight Items which should only useable while flying
+EndContentData */
+
+#include "ScriptedPch.h"
+#include "Spell.h"
+
+/*#####
+# item_only_for_flight
+#####*/
+
+enum eOnlyForFlight
+{
+ SPELL_ARCANE_CHARGES = 45072
+};
+
+bool ItemUse_item_only_for_flight(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
+{
+ uint32 itemId = pItem->GetEntry();
+ bool disabled = false;
+
+ //for special scripts
+ switch(itemId)
+ {
+ case 24538:
+ if (pPlayer->GetAreaId() != 3628)
+ disabled = true;
+ break;
+ case 34489:
+ if (pPlayer->GetZoneId() != 4080)
+ disabled = true;
+ break;
+ case 34475:
+ if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES))
+ Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
+ break;
+ }
+
+ // allow use in flight only
+ if (pPlayer->isInFlight() && !disabled)
+ return false;
+
+ // error
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,pItem,NULL);
+ return true;
+}
+
+/*#####
+# item_draenei_fishing_net
+#####*/
+
+//This is just a hack and should be removed from here.
+//Creature/Item are in fact created before spell are sucessfully casted, without any checks at all to ensure proper/expected behavior.
+bool ItemUse_item_draenei_fishing_net(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
+{
+ //if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT &&
+ //targets.getGOTarget()->GetGOInfo()->type == GAMEOBJECT_TYPE_SPELL_FOCUS && targets.getGOTarget()->GetEntry() == 181616)
+ //{
+ if (pPlayer->GetQuestStatus(9452) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (urand(0,99) < 35)
+ {
+ Creature *Murloc = pPlayer->SummonCreature(17102, pPlayer->GetPositionX(), pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
+ if (Murloc)
+ Murloc->AI()->AttackStart(pPlayer);
+ }
+ else
+ {
+ ItemPosCountVec dest;
+ uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 23614, 1);
+ if (msg == EQUIP_ERR_OK)
+ {
+ if (Item* item = pPlayer->StoreNewItem(dest,23614,true))
+ pPlayer->SendNewItem(item,1,false,true);
+ } else
+ pPlayer->SendEquipError(msg,NULL,NULL);
+ }
+ }
+ //}
+ return false;
+}
+
+/*#####
+# item_nether_wraith_beacon
+#####*/
+
+bool ItemUse_item_nether_wraith_beacon(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
+{
+ if (pPlayer->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
+ {
+ Creature *Nether;
+ Nether = pPlayer->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000);
+ Nether = pPlayer->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000);
+ if (Nether)
+ Nether->AI()->AttackStart(pPlayer);
+ }
+ return false;
+}
+
+/*#####
+# item_flying_machine
+#####*/
+
+bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
+{
+ uint32 itemId = pItem->GetEntry();
+ if (itemId == 34060)
+ if (pPlayer->GetBaseSkillValue(SKILL_RIDING) >= 225)
+ return false;
+
+ if (itemId == 34061)
+ if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300)
+ return false;
+
+ debug_log("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
+ pPlayer->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL,pItem,NULL);
+ return true;
+}
+
+/*#####
+# item_gor_dreks_ointment
+#####*/
+
+bool ItemUse_item_gor_dreks_ointment(Player *pPlayer, Item *pItem, SpellCastTargets const& targets)
+{
+ if (targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId() == TYPEID_UNIT &&
+ targets.getUnitTarget()->GetEntry() == 20748 && !targets.getUnitTarget()->HasAura(32578))
+ return false;
+
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,pItem,NULL);
+ return true;
+}
+
+/*#####
+# item_incendiary_explosives
+#####*/
+
+bool ItemUse_item_incendiary_explosives(Player *pPlayer, Item *pItem, SpellCastTargets const &targets)
+{
+ if (pPlayer->FindNearestCreature(26248,15) || pPlayer->FindNearestCreature(26249,15))
+ return false;
+ else
+ {
+ pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE,pItem,NULL);
+ return true;
+ }
+}
+
+/*#####
+# item_mysterious_egg
+#####*/
+
+bool ItemExpire_item_mysterious_egg(Player *pPlayer, ItemPrototype const *pItemProto)
+{
+ ItemPosCountVec dest;
+ uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
+ if (msg == EQUIP_ERR_OK)
+ pPlayer->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
+
+ return true;
+}
+
+/*#####
+# item_disgusting_jar
+#####*/
+
+bool ItemExpire_item_disgusting_jar(Player *pPlayer, ItemPrototype const *pItemProto)
+{
+ ItemPosCountVec dest;
+ uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
+ if (msg == EQUIP_ERR_OK)
+ pPlayer->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
+
+ return true;
+}
+
+/*#####
+# item_harvesters_gift
+#####*/
+#define GHOULS 28845
+bool ItemUse_item_harvesters_gift(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
+{
+ std::list<Creature*> MinionList;
+ pPlayer->GetAllMinionsByEntry(MinionList,GHOULS);
+
+ if (pPlayer->GetQuestStatus(12698) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (!MinionList.empty())
+ {
+ if (MinionList.size() < 5)
+ return false;
+ else
+ {
+ //This should be sent to the player as red text.
+ pPlayer->Say("You have created enough ghouls. Return to Gothik the Harvester at Death's Breach.",LANG_UNIVERSAL);
+ return true;
+ }
+ }
+ else
+ return false;
+ }
+ return true;
+}
+
+/*#####
+# item_pile_fake_furs
+#####*/
+
+enum ePileFakeFur
+{
+ GO_CARIBOU_TRAP_1 = 187982,
+ GO_CARIBOU_TRAP_2 = 187995,
+ GO_CARIBOU_TRAP_3 = 187996,
+ GO_CARIBOU_TRAP_4 = 187997,
+ GO_CARIBOU_TRAP_5 = 187998,
+ GO_CARIBOU_TRAP_6 = 187999,
+ GO_CARIBOU_TRAP_7 = 188000,
+ GO_CARIBOU_TRAP_8 = 188001,
+ GO_CARIBOU_TRAP_9 = 188002,
+ GO_CARIBOU_TRAP_10 = 188003,
+ GO_CARIBOU_TRAP_11 = 188004,
+ GO_CARIBOU_TRAP_12 = 188005,
+ GO_CARIBOU_TRAP_13 = 188006,
+ GO_CARIBOU_TRAP_14 = 188007,
+ GO_CARIBOU_TRAP_15 = 188008,
+ GO_HIGH_QUALITY_FUR = 187983,
+ NPC_NESINGWARY_TRAPPER = 25835
+};
+bool ItemUse_item_pile_fake_furs(Player *pPlayer, Item *pItem, SpellCastTargets const &targets)
+{
+ GameObject *pGo;
+ if ((pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_1, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_2, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_3, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_4, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_5, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_6, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_7, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_8, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_9, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_10, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_11, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_12, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_13, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_14, 5.0f)) ||
+ (pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_15, 5.0f)))
+ {
+ if (pGo->FindNearestCreature(NPC_NESINGWARY_TRAPPER, 10.0f, true) || pGo->FindNearestCreature(NPC_NESINGWARY_TRAPPER, 10.0f, false) || pGo->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 2.0f))
+ return true;
+ float x, y, z;
+ pGo->GetClosePoint(x, y, z, pGo->GetObjectSize() / 3, 7.0f);
+ pGo->SummonGameObject(GO_HIGH_QUALITY_FUR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 0, 0, 0, 0, 1000);
+ if (TempSummon* summon = pPlayer->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
+ {
+ summon->SetVisibility(VISIBILITY_OFF);
+ summon->SetReactState(REACT_PASSIVE);
+ summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ }
+ }
+ return false;
+}
+
+/*#####
+# item_petrov_cluster_bombs
+#####*/
+
+enum ePetrovClusterBombs
+{
+ SPELL_PETROV_BOMB = 42406,
+ AREA_ID_SHATTERED_STRAITS = 4064,
+ ZONE_ID_HOWLING = 495
+};
+
+bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
+{
+ if (pPlayer->GetZoneId() != ZONE_ID_HOWLING)
+ return false;
+
+ if (!pPlayer->GetTransport() || pPlayer->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
+ {
+ pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL);
+
+ if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_PETROV_BOMB))
+ Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_HERE);
+
+ return true;
+ }
+
+ return false;
+}
+
+void AddSC_item_scripts()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "item_only_for_flight";
+ newscript->pItemUse = &ItemUse_item_only_for_flight;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_draenei_fishing_net";
+ newscript->pItemUse = &ItemUse_item_draenei_fishing_net;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_nether_wraith_beacon";
+ newscript->pItemUse = &ItemUse_item_nether_wraith_beacon;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_flying_machine";
+ newscript->pItemUse = &ItemUse_item_flying_machine;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_gor_dreks_ointment";
+ newscript->pItemUse = &ItemUse_item_gor_dreks_ointment;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_incendiary_explosives";
+ newscript->pItemUse = &ItemUse_item_incendiary_explosives;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_mysterious_egg";
+ newscript->pItemExpire = &ItemExpire_item_mysterious_egg;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_disgusting_jar";
+ newscript->pItemExpire = &ItemExpire_item_disgusting_jar;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_harvesters_gift";
+ newscript->pItemUse = &ItemUse_item_harvesters_gift;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_pile_fake_furs";
+ newscript->pItemUse = &ItemUse_item_pile_fake_furs;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_petrov_cluster_bombs";
+ newscript->pItemUse = &ItemUse_item_petrov_cluster_bombs;
+ newscript->RegisterSelf();
+}
diff --git a/src/scripts/world/mob_generic_creature.cpp b/src/scripts/world/mob_generic_creature.cpp
new file mode 100644
index 00000000000..75e79cd46b4
--- /dev/null
+++ b/src/scripts/world/mob_generic_creature.cpp
@@ -0,0 +1,259 @@
+/* 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, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+/* ScriptData
+SDName: Generic_Creature
+SD%Complete: 80
+SDComment: Should be replaced with core based AI
+SDCategory: Creatures
+EndScriptData */
+
+#include "ScriptedPch.h"
+
+#define GENERIC_CREATURE_COOLDOWN 5000
+
+struct TRINITY_DLL_DECL generic_creatureAI : public ScriptedAI
+{
+ generic_creatureAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds)
+ uint32 BuffTimer; //This variable keeps track of buffs
+ bool IsSelfRooted;
+
+ void Reset()
+ {
+ GlobalCooldown = 0;
+ BuffTimer = 0; //Rebuff as soon as we can
+ IsSelfRooted = false;
+ }
+
+ void EnterCombat(Unit *who)
+ {
+ if (!m_creature->IsWithinMeleeRange(who))
+ {
+ IsSelfRooted = true;
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ //Always decrease our global cooldown first
+ if (GlobalCooldown > diff)
+ GlobalCooldown -= diff;
+ else GlobalCooldown = 0;
+
+ //Buff timer (only buff when we are alive and not in combat
+ if (!m_creature->isInCombat() && m_creature->isAlive())
+ if (BuffTimer <= diff)
+ {
+ //Find a spell that targets friendly and applies an aura (these are generally buffs)
+ SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
+
+ if (info && !GlobalCooldown)
+ {
+ //Cast the buff spell
+ DoCastSpell(m_creature, info);
+
+ //Set our global cooldown
+ GlobalCooldown = GENERIC_CREATURE_COOLDOWN;
+
+ //Set our timer to 10 minutes before rebuff
+ BuffTimer = 600000;
+ }//Try agian in 30 seconds
+ else BuffTimer = 30000;
+ } else BuffTimer -= diff;
+
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
+
+ //If we are within range melee the target
+ if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ {
+ //Make sure our attack is ready and we arn't currently casting
+ if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
+ {
+ bool Healing = false;
+ SpellEntry const *info = NULL;
+
+ //Select a healing spell if less than 30% hp
+ if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30)
+ info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING);
+
+ //No healing spell available, select a hostile spell
+ if (info) Healing = true;
+ else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE);
+
+ //50% chance if elite or higher, 20% chance if not, to replace our white hit with a spell
+ if (info && (rand() % (m_creature->GetCreatureInfo()->rank > 1 ? 2 : 5) == 0) && !GlobalCooldown)
+ {
+ //Cast the spell
+ if (Healing)DoCastSpell(m_creature, info);
+ else DoCastSpell(m_creature->getVictim(), info);
+
+ //Set our global cooldown
+ GlobalCooldown = GENERIC_CREATURE_COOLDOWN;
+ }
+ else m_creature->AttackerStateUpdate(m_creature->getVictim());
+
+ m_creature->resetAttackTimer();
+ }
+ }
+ else
+ {
+ //Only run this code if we arn't already casting
+ if (!m_creature->IsNonMeleeSpellCasted(false))
+ {
+ bool Healing = false;
+ SpellEntry const *info = NULL;
+
+ //Select a healing spell if less than 30% hp ONLY 33% of the time
+ if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30 && rand() % 3 == 0)
+ info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING);
+
+ //No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE)
+ if (info) Healing = true;
+ else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, NOMINAL_MELEE_RANGE, 0, SELECT_EFFECT_DONTCARE);
+
+ //Found a spell, check if we arn't on cooldown
+ if (info && !GlobalCooldown)
+ {
+ //If we are currently moving stop us and set the movement generator
+ if (!IsSelfRooted)
+ {
+ IsSelfRooted = true;
+ }
+
+ //Cast spell
+ if (Healing) DoCastSpell(m_creature,info);
+ else DoCastSpell(m_creature->getVictim(),info);
+
+ //Set our global cooldown
+ GlobalCooldown = GENERIC_CREATURE_COOLDOWN;
+
+ }//If no spells available and we arn't moving run to target
+ else if (IsSelfRooted)
+ {
+ //Cancel our current spell and then allow movement agian
+ m_creature->InterruptNonMeleeSpells(false);
+ IsSelfRooted = false;
+ }
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_generic_creature(Creature* pCreature)
+{
+ return new generic_creatureAI (pCreature);
+}
+
+struct TRINITY_DLL_DECL trigger_periodicAI : public NullCreatureAI
+{
+ trigger_periodicAI(Creature* c) : NullCreatureAI(c)
+ {
+ spell = me->m_spells[0] ? GetSpellStore()->LookupEntry(me->m_spells[0]) : NULL;
+ interval = me->GetAttackTime(BASE_ATTACK);
+ timer = interval;
+ }
+
+ uint32 timer, interval;
+ const SpellEntry * spell;
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (timer <= diff)
+ {
+ if (spell)
+ me->CastSpell(me, spell, true);
+ timer = interval;
+ }
+ else
+ timer -= diff;
+ }
+};
+
+struct TRINITY_DLL_DECL trigger_deathAI : public NullCreatureAI
+{
+ trigger_deathAI(Creature* c) : NullCreatureAI(c) {}
+ void JustDied(Unit *killer)
+ {
+ if (me->m_spells[0])
+ me->CastSpell(killer, me->m_spells[0], true);
+ }
+};
+
+struct TRINITY_DLL_DECL mob_webwrapAI : public NullCreatureAI
+{
+ mob_webwrapAI(Creature *c) : NullCreatureAI(c), victimGUID(0) {}
+
+ uint64 victimGUID;
+
+ void SetGUID(const uint64 &guid, int32 param)
+ {
+ victimGUID = guid;
+ if (me->m_spells[0] && victimGUID)
+ if (Unit *victim = Unit::GetUnit(*me, victimGUID))
+ victim->CastSpell(victim, me->m_spells[0], true, NULL, NULL, me->GetGUID());
+ }
+
+ void JustDied(Unit *killer)
+ {
+ if (me->m_spells[0] && victimGUID)
+ if (Unit *victim = Unit::GetUnit(*me, victimGUID))
+ victim->RemoveAurasDueToSpell(me->m_spells[0], me->GetGUID());
+ }
+};
+
+CreatureAI* GetAI_trigger_periodic(Creature* pCreature)
+{
+ return new trigger_periodicAI (pCreature);
+}
+
+CreatureAI* GetAI_trigger_death(Creature* pCreature)
+{
+ return new trigger_deathAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_webwrap(Creature* pCreature)
+{
+ return new mob_webwrapAI (pCreature);
+}
+
+void AddSC_generic_creature()
+{
+ Script *newscript;
+ /*newscript = new Script;
+ newscript->Name = "generic_creature";
+ newscript->GetAI = &GetAI_generic_creature;
+ newscript->RegisterSelf();*/
+
+ newscript = new Script;
+ newscript->Name = "trigger_periodic";
+ newscript->GetAI = &GetAI_trigger_periodic;
+ newscript->RegisterSelf();
+
+ /*newscript = new Script;
+ newscript->Name = "trigger_death";
+ newscript->GetAI = &GetAI_trigger_death;
+ newscript->RegisterSelf();*/
+
+ newscript = new Script;
+ newscript->Name = "mob_webwrap";
+ newscript->GetAI = &GetAI_mob_webwrap;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/npc_innkeeper.cpp b/src/scripts/world/npc_innkeeper.cpp
new file mode 100644
index 00000000000..0540a29a2bd
--- /dev/null
+++ b/src/scripts/world/npc_innkeeper.cpp
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Npc_Innkeeper
+SDAuthor: WarHead
+SD%Complete: 99% - SendBindPoint(pCreature); needs question if you really want to bind before the real bind is done (don't know how atm)
+SDComment: Complete
+SDCategory: NPCs
+EndScriptData */
+
+#include "ScriptedPch.h"
+
+#define HALLOWEEN_EVENTID 12
+#define SPELL_TRICK_OR_TREATED 24755
+#define SPELL_TREAT 24715
+
+#define LOCALE_TRICK_OR_TREAT_0 "Trick or Treat!"
+#define LOCALE_TRICK_OR_TREAT_2 "Des bonbons ou des blagues!"
+#define LOCALE_TRICK_OR_TREAT_3 "Süßes oder Saures!"
+#define LOCALE_TRICK_OR_TREAT_6 "¡Truco o trato!"
+
+#define LOCALE_INNKEEPER_0 "Make this inn my home."
+#define LOCALE_INNKEEPER_3 "Ich möchte dieses Gasthaus zu meinem Heimatort machen."
+
+bool GossipHello_npc_innkeeper(Player *pPlayer, Creature *pCreature)
+{
+ if (IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
+ {
+ char* localizedEntry;
+ switch (pPlayer->GetSession()->GetSessionDbcLocale())
+ {
+ case LOCALE_frFR: localizedEntry = LOCALE_TRICK_OR_TREAT_2; break;
+ case LOCALE_deDE: localizedEntry = LOCALE_TRICK_OR_TREAT_3; break;
+ case LOCALE_esES: localizedEntry = LOCALE_TRICK_OR_TREAT_6; break;
+ case LOCALE_enUS: default: localizedEntry = LOCALE_TRICK_OR_TREAT_0;
+ }
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID);
+ }
+
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+
+ if (pCreature->isVendor())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+
+ if (pCreature->isInnkeeper())
+ {
+ char* localizedEntry;
+ switch (pPlayer->GetSession()->GetSessionDbcLocale())
+ {
+ case LOCALE_deDE: localizedEntry = LOCALE_INNKEEPER_3; break;
+ case LOCALE_enUS: default: localizedEntry = LOCALE_INNKEEPER_0;
+ }
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INN);
+ }
+
+ pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
+ {
+ pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true);
+
+ if (urand(0, 1))
+ pPlayer->CastSpell(pPlayer, SPELL_TREAT, true);
+ else
+ {
+ uint32 trickspell = 0;
+ switch (urand(0, 13))
+ {
+ case 0: trickspell = 24753; break; // cannot cast, random 30sec
+ case 1: trickspell = 24713; break; // lepper gnome costume
+ case 2: trickspell = 24735; break; // male ghost costume
+ case 3: trickspell = 24736; break; // female ghostcostume
+ case 4: trickspell = 24710; break; // male ninja costume
+ case 5: trickspell = 24711; break; // female ninja costume
+ case 6: trickspell = 24708; break; // male pirate costume
+ case 7: trickspell = 24709; break; // female pirate costume
+ case 8: trickspell = 24723; break; // skeleton costume
+ case 9: trickspell = 24753; break; // Trick
+ case 10: trickspell = 24924; break; // Hallow's End Candy
+ case 11: trickspell = 24925; break; // Hallow's End Candy
+ case 12: trickspell = 24926; break; // Hallow's End Candy
+ case 13: trickspell = 24927; break; // Hallow's End Candy
+ }
+ pPlayer->CastSpell(pPlayer, trickspell, true);
+ }
+ pPlayer->CLOSE_GOSSIP_MENU();
+ return true;
+ }
+
+ pPlayer->CLOSE_GOSSIP_MENU();
+
+ switch (uiAction)
+ {
+ case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); break;
+ case GOSSIP_ACTION_INN: pPlayer->GetSession()->SendBindPoint(pCreature); break;
+ }
+ return true;
+}
+
+void AddSC_npc_innkeeper()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name = "npc_innkeeper";
+ newscript->pGossipHello = &GossipHello_npc_innkeeper;
+ newscript->pGossipSelect = &GossipSelect_npc_innkeeper;
+ newscript->RegisterSelf();
+}
+
diff --git a/src/scripts/world/npc_professions.cpp b/src/scripts/world/npc_professions.cpp
new file mode 100644
index 00000000000..2fb9ca50d02
--- /dev/null
+++ b/src/scripts/world/npc_professions.cpp
@@ -0,0 +1,1342 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Npc_Professions
+SD%Complete: 80
+SDComment: Provides learn/unlearn/relearn-options for professions. Not supported: Unlearn engineering, re-learn engineering, re-learn leatherworking.
+SDCategory: NPCs
+EndScriptData */
+
+#include "ScriptedPch.h"
+
+/*
+A few notes for future developement:
+- A full implementation of gossip for GO's is required. They must have the same scripting capabilities as creatures. Basically,
+there is no difference here (except that default text is chosen with `gameobject_template`.`data3` (for GO type2, different dataN for a few others)
+- It's possible blacksmithing still require some tweaks and adjustments due to the way we _have_ to use reputation.
+*/
+
+/*
+-- UPDATE `gameobject_template` SET `ScriptName` = 'go_soothsaying_for_dummies' WHERE `entry` = 177226;
+*/
+
+/*###
+# to be removed from here (->ncp_text). This is data for database projects.
+###*/
+#define TALK_MUST_UNLEARN_WEAPON "You must forget your weapon type specialty before I can help you. Go to Everlook in Winterspring and seek help there."
+
+#define TALK_HAMMER_LEARN "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the hammersmith."
+#define TALK_AXE_LEARN "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the axesmith."
+#define TALK_SWORD_LEARN "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the swordsmith."
+
+#define TALK_HAMMER_UNLEARN "Forgetting your Hammersmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Hammersmithing to create!"
+#define TALK_AXE_UNLEARN "Forgetting your Axesmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Axesmithing to create!"
+#define TALK_SWORD_UNLEARN "Forgetting your Swordsmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Swordsmithing to create!"
+
+/*###
+# generic defines
+###*/
+
+#define GOSSIP_SENDER_LEARN 50
+#define GOSSIP_SENDER_UNLEARN 51
+#define GOSSIP_SENDER_CHECK 52
+
+/*###
+# gossip item and box texts
+###*/
+
+#define GOSSIP_LEARN_POTION "Please teach me how to become a Master of Potions, Lauranna"
+#define GOSSIP_UNLEARN_POTION "I wish to unlearn Potion Mastery"
+#define GOSSIP_LEARN_TRANSMUTE "Please teach me how to become a Master of Transmutations, Zarevhi"
+#define GOSSIP_UNLEARN_TRANSMUTE "I wish to unlearn Transmutation Mastery"
+#define GOSSIP_LEARN_ELIXIR "Please teach me how to become a Master of Elixirs, Lorokeem"
+#define GOSSIP_UNLEARN_ELIXIR "I wish to unlearn Elixir Mastery"
+
+#define BOX_UNLEARN_ALCHEMY_SPEC "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: "
+
+#define GOSSIP_WEAPON_LEARN "Please teach me how to become a Weaponsmith"
+#define GOSSIP_WEAPON_UNLEARN "I wish to unlearn the art of Weaponsmithing"
+#define GOSSIP_ARMOR_LEARN "Please teach me how to become a Armorsmith"
+#define GOSSIP_ARMOR_UNLEARN "I wish to unlearn the art of Armorsmithing"
+
+#define GOSSIP_UNLEARN_SMITH_SPEC "I wish to unlearn my blacksmith specialty"
+#define BOX_UNLEARN_ARMORORWEAPON "Do you really want to unlearn your blacksmith specialty and lose all associated recipes? \n Cost: "
+
+#define GOSSIP_LEARN_HAMMER "Please teach me how to become a Hammersmith, Lilith"
+#define GOSSIP_UNLEARN_HAMMER "I wish to unlearn Hammersmithing"
+#define GOSSIP_LEARN_AXE "Please teach me how to become a Axesmith, Kilram"
+#define GOSSIP_UNLEARN_AXE "I wish to unlearn Axesmithing"
+#define GOSSIP_LEARN_SWORD "Please teach me how to become a Swordsmith, Seril"
+#define GOSSIP_UNLEARN_SWORD "I wish to unlearn Swordsmithing"
+
+#define BOX_UNLEARN_WEAPON_SPEC "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: "
+
+#define GOSSIP_LEARN_DRAGON "I am absolutely certain that i want to learn dragonscale leatherworking"
+#define GOSSIP_UNLEARN_DRAGON "I wish to unlearn Dragonscale Leatherworking"
+#define GOSSIP_LEARN_ELEMENTAL "I am absolutely certain that i want to learn elemental leatherworking"
+#define GOSSIP_UNLEARN_ELEMENTAL "I wish to unlearn Elemental Leatherworking"
+#define GOSSIP_LEARN_TRIBAL "I am absolutely certain that i want to learn tribal leatherworking"
+#define GOSSIP_UNLEARN_TRIBAL "I wish to unlearn Tribal Leatherworking"
+
+#define BOX_UNLEARN_LEATHER_SPEC "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: "
+
+#define GOSSIP_LEARN_SPELLFIRE "Please teach me how to become a Spellcloth tailor"
+#define GOSSIP_UNLEARN_SPELLFIRE "I wish to unlearn Spellfire Tailoring"
+#define GOSSIP_LEARN_MOONCLOTH "Please teach me how to become a Mooncloth tailor"
+#define GOSSIP_UNLEARN_MOONCLOTH "I wish to unlearn Mooncloth Tailoring"
+#define GOSSIP_LEARN_SHADOWEAVE "Please teach me how to become a Shadoweave tailor"
+#define GOSSIP_UNLEARN_SHADOWEAVE "I wish to unlearn Shadoweave Tailoring"
+
+#define BOX_UNLEARN_TAILOR_SPEC "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: "
+
+#define GOSSIP_LEARN_GOBLIN "I am absolutely certain that i want to learn Goblin engineering"
+#define GOSSIP_LEARN_GNOMISH "I am absolutely certain that i want to learn Gnomish engineering"
+
+/*###
+# spells defines
+###*/
+
+#define S_WEAPON 9787
+#define S_ARMOR 9788
+#define S_HAMMER 17040
+#define S_AXE 17041
+#define S_SWORD 17039
+
+#define S_LEARN_WEAPON 9789
+#define S_LEARN_ARMOR 9790
+#define S_LEARN_HAMMER 39099
+#define S_LEARN_AXE 39098
+#define S_LEARN_SWORD 39097
+
+#define S_UNLEARN_WEAPON 36436
+#define S_UNLEARN_ARMOR 36435
+#define S_UNLEARN_HAMMER 36441
+#define S_UNLEARN_AXE 36439
+#define S_UNLEARN_SWORD 36438
+
+#define S_REP_ARMOR 17451
+#define S_REP_WEAPON 17452
+
+#define REP_ARMOR 46
+#define REP_WEAPON 289
+#define REP_HAMMER 569
+#define REP_AXE 570
+#define REP_SWORD 571
+
+#define S_DRAGON 10656
+#define S_ELEMENTAL 10658
+#define S_TRIBAL 10660
+
+#define S_LEARN_DRAGON 10657
+#define S_LEARN_ELEMENTAL 10659
+#define S_LEARN_TRIBAL 10661
+
+#define S_UNLEARN_DRAGON 36434
+#define S_UNLEARN_ELEMENTAL 36328
+#define S_UNLEARN_TRIBAL 36433
+
+#define S_GOBLIN 20222
+#define S_GNOMISH 20219
+
+#define S_LEARN_GOBLIN 20221
+#define S_LEARN_GNOMISH 20220
+
+#define S_SPELLFIRE 26797
+#define S_MOONCLOTH 26798
+#define S_SHADOWEAVE 26801
+
+#define S_LEARN_SPELLFIRE 26796
+#define S_LEARN_MOONCLOTH 26799
+#define S_LEARN_SHADOWEAVE 26800
+
+#define S_UNLEARN_SPELLFIRE 41299
+#define S_UNLEARN_MOONCLOTH 41558
+#define S_UNLEARN_SHADOWEAVE 41559
+
+#define S_TRANSMUTE 28672
+#define S_ELIXIR 28677
+#define S_POTION 28675
+
+#define S_LEARN_TRANSMUTE 28674
+#define S_LEARN_ELIXIR 28678
+#define S_LEARN_POTION 28676
+
+#define S_UNLEARN_TRANSMUTE 41565
+#define S_UNLEARN_ELIXIR 41564
+#define S_UNLEARN_POTION 41563
+
+/*###
+# formulas to calculate unlearning cost
+###*/
+
+int32 DoLearnCost(Player* pPlayer) //tailor, alchemy
+{
+ return 200000;
+}
+
+int32 DoHighUnlearnCost(Player* pPlayer) //tailor, alchemy
+{
+ return 1500000;
+}
+
+int32 DoMedUnlearnCost(Player* pPlayer) //blacksmith, leatherwork
+{
+ uint8 level = pPlayer->getLevel();
+ if (level < 51)
+ return 250000;
+ else if (level < 66)
+ return 500000;
+ else
+ return 1000000;
+}
+
+int32 DoLowUnlearnCost(Player* pPlayer) //blacksmith
+{
+ uint8 level = pPlayer->getLevel();
+ if (level < 66)
+ return 50000;
+ else
+ return 100000;
+}
+
+/*###
+# unlearning related profession spells
+###*/
+
+bool EquippedOk(Player* pPlayer, uint32 spellId)
+{
+ SpellEntry const* spell = GetSpellStore()->LookupEntry(spellId);
+
+ if (!spell)
+ return false;
+
+ for (uint8 i = 0; i < 3; ++i)
+ {
+ uint32 reqSpell = spell->EffectTriggerSpell[i];
+ if (!reqSpell)
+ continue;
+
+ Item* pItem;
+ for (uint8 j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; ++j)
+ {
+ pItem = pPlayer->GetItemByPos(INVENTORY_SLOT_BAG_0, j);
+ if (pItem)
+ if (pItem->GetProto()->RequiredSpell == reqSpell)
+ {
+ //player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
+ debug_log("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+void ProfessionUnlearnSpells(Player* pPlayer, uint32 type)
+{
+ switch (type)
+ {
+ case 36436: // S_UNLEARN_WEAPON
+ pPlayer->removeSpell(36125); // Light Earthforged Blade
+ pPlayer->removeSpell(36128); // Light Emberforged Hammer
+ pPlayer->removeSpell(36126); // Light Skyforged Axe
+ break;
+ case 36435: // S_UNLEARN_ARMOR
+ pPlayer->removeSpell(36122); // Earthforged Leggings
+ pPlayer->removeSpell(36129); // Heavy Earthforged Breastplate
+ pPlayer->removeSpell(36130); // Stormforged Hauberk
+ pPlayer->removeSpell(34533); // Breastplate of Kings
+ pPlayer->removeSpell(34529); // Nether Chain Shirt
+ pPlayer->removeSpell(34534); // Bulwark of Kings
+ pPlayer->removeSpell(36257); // Bulwark of the Ancient Kings
+ pPlayer->removeSpell(36256); // Embrace of the Twisting Nether
+ pPlayer->removeSpell(34530); // Twisting Nether Chain Shirt
+ pPlayer->removeSpell(36124); // Windforged Leggings
+ break;
+ case 36441: // S_UNLEARN_HAMMER
+ pPlayer->removeSpell(36262); // Dragonstrike
+ pPlayer->removeSpell(34546); // Dragonmaw
+ pPlayer->removeSpell(34545); // Drakefist Hammer
+ pPlayer->removeSpell(36136); // Lavaforged Warhammer
+ pPlayer->removeSpell(34547); // Thunder
+ pPlayer->removeSpell(34567); // Deep Thunder
+ pPlayer->removeSpell(36263); // Stormherald
+ pPlayer->removeSpell(36137); // Great Earthforged Hammer
+ break;
+ case 36439: // S_UNLEARN_AXE
+ pPlayer->removeSpell(36260); // Wicked Edge of the Planes
+ pPlayer->removeSpell(34562); // Black Planar Edge
+ pPlayer->removeSpell(34541); // The Planar Edge
+ pPlayer->removeSpell(36134); // Stormforged Axe
+ pPlayer->removeSpell(36135); // Skyforged Great Axe
+ pPlayer->removeSpell(36261); // Bloodmoon
+ pPlayer->removeSpell(34543); // Lunar Crescent
+ pPlayer->removeSpell(34544); // Mooncleaver
+ break;
+ case 36438: // S_UNLEARN_SWORD
+ pPlayer->removeSpell(36258); // Blazefury
+ pPlayer->removeSpell(34537); // Blazeguard
+ pPlayer->removeSpell(34535); // Fireguard
+ pPlayer->removeSpell(36131); // Windforged Rapier
+ pPlayer->removeSpell(36133); // Stoneforged Claymore
+ pPlayer->removeSpell(34538); // Lionheart Blade
+ pPlayer->removeSpell(34540); // Lionheart Champion
+ pPlayer->removeSpell(36259); // Lionheart Executioner
+ break;
+ case 36434: // S_UNLEARN_DRAGON
+ pPlayer->removeSpell(36076); // Dragonstrike Leggings
+ pPlayer->removeSpell(36079); // Golden Dragonstrike Breastplate
+ pPlayer->removeSpell(35576); // Ebon Netherscale Belt
+ pPlayer->removeSpell(35577); // Ebon Netherscale Bracers
+ pPlayer->removeSpell(35575); // Ebon Netherscale Breastplate
+ pPlayer->removeSpell(35582); // Netherstrike Belt
+ pPlayer->removeSpell(35584); // Netherstrike Bracers
+ pPlayer->removeSpell(35580); // Netherstrike Breastplate
+ break;
+ case 36328: // S_UNLEARN_ELEMENTAL
+ pPlayer->removeSpell(36074); // Blackstorm Leggings
+ pPlayer->removeSpell(36077); // Primalstorm Breastplate
+ pPlayer->removeSpell(35590); // Primalstrike Belt
+ pPlayer->removeSpell(35591); // Primalstrike Bracers
+ pPlayer->removeSpell(35589); // Primalstrike Vest
+ break;
+ case 36433: // S_UNLEARN_TRIBAL
+ pPlayer->removeSpell(35585); // Windhawk Hauberk
+ pPlayer->removeSpell(35587); // Windhawk Belt
+ pPlayer->removeSpell(35588); // Windhawk Bracers
+ pPlayer->removeSpell(36075); // Wildfeather Leggings
+ pPlayer->removeSpell(36078); // Living Crystal Breastplate
+ break;
+ case 41299: // S_UNLEARN_SPELLFIRE
+ pPlayer->removeSpell(26752); // Spellfire Belt
+ pPlayer->removeSpell(26753); // Spellfire Gloves
+ pPlayer->removeSpell(26754); // Spellfire Robe
+ break;
+ case 41558: // S_UNLEARN_MOONCLOTH
+ pPlayer->removeSpell(26760); // Primal Mooncloth Belt
+ pPlayer->removeSpell(26761); // Primal Mooncloth Shoulders
+ pPlayer->removeSpell(26762); // Primal Mooncloth Robe
+ break;
+ case 41559: // S_UNLEARN_SHADOWEAVE
+ pPlayer->removeSpell(26756); // Frozen Shadoweave Shoulders
+ pPlayer->removeSpell(26757); // Frozen Shadoweave Boots
+ pPlayer->removeSpell(26758); // Frozen Shadoweave Robe
+ break;
+ }
+}
+
+/*###
+# start menues alchemy
+###*/
+
+bool HasAlchemySpell(Player* pPlayer)
+{
+ if (pPlayer->HasSpell(S_TRANSMUTE) || pPlayer->HasSpell(S_ELIXIR) || pPlayer->HasSpell(S_POTION))
+ return true;
+ return false;
+}
+
+bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+ if (pCreature->isVendor())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+ if (pCreature->isTrainer())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
+
+ uint32 eCreature = pCreature->GetEntry();
+
+ if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY)>=350 && pPlayer->getLevel() > 67)
+ {
+ if (pPlayer->GetQuestRewardStatus(10899) || pPlayer->GetQuestRewardStatus(10902) || pPlayer->GetQuestRewardStatus(10897))
+ {
+ switch (eCreature)
+ {
+ case 22427: //Zarevhi
+ if (!HasAlchemySpell(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1);
+ if (pPlayer->HasSpell(S_TRANSMUTE))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4);
+ break;
+ case 19052: //Lorokeem
+ if (!HasAlchemySpell(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2);
+ if (pPlayer->HasSpell(S_ELIXIR))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5);
+ break;
+ case 17909: //Lauranna Thar'well
+ if (!HasAlchemySpell(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3);
+ if (pPlayer->HasSpell(S_POTION))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6);
+ break;
+ }
+ }
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_TRADE:
+ pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_TRAIN:
+ pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
+ break;
+ //Learn Alchemy
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ if (!pPlayer->HasSpell(S_TRANSMUTE) && pPlayer->GetMoney() >= DoLearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_TRANSMUTE, true);
+ pPlayer->ModifyMoney(-DoLearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ if (!pPlayer->HasSpell(S_ELIXIR) && pPlayer->GetMoney() >= DoLearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_ELIXIR, true);
+ pPlayer->ModifyMoney(-DoLearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ if (!pPlayer->HasSpell(S_POTION) && pPlayer->GetMoney() >= DoLearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_POTION, true);
+ pPlayer->ModifyMoney(-DoLearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ //Unlearn Alchemy
+ case GOSSIP_ACTION_INFO_DEF + 4:
+ if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer))
+ {
+ pCreature->CastSpell(pPlayer, S_UNLEARN_TRANSMUTE, true);
+ pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5:
+ if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer))
+ {
+ pCreature->CastSpell(pPlayer, S_UNLEARN_ELIXIR, true);
+ pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6:
+ if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer))
+ {
+ pCreature->CastSpell(pPlayer, S_UNLEARN_POTION, true);
+ pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ }
+}
+
+void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 22427:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 19052:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 17909:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 22427: //Zarevhi
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 19052: //Lorokeem
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 17909: //Lauranna Thar'well
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+bool GossipSelect_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*###
+# start menues blacksmith
+###*/
+
+bool HasWeaponSub(Player* pPlayer)
+{
+ if (pPlayer->HasSpell(S_HAMMER) || pPlayer->HasSpell(S_AXE) || pPlayer->HasSpell(S_SWORD))
+ return true;
+ return false;
+}
+
+bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+ if (pCreature->isVendor())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+ if (pCreature->isTrainer())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
+
+ uint32 eCreature = pCreature->GetEntry();
+ //WEAPONSMITH & ARMORSMITH
+ if (pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=225)
+ {
+ switch (eCreature)
+ {
+ case 11145: //Myolor Sunderfury
+ case 11176: //Krathok Moltenfist
+ if (!pPlayer->HasSpell(S_ARMOR) && !pPlayer->HasSpell(S_WEAPON) && pPlayer->GetReputationRank(REP_ARMOR) >= REP_FRIENDLY)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ if (!pPlayer->HasSpell(S_WEAPON) && !pPlayer->HasSpell(S_ARMOR) && pPlayer->GetReputationRank(REP_WEAPON) >= REP_FRIENDLY)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ break;
+ case 11146: //Ironus Coldsteel
+ case 11178: //Borgosh Corebender
+ if (pPlayer->HasSpell(S_WEAPON))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3);
+ break;
+ case 5164: //Grumnus Steelshaper
+ case 11177: //Okothos Ironrager
+ if (pPlayer->HasSpell(S_ARMOR))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4);
+ break;
+ }
+ }
+ //WEAPONSMITH SPEC
+ if (pPlayer->HasSpell(S_WEAPON) && pPlayer->getLevel() > 49 && pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=250)
+ {
+ switch (eCreature)
+ {
+ case 11191: //Lilith the Lithe
+ if (!HasWeaponSub(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 5);
+ if (pPlayer->HasSpell(S_HAMMER))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 8);
+ break;
+ case 11192: //Kilram
+ if (!HasWeaponSub(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 6);
+ if (pPlayer->HasSpell(S_AXE))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 9);
+ break;
+ case 11193: //Seril Scourgebane
+ if (!HasWeaponSub(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 7);
+ if (pPlayer->HasSpell(S_SWORD))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 10);
+ break;
+ }
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_TRADE:
+ pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_TRAIN:
+ pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
+ break;
+ //Learn Armor/Weapon
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ if (!pPlayer->HasSpell(S_ARMOR))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_ARMOR, true);
+ //_Creature->CastSpell(pPlayer, S_REP_ARMOR, true);
+ }
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ if (!pPlayer->HasSpell(S_WEAPON))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_WEAPON, true);
+ //_Creature->CastSpell(pPlayer, S_REP_WEAPON, true);
+ }
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ //Unlearn Armor/Weapon
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ if (HasWeaponSub(pPlayer))
+ {
+ //unknown textID (TALK_MUST_UNLEARN_WEAPON)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ }
+ else if (EquippedOk(pPlayer,S_UNLEARN_WEAPON))
+ {
+ if (pPlayer->GetMoney() >= DoLowUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_WEAPON, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_WEAPON);
+ pPlayer->ModifyMoney(-DoLowUnlearnCost(pPlayer));
+ pCreature->CastSpell(pPlayer, S_REP_ARMOR, true);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ }
+ else
+ {
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ }
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4:
+ if (EquippedOk(pPlayer,S_UNLEARN_ARMOR))
+ {
+ if (pPlayer->GetMoney() >= DoLowUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_ARMOR, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_ARMOR);
+ pPlayer->ModifyMoney(-DoLowUnlearnCost(pPlayer));
+ pCreature->CastSpell(pPlayer, S_REP_WEAPON, true);
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ //Learn Hammer/Axe/Sword
+ case GOSSIP_ACTION_INFO_DEF + 5:
+ pPlayer->CastSpell(pPlayer, S_LEARN_HAMMER, true);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6:
+ pPlayer->CastSpell(pPlayer, S_LEARN_AXE, true);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7:
+ pPlayer->CastSpell(pPlayer, S_LEARN_SWORD, true);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ //Unlearn Hammer/Axe/Sword
+ case GOSSIP_ACTION_INFO_DEF + 8:
+ if (EquippedOk(pPlayer,S_UNLEARN_HAMMER))
+ {
+ if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_HAMMER, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_HAMMER);
+ pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9:
+ if (EquippedOk(pPlayer,S_UNLEARN_AXE))
+ {
+ if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_AXE, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_AXE);
+ pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10:
+ if (EquippedOk(pPlayer,S_UNLEARN_SWORD))
+ {
+ if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_SWORD, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SWORD);
+ pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ }
+}
+
+void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 11191:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID (TALK_HAMMER_LEARN)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 11192:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID (TALK_AXE_LEARN)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 11193:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID (TALK_SWORD_LEARN)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 11146: //Ironus Coldsteel
+ case 11178: //Borgosh Corebender
+ case 5164: //Grumnus Steelshaper
+ case 11177: //Okothos Ironrager
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, DoLowUnlearnCost(pPlayer),false);
+ //unknown textID (TALK_UNLEARN_AXEORWEAPON)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+
+ case 11191:
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
+ //unknown textID (TALK_HAMMER_UNLEARN)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 11192:
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
+ //unknown textID (TALK_AXE_UNLEARN)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 11193:
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
+ //unknown textID (TALK_SWORD_UNLEARN)
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*bool QuestComplete_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, Quest const *_Quest)
+{
+ if ((_Quest->GetQuestId() == 5283) || (_Quest->GetQuestId() == 5301)) //armorsmith
+ pCreature->CastSpell(pPlayer, 17451, true);
+
+ if ((_Quest->GetQuestId() == 5284) || (_Quest->GetQuestId() == 5302)) //weaponsmith
+ pCreature->CastSpell(pPlayer, 17452, true);
+
+ return true;
+}*/
+
+/*###
+# engineering trinkets
+###*/
+
+enum eEngineeringTrinkets
+{
+ NPC_ZAP = 14742,
+ NPC_JHORDY = 14743,
+ NPC_KABLAM = 21493,
+ NPC_SMILES = 21494,
+
+ SPELL_LEARN_TO_EVERLOOK = 23490,
+ SPELL_LEARN_TO_GADGET = 23491,
+ SPELL_LEARN_TO_AREA52 = 36956,
+ SPELL_LEARN_TO_TOSHLEY = 36957,
+
+ SPELL_TO_EVERLOOK = 23486,
+ SPELL_TO_GADGET = 23489,
+ SPELL_TO_AREA52 = 36954,
+ SPELL_TO_TOSHLEY = 36955,
+
+ ITEM_GNOMISH_CARD = 10790,
+ ITEM_GOBLIN_CARD = 10791
+};
+
+#define GOSSIP_ITEM_ZAP "[PH] Unknown"
+#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!"
+#define GOSSIP_ITEM_KABLAM "[PH] Unknown"
+#define GOSSIP_ITEM_SMILES "[PH] Unknown"
+
+bool GossipHello_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature)
+{
+ uint32 NpcTextId = 0;
+ std::string GossipItem;
+ bool CanLearn = false;
+
+ if (pPlayer->HasSkill(SKILL_ENGINERING))
+ {
+ switch(pCreature->GetEntry())
+ {
+ case NPC_ZAP:
+ NpcTextId = 7249;
+ if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 260 && pPlayer->HasSpell(S_GOBLIN))
+ {
+ if (!pPlayer->HasSpell(SPELL_TO_EVERLOOK))
+ {
+ CanLearn = true;
+ GossipItem = GOSSIP_ITEM_ZAP;
+ }
+ else if (pPlayer->HasSpell(SPELL_TO_EVERLOOK))
+ NpcTextId = 0;
+ }
+ break;
+ case NPC_JHORDY:
+ NpcTextId = 7251;
+ if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 260 && pPlayer->HasSpell(S_GNOMISH))
+ {
+ if (!pPlayer->HasSpell(SPELL_TO_GADGET))
+ {
+ CanLearn = true;
+ GossipItem = GOSSIP_ITEM_JHORDY;
+ }
+ else if (pPlayer->HasSpell(SPELL_TO_GADGET))
+ NpcTextId = 7252;
+ }
+ break;
+ case NPC_KABLAM:
+ NpcTextId = 10365;
+ if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 350 && pPlayer->HasSpell(S_GOBLIN))
+ {
+ if (!pPlayer->HasSpell(SPELL_TO_AREA52))
+ {
+ CanLearn = true;
+ GossipItem = GOSSIP_ITEM_KABLAM;
+ }
+ else if (pPlayer->HasSpell(SPELL_TO_AREA52))
+ NpcTextId = 0;
+ }
+ break;
+ case NPC_SMILES:
+ NpcTextId = 10363;
+ if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 350 && pPlayer->HasSpell(S_GNOMISH))
+ {
+ if (!pPlayer->HasSpell(SPELL_TO_TOSHLEY))
+ {
+ CanLearn = true;
+ GossipItem = GOSSIP_ITEM_SMILES;
+ }
+ else if (pPlayer->HasSpell(SPELL_TO_TOSHLEY))
+ NpcTextId = 0;
+ }
+ break;
+ }
+ }
+
+ if (CanLearn)
+ {
+ if (pPlayer->HasItemCount(ITEM_GOBLIN_CARD,1) || pPlayer->HasItemCount(ITEM_GNOMISH_CARD,1))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GossipItem, pCreature->GetEntry(), GOSSIP_ACTION_INFO_DEF+1);
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(NpcTextId ? NpcTextId : pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
+ pPlayer->CLOSE_GOSSIP_MENU();
+
+ if (uiSender != pCreature->GetEntry())
+ return true;
+
+ switch(uiSender)
+ {
+ case NPC_ZAP:
+ pPlayer->CastSpell(pPlayer, SPELL_LEARN_TO_EVERLOOK, false);
+ break;
+ case NPC_JHORDY:
+ pPlayer->CastSpell(pPlayer, SPELL_LEARN_TO_GADGET, false);
+ break;
+ case NPC_KABLAM:
+ pPlayer->CastSpell(pPlayer, SPELL_LEARN_TO_AREA52, false);
+ break;
+ case NPC_SMILES:
+ pPlayer->CastSpell(pPlayer, SPELL_LEARN_TO_TOSHLEY, false);
+ break;
+ }
+
+ return true;
+}
+
+/*###
+# start menues leatherworking
+###*/
+
+bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+ if (pCreature->isVendor())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+ if (pCreature->isTrainer())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
+
+ uint32 eCreature = pCreature->GetEntry();
+
+ if (pPlayer->HasSkill(SKILL_LEATHERWORKING) && pPlayer->GetBaseSkillValue(SKILL_LEATHERWORKING)>=250 && pPlayer->getLevel() > 49)
+ {
+ switch (eCreature)
+ {
+ case 7866: //Peter Galen
+ case 7867: //Thorkaf Dragoneye
+ if (pPlayer->HasSpell(S_DRAGON))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 1);
+ break;
+ case 7868: //Sarah Tanner
+ case 7869: //Brumn Winterhoof
+ if (pPlayer->HasSpell(S_ELEMENTAL))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 2);
+ break;
+ case 7870: //Caryssia Moonhunter
+ case 7871: //Se'Jib
+ if (pPlayer->HasSpell(S_TRIBAL))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3);
+ break;
+ }
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_TRADE:
+ pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_TRAIN:
+ pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
+ break;
+ //Unlearn Leather
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ if (EquippedOk(pPlayer,S_UNLEARN_DRAGON))
+ {
+ if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_DRAGON, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_DRAGON);
+ pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ if (EquippedOk(pPlayer,S_UNLEARN_ELEMENTAL))
+ {
+ if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_ELEMENTAL, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_ELEMENTAL);
+ pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ if (EquippedOk(pPlayer,S_UNLEARN_TRIBAL))
+ {
+ if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_TRIBAL, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_TRIBAL);
+ pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ }
+}
+
+void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 7866: //Peter Galen
+ case 7867: //Thorkaf Dragoneye
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 7868: //Sarah Tanner
+ case 7869: //Brumn Winterhoof
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 7870: //Caryssia Moonhunter
+ case 7871: //Se'Jib
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+bool GossipSelect_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_leather(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*###
+# start menues tailoring
+###*/
+
+bool HasTailorSpell(Player* pPlayer)
+{
+ if (pPlayer->HasSpell(S_MOONCLOTH) || pPlayer->HasSpell(S_SHADOWEAVE) || pPlayer->HasSpell(S_SPELLFIRE))
+ return true;
+ return false;
+}
+
+bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+ if (pCreature->isVendor())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+ if (pCreature->isTrainer())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
+
+ uint32 eCreature = pCreature->GetEntry();
+ //TAILORING SPEC
+ if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING)>=350 && pPlayer->getLevel() > 59)
+ {
+ if (pPlayer->GetQuestRewardStatus(10831) || pPlayer->GetQuestRewardStatus(10832) || pPlayer->GetQuestRewardStatus(10833))
+ {
+ switch (eCreature)
+ {
+ case 22213: //Gidge Spellweaver
+ if (!HasTailorSpell(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1);
+ if (pPlayer->HasSpell(S_SPELLFIRE))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4);
+ break;
+ case 22208: //Nasmara Moonsong
+ if (!HasTailorSpell(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2);
+ if (pPlayer->HasSpell(S_MOONCLOTH))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5);
+ break;
+ case 22212: //Andrion Darkspinner
+ if (!HasTailorSpell(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3);
+ if (pPlayer->HasSpell(S_SHADOWEAVE))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6);
+ break;
+ }
+ }
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_TRADE:
+ pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_TRAIN:
+ pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
+ break;
+ //Learn Tailor
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ if (!pPlayer->HasSpell(S_SPELLFIRE) && pPlayer->GetMoney() >= DoLearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_SPELLFIRE, true);
+ pPlayer->ModifyMoney(-DoLearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ if (!pPlayer->HasSpell(S_MOONCLOTH) && pPlayer->GetMoney() >= DoLearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_MOONCLOTH, true);
+ pPlayer->ModifyMoney(-DoLearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ if (!pPlayer->HasSpell(S_SHADOWEAVE) && pPlayer->GetMoney() >= DoLearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_LEARN_SHADOWEAVE, true);
+ pPlayer->ModifyMoney(-DoLearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ //Unlearn Tailor
+ case GOSSIP_ACTION_INFO_DEF + 4:
+ if (EquippedOk(pPlayer,S_UNLEARN_SPELLFIRE))
+ {
+ if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_SPELLFIRE, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SPELLFIRE);
+ pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5:
+ if (EquippedOk(pPlayer,S_UNLEARN_MOONCLOTH))
+ {
+ if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_MOONCLOTH, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_MOONCLOTH);
+ pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6:
+ if (EquippedOk(pPlayer,S_UNLEARN_SHADOWEAVE))
+ {
+ if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer))
+ {
+ pPlayer->CastSpell(pPlayer, S_UNLEARN_SHADOWEAVE, true);
+ ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SHADOWEAVE);
+ pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer));
+ } else
+ pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0);
+ } else
+ pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
+ }
+}
+
+void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 22213:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 22208:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 22212:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ if (uiAction)
+ {
+ uint32 eCreature = pCreature->GetEntry();
+ switch(eCreature)
+ {
+ case 22213: //Gidge Spellweaver
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 22208: //Nasmara Moonsong
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ case 22212: //Andrion Darkspinner
+ pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction,BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
+ //unknown textID ()
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ break;
+ }
+ }
+}
+
+bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiSender)
+ {
+ case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
+ case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
+ }
+ return true;
+}
+
+/*###
+# start menues for GO (engineering and leatherworking)
+###*/
+
+/*bool GOHello_go_soothsaying_for_dummies(Player* pPlayer, GameObject* pGo)
+{
+ pPlayer->PlayerTalkClass->GetGossipMenu()->AddMenuItem(0,GOSSIP_LEARN_DRAGON, GOSSIP_SENDER_INFO, GOSSIP_ACTION_INFO_DEF, "", 0);
+
+ pPlayer->SEND_GOSSIP_MENU(5584, pGo->GetGUID());
+
+ return true;
+}*/
+
+/*###
+#
+###*/
+
+void AddSC_npc_professions()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "npc_prof_alchemy";
+ newscript->pGossipHello = &GossipHello_npc_prof_alchemy;
+ newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_prof_blacksmith";
+ newscript->pGossipHello = &GossipHello_npc_prof_blacksmith;
+ newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_engineering_tele_trinket";
+ newscript->pGossipHello = &GossipHello_npc_engineering_tele_trinket;
+ newscript->pGossipSelect = &GossipSelect_npc_engineering_tele_trinket;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_prof_leather";
+ newscript->pGossipHello = &GossipHello_npc_prof_leather;
+ newscript->pGossipSelect = &GossipSelect_npc_prof_leather;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_prof_tailor";
+ newscript->pGossipHello = &GossipHello_npc_prof_tailor;
+ newscript->pGossipSelect = &GossipSelect_npc_prof_tailor;
+ newscript->RegisterSelf();
+
+ /*newscript = new Script;
+ newscript->Name = "go_soothsaying_for_dummies";
+ newscript->pGOHello = &GOHello_go_soothsaying_for_dummies;
+ //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies;
+ newscript->RegisterSelf();*/
+}
+
diff --git a/src/scripts/world/npc_taxi.cpp b/src/scripts/world/npc_taxi.cpp
new file mode 100644
index 00000000000..2bf12941df6
--- /dev/null
+++ b/src/scripts/world/npc_taxi.cpp
@@ -0,0 +1,326 @@
+/* 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Npc_Taxi
+SD%Complete: 0%
+SDComment: To be used for taxi NPCs that are located globally.
+SDCategory: NPCs
+EndScriptData
+*/
+
+#include "ScriptedPch.h"
+
+#define GOSSIP_SUSURRUS "I am ready."
+#define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!"
+#define GOSSIP_BRAZEN "I am ready to go to Durnholde Keep."
+#define GOSSIP_IRONWING "I'd like to take a flight around Stormwind Harbor."
+#define GOSSIP_DABIREE1 "Fly me to Murketh and Shaadraz Gateways"
+#define GOSSIP_DABIREE2 "Fly me to Shatter Point"
+#define GOSSIP_WINDBELLOW1 "Fly me to The Abyssal Shelf"
+#define GOSSIP_WINDBELLOW2 "Fly me to Honor Point"
+#define GOSSIP_BRACK1 "Fly me to Murketh and Shaadraz Gateways"
+#define GOSSIP_BRACK2 "Fly me to The Abyssal Shelf"
+#define GOSSIP_BRACK3 "Fly me to Spinebreaker Post"
+#define GOSSIP_IRENA "Fly me to Skettis please"
+#define GOSSIP_CLOUDBREAKER1 "Speaking of uiAction, I've been ordered to undertake an air strike."
+#define GOSSIP_CLOUDBREAKER2 "I need to intercept the Dawnblade reinforcements."
+#define GOSSIP_DRAGONHAWK "<Ride the dragonhawk to Sun's Reach>"
+#define GOSSIP_VERONIA "Fly me to Manaforge Coruu please"
+#define GOSSIP_DEESAK "Fly me to Ogri'la please"
+#define GOSSIP_AFRASASTRASZ1 "I would like to take a flight to the ground, Lord Of Afrasastrasz."
+#define GOSSIP_AFRASASTRASZ2 "My Lord, I must go to the upper floor of the temple."
+#define GOSSIP_TARIOLSTRASZ1 "My Lord, I must go to the upper floor of the temple."
+#define GOSSIP_TARIOLSTRASZ2 "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?"
+#define GOSSIP_TORASTRASZA1 "I would like to see Lord Of Afrasastrasz, in the middle of the temple."
+#define GOSSIP_TORASTRASZA2 "Yes, Please. I would like to return to the ground floor of the temple."
+#define GOSSIP_CAMILLE1 "I need to fly to the Windrunner Official business!"
+#define GOSSIP_CAMILLE2 "<The riding bat for the special task is necessary to me.>"
+#define GOSSIP_CRIMSONWING "<Ride the gryphons to Survey Alcaz Island>"
+#define GOSSIP_THRICESTAR1 "Do you think I could take a ride on one of those flying machines?"
+#define GOSSIP_THRICESTAR2 "Kara, I need to be flown out the Dens of Dying to find Bixie."
+#define GOSSIP_WILLIAMKEILAR1 "Take me to Northpass Tower."
+#define GOSSIP_WILLIAMKEILAR2 "Take me to Eastwall Tower."
+#define GOSSIP_WILLIAMKEILAR3 "Take me to Crown Guard Tower."
+
+bool GossipHello_npc_taxi(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+
+ switch(pCreature->GetEntry()) {
+ case 17435: // Azuremyst Isle - Susurrus
+ if (pPlayer->HasItemCount(23843,1,true))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SUSURRUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ break;
+ case 20903: // Netherstorm - Protectorate Nether Drake
+ if (pPlayer->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(29778,1))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NETHER_DRAKE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ break;
+ case 18725: // Old Hillsbrad Foothills - Brazen
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRAZEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ break;
+ case 29154: // Stormwind City - Thargold Ironwing
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_IRONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ break;
+ case 19409: // Hellfire Peninsula - Wing Commander Dabir'ee
+ //Mission: The Murketh and Shaadraz Gateways
+ if (pPlayer->GetQuestStatus(10146) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DABIREE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+
+ //Shatter Point
+ if (!pPlayer->GetQuestRewardStatus(10340))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DABIREE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ break;
+ case 20235: // Hellfire Peninsula - Gryphoneer Windbellow
+ //Mission: The Abyssal Shelf || Return to the Abyssal Shelf
+ if (pPlayer->GetQuestStatus(10163) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10346) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WINDBELLOW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+
+ //Go to the Front
+ if (pPlayer->GetQuestStatus(10382) != QUEST_STATUS_NONE && !pPlayer->GetQuestRewardStatus(10382))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WINDBELLOW2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ break;
+ case 19401: // Hellfire Peninsula - Wing Commander Brack
+ //Mission: The Murketh and Shaadraz Gateways
+ if (pPlayer->GetQuestStatus(10129) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+
+ //Mission: The Abyssal Shelf || Return to the Abyssal Shelf
+ if (pPlayer->GetQuestStatus(10162) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10347) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+
+ //Spinebreaker Post
+ if (pPlayer->GetQuestStatus(10242) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(10242))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRACK3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ break;
+ case 23413: // Blade's Edge Mountains - Skyguard Handler Irena
+ if (pPlayer->GetReputationRank(1031) >= REP_HONORED)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_IRENA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ break;
+ case 25059: // Isle of Quel'Danas - Ayren Cloudbreaker
+ if (pPlayer->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CLOUDBREAKER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+
+ if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CLOUDBREAKER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ break;
+ case 25236: // Isle of Quel'Danas - Unrestrained Dragonhawk
+ if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DRAGONHAWK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
+ break;
+ case 20162: // Netherstorm - Veronia
+ //Behind Enemy Lines
+ if (pPlayer->GetQuestStatus(10652) && !pPlayer->GetQuestRewardStatus(10652))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VERONIA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
+ break;
+ case 23415: // Terokkar Forest - Skyguard Handler Deesak
+ if (pPlayer->GetReputationRank(1031) >= REP_HONORED)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DEESAK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 16);
+ break;
+ case 27575: // Dragonblight - Lord Afrasastrasz
+ // middle -> ground
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AFRASASTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 17);
+ // middle -> top
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AFRASASTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 18);
+ break;
+ case 26443: // Dragonblight - Tariolstrasz //need to check if quests are required before gossip available (12123, 12124)
+ // ground -> top
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TARIOLSTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 19);
+ // ground -> middle
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TARIOLSTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
+ break;
+ case 26949: // Dragonblight - Torastrasza
+ // top -> middle
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
+ // top -> ground
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
+ break;
+ case 23816: // Howling Fjord - Bat Handler Camille
+ if (!pPlayer->GetQuestRewardStatus(11229))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
+ if (pPlayer->GetQuestStatus(11170) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
+ break;
+ case 23704: // Dustwallow Marsh - Cassa Crimsonwing
+ if (pPlayer->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+25);
+ break;
+ case 26602:
+ if (pCreature->isTaxi())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_THRICESTAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
+ if (pPlayer->GetQuestStatus(11692) == QUEST_STATUS_COMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 27);
+ break;
+ case 17209:
+ pPlayer->SetTaxiCheater(true);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 28);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 29);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 30);
+ break;
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiAction) {
+ case GOSSIP_ACTION_INFO_DEF:
+ //spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,32474,true);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 1:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155))
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 2:
+ if (!pPlayer->HasItemCount(25853,1)) {
+ pPlayer->SEND_GOSSIP_MENU(9780, pCreature->GetGUID());
+ } else {
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(534); //TaxiPath 534
+ }
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 3:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->GetSession()->SendDoFlight(1149, 1041);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 4:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,33768,true); //TaxiPath 585 (Gateways Murket and Shaadraz)
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 5:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,35069,true); //TaxiPath 612 (Taxi - Hellfire Peninsula - Expedition Point to Shatter Point)
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 6:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,33899,true); //TaxiPath 589 (Aerial Assault Flight (Alliance))
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 7:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,35065,true); //TaxiPath 607 (Taxi - Hellfire Peninsula - Shatter Point to Beach Head)
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,33659,true); //TaxiPath 584 (Gateways Murket and Shaadraz)
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,33825,true); //TaxiPath 587 (Aerial Assault Flight (Horde))
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 10:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,34578,true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 11:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,41278,true); //TaxiPath 706
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 12:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,45071,true); //TaxiPath 779
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 13:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,45113,true); //TaxiPath 784
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 14:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,45353,true); //TaxiPath 788
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 15:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,34905,true); //TaxiPath 606
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 16:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,41279,true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost)
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 17:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(882);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 18:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(881);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 19:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(878);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 20:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(883);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 21:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(880);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 22:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(879);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 23:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,43074,true); //TaxiPath 736
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 24:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ //pPlayer->ActivateTaxiPathTo(738);
+ pPlayer->CastSpell(pPlayer, 43136, false);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 25:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,42295,true);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 26:
+ pPlayer->GetSession()->SendTaxiMenu(pCreature);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 27:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer, 51446, false);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 28:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(494);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 29:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(495);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 30:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->ActivateTaxiPathTo(496);
+ break;
+ }
+
+ return true;
+}
+
+void AddSC_npc_taxi()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "npc_taxi";
+ newscript->pGossipHello = &GossipHello_npc_taxi;
+ newscript->pGossipSelect = &GossipSelect_npc_taxi;
+ newscript->RegisterSelf();
+}
diff --git a/src/scripts/world/npcs_special.cpp b/src/scripts/world/npcs_special.cpp
new file mode 100644
index 00000000000..a57507f9c6a
--- /dev/null
+++ b/src/scripts/world/npcs_special.cpp
@@ -0,0 +1,2112 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Npcs_Special
+SD%Complete: 100
+SDComment: To be used for special NPCs that are located globally.
+SDCategory: NPCs
+EndScriptData
+*/
+
+/* ContentData
+npc_air_force_bots 80% support for misc (invisible) guard bots in areas where player allowed to fly. Summon guards after a preset time if tagged by spell
+npc_lunaclaw_spirit 80% support for quests 6001/6002 (Body and Heart)
+npc_chicken_cluck 100% support for quest 3861 (Cluck!)
+npc_dancing_flames 100% midsummer event NPC
+npc_guardian 100% guardianAI used to prevent players from accessing off-limits areas. Not in use by SD2
+npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 565
+npc_injured_patient 100% patients for triage-quests (6622 and 6624)
+npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage)
+npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796
+npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy
+npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681
+npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given
+npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap
+npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage
+EndContentData */
+
+#include "ScriptedPch.h"
+#include "ScriptedEscortAI.h"
+#include "ObjectMgr.h"
+#include "ScriptMgr.h"
+
+/*########
+# npc_air_force_bots
+#########*/
+
+enum SpawnType
+{
+ SPAWNTYPE_TRIPWIRE_ROOFTOP, // no warning, summon Creature at smaller range
+ SPAWNTYPE_ALARMBOT, // cast guards mark and summon npc - if player shows up with that buff duration < 5 seconds attack
+};
+
+struct SpawnAssociation
+{
+ uint32 m_uiThisCreatureEntry;
+ uint32 m_uiSpawnedCreatureEntry;
+ SpawnType m_SpawnType;
+};
+
+enum eEnums
+{
+ SPELL_GUARDS_MARK = 38067,
+ AURA_DURATION_TIME_LEFT = 5000
+};
+
+const float RANGE_TRIPWIRE = 15.0f;
+const float RANGE_GUARDS_MARK = 50.0f;
+
+SpawnAssociation m_aSpawnAssociations[] =
+{
+ {2614, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Alliance)
+ {2615, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Horde)
+ {21974, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Area 52)
+ {21993, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Horde - Bat Rider)
+ {21996, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Alliance - Gryphon)
+ {21997, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Goblin - Area 52 - Zeppelin)
+ {21999, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Alliance)
+ {22001, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Horde)
+ {22002, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Horde)
+ {22003, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Alliance)
+ {22063, 21976, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Goblin - Area 52)
+ {22065, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Ethereal - Stormspire)
+ {22066, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Scryer - Dragonhawk)
+ {22068, 22064, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Ethereal - Stormspire)
+ {22069, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Stormspire)
+ {22070, 22067, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Scryer)
+ {22071, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Scryer)
+ {22078, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Aldor)
+ {22079, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Aldor - Gryphon)
+ {22080, 22077, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Aldor)
+ {22086, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Sporeggar)
+ {22087, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Sporeggar - Spore Bat)
+ {22088, 22085, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Sporeggar)
+ {22090, 22089, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Toshley's Station - Flying Machine)
+ {22124, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Cenarion)
+ {22125, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Cenarion - Stormcrow)
+ {22126, 22122, SPAWNTYPE_ALARMBOT} //Air Force Trip Wire - Rooftop (Cenarion Expedition)
+};
+
+struct TRINITY_DLL_DECL npc_air_force_botsAI : public ScriptedAI
+{
+ npc_air_force_botsAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ m_pSpawnAssoc = NULL;
+ m_uiSpawnedGUID = 0;
+
+ // find the correct spawnhandling
+ static uint32 uiEntryCount = sizeof(m_aSpawnAssociations)/sizeof(SpawnAssociation);
+
+ for (uint8 i=0; i<uiEntryCount; ++i)
+ {
+ if (m_aSpawnAssociations[i].m_uiThisCreatureEntry == pCreature->GetEntry())
+ {
+ m_pSpawnAssoc = &m_aSpawnAssociations[i];
+ break;
+ }
+ }
+
+ if (!m_pSpawnAssoc)
+ error_db_log("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
+ else
+ {
+ CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+
+ if (!spawnedTemplate)
+ {
+ m_pSpawnAssoc = NULL;
+ error_db_log("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+ return;
+ }
+ }
+ }
+
+ SpawnAssociation* m_pSpawnAssoc;
+ uint64 m_uiSpawnedGUID;
+
+ void Reset() {}
+
+ Creature* SummonGuard()
+ {
+ Creature* pSummoned = m_creature->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
+
+ if (pSummoned)
+ m_uiSpawnedGUID = pSummoned->GetGUID();
+ else
+ {
+ error_db_log("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+ m_pSpawnAssoc = NULL;
+ }
+
+ return pSummoned;
+ }
+
+ Creature* GetSummonedGuard()
+ {
+ Creature* pCreature = Unit::GetCreature(*m_creature, m_uiSpawnedGUID);
+
+ if (pCreature && pCreature->isAlive())
+ return pCreature;
+
+ return NULL;
+ }
+
+ void MoveInLineOfSight(Unit* pWho)
+ {
+ if (!m_pSpawnAssoc)
+ return;
+
+ if (pWho->isTargetableForAttack() && m_creature->IsHostileTo(pWho))
+ {
+ Player* pPlayerTarget = pWho->GetTypeId() == TYPEID_PLAYER ? CAST_PLR(pWho) : NULL;
+
+ // airforce guards only spawn for players
+ if (!pPlayerTarget)
+ return;
+
+ Creature* pLastSpawnedGuard = m_uiSpawnedGUID == 0 ? NULL : GetSummonedGuard();
+
+ // prevent calling Unit::GetUnit at next MoveInLineOfSight call - speedup
+ if (!pLastSpawnedGuard)
+ m_uiSpawnedGUID = 0;
+
+ switch(m_pSpawnAssoc->m_SpawnType)
+ {
+ case SPAWNTYPE_ALARMBOT:
+ {
+ if (!pWho->IsWithinDistInMap(m_creature, RANGE_GUARDS_MARK))
+ return;
+
+ Aura* pMarkAura = pWho->GetAura(SPELL_GUARDS_MARK);
+ if (pMarkAura)
+ {
+ // the target wasn't able to move out of our range within 25 seconds
+ if (!pLastSpawnedGuard)
+ {
+ pLastSpawnedGuard = SummonGuard();
+
+ if (!pLastSpawnedGuard)
+ return;
+ }
+
+ if (pMarkAura->GetDuration() < AURA_DURATION_TIME_LEFT)
+ {
+ if (!pLastSpawnedGuard->getVictim())
+ pLastSpawnedGuard->AI()->AttackStart(pWho);
+ }
+ }
+ else
+ {
+ if (!pLastSpawnedGuard)
+ pLastSpawnedGuard = SummonGuard();
+
+ if (!pLastSpawnedGuard)
+ return;
+
+ pLastSpawnedGuard->CastSpell(pWho, SPELL_GUARDS_MARK, true);
+ }
+ break;
+ }
+ case SPAWNTYPE_TRIPWIRE_ROOFTOP:
+ {
+ if (!pWho->IsWithinDistInMap(m_creature, RANGE_TRIPWIRE))
+ return;
+
+ if (!pLastSpawnedGuard)
+ pLastSpawnedGuard = SummonGuard();
+
+ if (!pLastSpawnedGuard)
+ return;
+
+ // ROOFTOP only triggers if the player is on the ground
+ if (!pPlayerTarget->IsFlying())
+ {
+ if (!pLastSpawnedGuard->getVictim())
+ pLastSpawnedGuard->AI()->AttackStart(pWho);
+ }
+ break;
+ }
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_air_force_bots(Creature* pCreature)
+{
+ return new npc_air_force_botsAI(pCreature);
+}
+
+/*######
+## npc_lunaclaw_spirit
+######*/
+
+enum
+{
+ QUEST_BODY_HEART_A = 6001,
+ QUEST_BODY_HEART_H = 6002,
+
+ TEXT_ID_DEFAULT = 4714,
+ TEXT_ID_PROGRESS = 4715
+};
+
+#define GOSSIP_ITEM_GRANT "You have thought well, spirit. I ask you to grant me the strength of your body and the strength of your heart."
+
+bool GossipHello_npc_lunaclaw_spirit(Player *pPlayer, Creature *pCreature)
+{
+ if (pPlayer->GetQuestStatus(QUEST_BODY_HEART_A) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_BODY_HEART_H) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GRANT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+
+ pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
+ {
+ pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID());
+ pPlayer->AreaExploredOrEventHappens(pPlayer->GetTeam() == ALLIANCE ? QUEST_BODY_HEART_A : QUEST_BODY_HEART_H);
+ }
+ return true;
+}
+
+/*########
+# npc_chicken_cluck
+#########*/
+
+#define EMOTE_HELLO -1070004
+#define EMOTE_CLUCK_TEXT -1070006
+
+#define QUEST_CLUCK 3861
+#define FACTION_FRIENDLY 35
+#define FACTION_CHICKEN 31
+
+struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
+{
+ npc_chicken_cluckAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 ResetFlagTimer;
+
+ void Reset()
+ {
+ ResetFlagTimer = 120000;
+ m_creature->setFaction(FACTION_CHICKEN);
+ m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ }
+
+ void EnterCombat(Unit *who) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ // Reset flags after a certain time has passed so that the next player has to start the 'event' again
+ if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
+ {
+ if (ResetFlagTimer <= diff)
+ {
+ EnterEvadeMode();
+ return;
+ } else ResetFlagTimer -= diff;
+ }
+
+ if (UpdateVictim())
+ DoMeleeAttackIfReady();
+ }
+
+ void ReceiveEmote(Player* pPlayer, uint32 emote)
+ {
+ switch(emote)
+ {
+ case TEXTEMOTE_CHICKEN:
+ if (pPlayer->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE && rand()%30 == 1)
+ {
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ m_creature->setFaction(FACTION_FRIENDLY);
+ DoScriptText(EMOTE_HELLO, m_creature);
+ }
+ break;
+ case TEXTEMOTE_CHEER:
+ if (pPlayer->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE)
+ {
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ m_creature->setFaction(FACTION_FRIENDLY);
+ DoScriptText(EMOTE_CLUCK_TEXT, m_creature);
+ }
+ break;
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_chicken_cluck(Creature* pCreature)
+{
+ return new npc_chicken_cluckAI(pCreature);
+}
+
+bool QuestAccept_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Quest *_Quest)
+{
+ if (_Quest->GetQuestId() == QUEST_CLUCK)
+ CAST_AI(npc_chicken_cluckAI, pCreature->AI())->Reset();
+
+ return true;
+}
+
+bool QuestComplete_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Quest *_Quest)
+{
+ if (_Quest->GetQuestId() == QUEST_CLUCK)
+ CAST_AI(npc_chicken_cluckAI, pCreature->AI())->Reset();
+
+ return true;
+}
+
+/*######
+## npc_dancing_flames
+######*/
+
+#define SPELL_BRAZIER 45423
+#define SPELL_SEDUCTION 47057
+#define SPELL_FIERY_AURA 45427
+
+struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
+{
+ npc_dancing_flamesAI(Creature *c) : ScriptedAI(c) {}
+
+ bool active;
+ uint32 can_iteract;
+
+ void Reset()
+ {
+ active = true;
+ can_iteract = 3500;
+ DoCast(m_creature, SPELL_BRAZIER, true);
+ DoCast(m_creature, SPELL_FIERY_AURA, false);
+ float x, y, z;
+ m_creature->GetPosition(x,y,z);
+ m_creature->Relocate(x,y,z + 0.94f);
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
+ WorldPacket data; //send update position to client
+ m_creature->BuildHeartBeatMsg(&data);
+ m_creature->SendMessageToSet(&data,true);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!active)
+ {
+ if (can_iteract <= diff){
+ active = true;
+ can_iteract = 3500;
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
+ } else can_iteract -= diff;
+ }
+ }
+
+ void EnterCombat(Unit* who){}
+
+ void ReceiveEmote(Player* pPlayer, uint32 emote)
+ {
+ if (m_creature->IsWithinLOS(pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ()) && m_creature->IsWithinDistInMap(pPlayer,30.0f))
+ {
+ m_creature->SetInFront(pPlayer);
+ active = false;
+
+ WorldPacket data;
+ m_creature->BuildHeartBeatMsg(&data);
+ m_creature->SendMessageToSet(&data,true);
+ switch(emote)
+ {
+ case TEXTEMOTE_KISS: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SHY); break;
+ case TEXTEMOTE_WAVE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
+ case TEXTEMOTE_BOW: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
+ case TEXTEMOTE_JOKE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break;
+ case TEXTEMOTE_DANCE:
+ {
+ if (!pPlayer->HasAura(SPELL_SEDUCTION))
+ DoCast(pPlayer, SPELL_SEDUCTION, true);
+ }
+ break;
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_dancing_flames(Creature* pCreature)
+{
+ return new npc_dancing_flamesAI(pCreature);
+}
+
+/*######
+## Triage quest
+######*/
+
+//signed for 9623
+#define SAY_DOC1 -1000201
+#define SAY_DOC2 -1000202
+#define SAY_DOC3 -1000203
+
+#define DOCTOR_ALLIANCE 12939
+#define DOCTOR_HORDE 12920
+#define ALLIANCE_COORDS 7
+#define HORDE_COORDS 6
+
+struct Location
+{
+ float x, y, z, o;
+};
+
+static Location AllianceCoords[]=
+{
+ {-3757.38, -4533.05, 14.16, 3.62}, // Top-far-right bunk as seen from entrance
+ {-3754.36, -4539.13, 14.16, 5.13}, // Top-far-left bunk
+ {-3749.54, -4540.25, 14.28, 3.34}, // Far-right bunk
+ {-3742.10, -4536.85, 14.28, 3.64}, // Right bunk near entrance
+ {-3755.89, -4529.07, 14.05, 0.57}, // Far-left bunk
+ {-3749.51, -4527.08, 14.07, 5.26}, // Mid-left bunk
+ {-3746.37, -4525.35, 14.16, 5.22}, // Left bunk near entrance
+};
+
+//alliance run to where
+#define A_RUNTOX -3742.96
+#define A_RUNTOY -4531.52
+#define A_RUNTOZ 11.91
+
+static Location HordeCoords[]=
+{
+ {-1013.75, -3492.59, 62.62, 4.34}, // Left, Behind
+ {-1017.72, -3490.92, 62.62, 4.34}, // Right, Behind
+ {-1015.77, -3497.15, 62.82, 4.34}, // Left, Mid
+ {-1019.51, -3495.49, 62.82, 4.34}, // Right, Mid
+ {-1017.25, -3500.85, 62.98, 4.34}, // Left, front
+ {-1020.95, -3499.21, 62.98, 4.34} // Right, Front
+};
+
+//horde run to where
+#define H_RUNTOX -1016.44
+#define H_RUNTOY -3508.48
+#define H_RUNTOZ 62.96
+
+const uint32 AllianceSoldierId[3] =
+{
+ 12938, // 12938 Injured Alliance Soldier
+ 12936, // 12936 Badly injured Alliance Soldier
+ 12937 // 12937 Critically injured Alliance Soldier
+};
+
+const uint32 HordeSoldierId[3] =
+{
+ 12923, //12923 Injured Soldier
+ 12924, //12924 Badly injured Soldier
+ 12925 //12925 Critically injured Soldier
+};
+
+/*######
+## npc_doctor (handles both Gustaf Vanhowzen and Gregory Victor)
+######*/
+
+struct TRINITY_DLL_DECL npc_doctorAI : public ScriptedAI
+{
+ npc_doctorAI(Creature *c) : ScriptedAI(c) {}
+
+ uint64 PlayerGUID;
+
+ uint32 SummonPatient_Timer;
+ uint32 SummonPatientCount;
+ uint32 PatientDiedCount;
+ uint32 PatientSavedCount;
+
+ bool Event;
+
+ std::list<uint64> Patients;
+ std::vector<Location*> Coordinates;
+
+ void Reset()
+ {
+ PlayerGUID = 0;
+
+ SummonPatient_Timer = 10000;
+ SummonPatientCount = 0;
+ PatientDiedCount = 0;
+ PatientSavedCount = 0;
+
+ Patients.clear();
+ Coordinates.clear();
+
+ Event = false;
+
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ void BeginEvent(Player* pPlayer);
+ void PatientDied(Location* Point);
+ void PatientSaved(Creature* soldier, Player* pPlayer, Location* Point);
+ void UpdateAI(const uint32 diff);
+
+ void EnterCombat(Unit* who){}
+};
+
+/*#####
+## npc_injured_patient (handles all the patients, no matter Horde or Alliance)
+#####*/
+
+struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
+{
+ npc_injured_patientAI(Creature *c) : ScriptedAI(c) {}
+
+ uint64 Doctorguid;
+ Location* Coord;
+
+ void Reset()
+ {
+ Doctorguid = 0;
+ Coord = NULL;
+
+ //no select
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ //no regen health
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
+
+ //to make them lay with face down
+ m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
+
+ uint32 mobId = m_creature->GetEntry();
+
+ switch (mobId)
+ { //lower max health
+ case 12923:
+ case 12938: //Injured Soldier
+ m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.75));
+ break;
+ case 12924:
+ case 12936: //Badly injured Soldier
+ m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.50));
+ break;
+ case 12925:
+ case 12937: //Critically injured Soldier
+ m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.25));
+ break;
+ }
+ }
+
+ void EnterCombat(Unit* who){}
+
+ void SpellHit(Unit *caster, const SpellEntry *spell)
+ {
+ if (caster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && spell->Id == 20804)
+ {
+ if ((CAST_PLR(caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (CAST_PLR(caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))
+ if (Doctorguid)
+ if (Creature* Doctor = Unit::GetCreature(*m_creature, Doctorguid))
+ CAST_AI(npc_doctorAI, Doctor->AI())->PatientSaved(m_creature, CAST_PLR(caster), Coord);
+
+ //make not selectable
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ //regen health
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
+
+ //stand up
+ m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
+
+ DoScriptText(RAND(SAY_DOC1,SAY_DOC2,SAY_DOC3), m_creature);
+
+ uint32 mobId = m_creature->GetEntry();
+ m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+
+ switch (mobId)
+ {
+ case 12923:
+ case 12924:
+ case 12925:
+ m_creature->GetMotionMaster()->MovePoint(0, H_RUNTOX, H_RUNTOY, H_RUNTOZ);
+ break;
+ case 12936:
+ case 12937:
+ case 12938:
+ m_creature->GetMotionMaster()->MovePoint(0, A_RUNTOX, A_RUNTOY, A_RUNTOZ);
+ break;
+ }
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ //lower HP on every world tick makes it a useful counter, not officlone though
+ if (m_creature->isAlive() && m_creature->GetHealth() > 6)
+ {
+ m_creature->SetHealth(uint32(m_creature->GetHealth()-5));
+ }
+
+ if (m_creature->isAlive() && m_creature->GetHealth() <= 6)
+ {
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_creature->setDeathState(JUST_DIED);
+ m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, 32);
+
+ if (Doctorguid)
+ {
+ if (Creature* Doctor = Unit::GetCreature((*m_creature), Doctorguid))
+ CAST_AI(npc_doctorAI, Doctor->AI())->PatientDied(Coord);
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_injured_patient(Creature* pCreature)
+{
+ return new npc_injured_patientAI (pCreature);
+}
+
+/*
+npc_doctor (continue)
+*/
+
+void npc_doctorAI::BeginEvent(Player* pPlayer)
+{
+ PlayerGUID = pPlayer->GetGUID();
+
+ SummonPatient_Timer = 10000;
+ SummonPatientCount = 0;
+ PatientDiedCount = 0;
+ PatientSavedCount = 0;
+
+ switch(m_creature->GetEntry())
+ {
+ case DOCTOR_ALLIANCE:
+ for (uint8 i = 0; i < ALLIANCE_COORDS; ++i)
+ Coordinates.push_back(&AllianceCoords[i]);
+ break;
+ case DOCTOR_HORDE:
+ for (uint8 i = 0; i < HORDE_COORDS; ++i)
+ Coordinates.push_back(&HordeCoords[i]);
+ break;
+ }
+
+ Event = true;
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+}
+
+void npc_doctorAI::PatientDied(Location* Point)
+{
+ Player* pPlayer = Unit::GetPlayer(PlayerGUID);
+ if (pPlayer && ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)))
+ {
+ ++PatientDiedCount;
+
+ if (PatientDiedCount > 5 && Event)
+ {
+ if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->FailQuest(6624);
+ else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->FailQuest(6622);
+
+ Reset();
+ return;
+ }
+
+ Coordinates.push_back(Point);
+ }
+ else
+ // If no player or player abandon quest in progress
+ Reset();
+}
+
+void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Point)
+{
+ if (pPlayer && PlayerGUID == pPlayer->GetGUID())
+ {
+ if ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))
+ {
+ ++PatientSavedCount;
+
+ if (PatientSavedCount == 15)
+ {
+ if (!Patients.empty())
+ {
+ std::list<uint64>::iterator itr;
+ for (itr = Patients.begin(); itr != Patients.end(); ++itr)
+ {
+ if (Creature* Patient = Unit::GetCreature((*m_creature), *itr))
+ Patient->setDeathState(JUST_DIED);
+ }
+ }
+
+ if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->AreaExploredOrEventHappens(6624);
+ else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->AreaExploredOrEventHappens(6622);
+
+ Reset();
+ return;
+ }
+
+ Coordinates.push_back(Point);
+ }
+ }
+}
+
+void npc_doctorAI::UpdateAI(const uint32 diff)
+{
+ if (Event && SummonPatientCount >= 20)
+ {
+ Reset();
+ return;
+ }
+
+ if (Event)
+ {
+ if (SummonPatient_Timer <= diff)
+ {
+ Creature* Patient = NULL;
+ Location* Point = NULL;
+
+ if (Coordinates.empty())
+ return;
+
+ std::vector<Location*>::iterator itr = Coordinates.begin()+rand()%Coordinates.size();
+ uint32 patientEntry = 0;
+
+ switch(m_creature->GetEntry())
+ {
+ case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[rand()%3]; break;
+ case DOCTOR_HORDE: patientEntry = HordeSoldierId[rand()%3]; break;
+ default:
+ error_log("TSCR: Invalid entry for Triage doctor. Please check your database");
+ return;
+ }
+
+ Point = *itr;
+
+ Patient = m_creature->SummonCreature(patientEntry, Point->x, Point->y, Point->z, Point->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
+
+ if (Patient)
+ {
+ //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND)
+ Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
+
+ Patients.push_back(Patient->GetGUID());
+ CAST_AI(npc_injured_patientAI, Patient->AI())->Doctorguid = m_creature->GetGUID();
+
+ if (Point)
+ CAST_AI(npc_injured_patientAI, Patient->AI())->Coord = Point;
+
+ Coordinates.erase(itr);
+ }
+ SummonPatient_Timer = 10000;
+ ++SummonPatientCount;
+ } else SummonPatient_Timer -= diff;
+ }
+}
+
+bool QuestAccept_npc_doctor(Player* pPlayer, Creature* pCreature, Quest const *quest)
+{
+ if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
+ CAST_AI(npc_doctorAI, pCreature->AI())->BeginEvent(pPlayer);
+
+ return true;
+}
+
+CreatureAI* GetAI_npc_doctor(Creature* pCreature)
+{
+ return new npc_doctorAI (pCreature);
+}
+
+/*######
+## npc_garments_of_quests
+######*/
+
+//TODO: get text for each NPC
+
+enum eGarments
+{
+ SPELL_LESSER_HEAL_R2 = 2052,
+ SPELL_FORTITUDE_R1 = 1243,
+
+ QUEST_MOON = 5621,
+ QUEST_LIGHT_1 = 5624,
+ QUEST_LIGHT_2 = 5625,
+ QUEST_SPIRIT = 5648,
+ QUEST_DARKNESS = 5650,
+
+ ENTRY_SHAYA = 12429,
+ ENTRY_ROBERTS = 12423,
+ ENTRY_DOLF = 12427,
+ ENTRY_KORJA = 12430,
+ ENTRY_DG_KEL = 12428,
+
+ //used by 12429,12423,12427,12430,12428, but signed for 12429
+ SAY_COMMON_HEALED = -1000164,
+ SAY_DG_KEL_THANKS = -1000165,
+ SAY_DG_KEL_GOODBYE = -1000166,
+ SAY_ROBERTS_THANKS = -1000167,
+ SAY_ROBERTS_GOODBYE = -1000168,
+ SAY_KORJA_THANKS = -1000169,
+ SAY_KORJA_GOODBYE = -1000170,
+ SAY_DOLF_THANKS = -1000171,
+ SAY_DOLF_GOODBYE = -1000172,
+ SAY_SHAYA_THANKS = -1000173,
+ SAY_SHAYA_GOODBYE = -1000174, //signed for 21469
+};
+
+struct TRINITY_DLL_DECL npc_garments_of_questsAI : public npc_escortAI
+{
+ npc_garments_of_questsAI(Creature *c) : npc_escortAI(c) {Reset();}
+
+ uint64 caster;
+
+ bool bIsHealed;
+ bool bCanRun;
+
+ uint32 RunAwayTimer;
+
+ void Reset()
+ {
+ caster = 0;
+
+ bIsHealed = false;
+ bCanRun = false;
+
+ RunAwayTimer = 5000;
+
+ m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
+ //expect database to have RegenHealth=0
+ m_creature->SetHealth(int(m_creature->GetMaxHealth()*0.7));
+ }
+
+ void EnterCombat(Unit *who) {}
+
+ void SpellHit(Unit* pCaster, const SpellEntry *Spell)
+ {
+ if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1)
+ {
+ //not while in combat
+ if (m_creature->isInCombat())
+ return;
+
+ //nothing to be done now
+ if (bIsHealed && bCanRun)
+ return;
+
+ if (pCaster->GetTypeId() == TYPEID_PLAYER)
+ {
+ switch(m_creature->GetEntry())
+ {
+ case ENTRY_SHAYA:
+ if (CAST_PLR(pCaster)->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ {
+ DoScriptText(SAY_SHAYA_THANKS,m_creature,pCaster);
+ bCanRun = true;
+ }
+ else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ {
+ caster = pCaster->GetGUID();
+ m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster);
+ bIsHealed = true;
+ }
+ }
+ break;
+ case ENTRY_ROBERTS:
+ if (CAST_PLR(pCaster)->GetQuestStatus(QUEST_LIGHT_1) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ {
+ DoScriptText(SAY_ROBERTS_THANKS,m_creature,pCaster);
+ bCanRun = true;
+ }
+ else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ {
+ caster = pCaster->GetGUID();
+ m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster);
+ bIsHealed = true;
+ }
+ }
+ break;
+ case ENTRY_DOLF:
+ if (CAST_PLR(pCaster)->GetQuestStatus(QUEST_LIGHT_2) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ {
+ DoScriptText(SAY_DOLF_THANKS,m_creature,pCaster);
+ bCanRun = true;
+ }
+ else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ {
+ caster = pCaster->GetGUID();
+ m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster);
+ bIsHealed = true;
+ }
+ }
+ break;
+ case ENTRY_KORJA:
+ if (CAST_PLR(pCaster)->GetQuestStatus(QUEST_SPIRIT) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ {
+ DoScriptText(SAY_KORJA_THANKS,m_creature,pCaster);
+ bCanRun = true;
+ }
+ else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ {
+ caster = pCaster->GetGUID();
+ m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster);
+ bIsHealed = true;
+ }
+ }
+ break;
+ case ENTRY_DG_KEL:
+ if (CAST_PLR(pCaster)->GetQuestStatus(QUEST_DARKNESS) == QUEST_STATUS_INCOMPLETE)
+ {
+ if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1)
+ {
+ DoScriptText(SAY_DG_KEL_THANKS,m_creature,pCaster);
+ bCanRun = true;
+ }
+ else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2)
+ {
+ caster = pCaster->GetGUID();
+ m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster);
+ bIsHealed = true;
+ }
+ }
+ break;
+ }
+
+ //give quest credit, not expect any special quest objectives
+ if (bCanRun)
+ CAST_PLR(pCaster)->TalkedToCreature(m_creature->GetEntry(),m_creature->GetGUID());
+ }
+ }
+ }
+
+ void WaypointReached(uint32 uiPoint)
+ {
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (bCanRun && !m_creature->isInCombat())
+ {
+ if (RunAwayTimer <= diff)
+ {
+ if (Unit *pUnit = Unit::GetUnit(*m_creature,caster))
+ {
+ switch(m_creature->GetEntry())
+ {
+ case ENTRY_SHAYA: DoScriptText(SAY_SHAYA_GOODBYE,m_creature,pUnit); break;
+ case ENTRY_ROBERTS: DoScriptText(SAY_ROBERTS_GOODBYE,m_creature,pUnit); break;
+ case ENTRY_DOLF: DoScriptText(SAY_DOLF_GOODBYE,m_creature,pUnit); break;
+ case ENTRY_KORJA: DoScriptText(SAY_KORJA_GOODBYE,m_creature,pUnit); break;
+ case ENTRY_DG_KEL: DoScriptText(SAY_DG_KEL_GOODBYE,m_creature,pUnit); break;
+ }
+
+ Start(false,true,true);
+ }
+ else
+ EnterEvadeMode(); //something went wrong
+
+ RunAwayTimer = 30000;
+ } else RunAwayTimer -= diff;
+ }
+
+ npc_escortAI::UpdateAI(diff);
+ }
+};
+
+CreatureAI* GetAI_npc_garments_of_quests(Creature* pCreature)
+{
+ return new npc_garments_of_questsAI(pCreature);
+}
+
+/*######
+## npc_guardian
+######*/
+
+#define SPELL_DEATHTOUCH 5
+
+struct TRINITY_DLL_DECL npc_guardianAI : public ScriptedAI
+{
+ npc_guardianAI(Creature *c) : ScriptedAI(c) {}
+
+ void Reset()
+ {
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ }
+
+ void EnterCombat(Unit *who)
+ {
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (m_creature->isAttackReady())
+ {
+ DoCast(m_creature->getVictim(), SPELL_DEATHTOUCH, true);
+ m_creature->resetAttackTimer();
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_guardian(Creature* pCreature)
+{
+ return new npc_guardianAI (pCreature);
+}
+
+/*######
+## npc_kingdom_of_dalaran_quests
+######*/
+
+enum eKingdomDalaran
+{
+ SPELL_TELEPORT_DALARAN = 53360,
+ ITEM_KT_SIGNET = 39740,
+ QUEST_MAGICAL_KINGDOM_A = 12794,
+ QUEST_MAGICAL_KINGDOM_H = 12791,
+ QUEST_MAGICAL_KINGDOM_N = 12796
+};
+
+#define GOSSIP_ITEM_TELEPORT_TO "I am ready to be teleported to Dalaran."
+
+bool GossipHello_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+
+ if (pPlayer->HasItemCount(ITEM_KT_SIGNET,1) && (!pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_A) ||
+ !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_H) || !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_N)))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT_TO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
+ {
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,SPELL_TELEPORT_DALARAN,false);
+ }
+ return true;
+}
+
+/*######
+## npc_mount_vendor
+######*/
+
+bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+
+ bool canBuy;
+ canBuy = false;
+ uint32 vendor = pCreature->GetEntry();
+ uint8 race = pPlayer->getRace();
+
+ switch (vendor)
+ {
+ case 384: //Katie Hunter
+ case 1460: //Unger Statforth
+ case 2357: //Merideth Carlson
+ case 4885: //Gregor MacVince
+ if (pPlayer->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN)
+ pPlayer->SEND_GOSSIP_MENU(5855, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 1261: //Veron Amberstill
+ if (pPlayer->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF)
+ pPlayer->SEND_GOSSIP_MENU(5856, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 3362: //Ogunaro Wolfrunner
+ if (pPlayer->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC)
+ pPlayer->SEND_GOSSIP_MENU(5841, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 3685: //Harb Clawhoof
+ if (pPlayer->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN)
+ pPlayer->SEND_GOSSIP_MENU(5843, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 4730: //Lelanai
+ if (pPlayer->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF)
+ pPlayer->SEND_GOSSIP_MENU(5844, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 4731: //Zachariah Post
+ if (pPlayer->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD_PLAYER)
+ pPlayer->SEND_GOSSIP_MENU(5840, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 7952: //Zjolnir
+ if (pPlayer->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL)
+ pPlayer->SEND_GOSSIP_MENU(5842, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 7955: //Milli Featherwhistle
+ if (pPlayer->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME)
+ pPlayer->SEND_GOSSIP_MENU(5857, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 16264: //Winaestra
+ if (pPlayer->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF)
+ pPlayer->SEND_GOSSIP_MENU(10305, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ case 17584: //Torallius the Pack Handler
+ if (pPlayer->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI)
+ pPlayer->SEND_GOSSIP_MENU(10239, pCreature->GetGUID());
+ else canBuy = true;
+ break;
+ }
+
+ if (canBuy)
+ {
+ if (pCreature->isVendor())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ }
+ return true;
+}
+
+bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_TRADE)
+ pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
+
+ return true;
+}
+
+/*######
+## npc_rogue_trainer
+######*/
+
+#define GOSSIP_HELLO_ROGUE1 "I wish to unlearn my talents"
+#define GOSSIP_HELLO_ROGUE2 "<Take the letter>"
+#define GOSSIP_HELLO_ROGUE3 "Purchase a Dual Talent Specialization."
+
+bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+
+ if (pCreature->isTrainer())
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
+
+ if (pCreature->isCanTrainingAndResetTalentsOf(pPlayer))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE1, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS);
+
+ if (!(pPlayer->GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < sScriptMgr.GetConfigValueInt32("MinDualSpecLevel"))))
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE3, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_LEARNDUALSPEC);
+
+ if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681))
+ {
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_ROGUE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetGUID());
+ } else
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+
+ return true;
+}
+
+bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF+1:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CastSpell(pPlayer,21100,false);
+ break;
+ case GOSSIP_ACTION_TRAIN:
+ pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
+ break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->SendTalentWipeConfirm(pCreature->GetGUID());
+ break;
+ case GOSSIP_OPTION_LEARNDUALSPEC:
+ if(pPlayer->GetSpecsCount() == 1 && !(pPlayer->getLevel() < sScriptMgr.GetConfigValueInt32("MinDualSpecLevel")))
+ {
+ if (pPlayer->GetMoney() < 10000000)
+ {
+ pPlayer->SendBuyError( BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0);
+ pPlayer->PlayerTalkClass->CloseGossip();
+ break;
+ }
+ else
+ {
+ pPlayer->ModifyMoney(-10000000);
+
+ // Cast spells that teach dual spec
+ // Both are also ImplicitTarget self and must be cast by player
+ pPlayer->CastSpell(pPlayer,63680,true,NULL,NULL,pPlayer->GetGUID());
+ pPlayer->CastSpell(pPlayer,63624,true,NULL,NULL,pPlayer->GetGUID());
+
+ // Should show another Gossip text with "Congratulations..."
+ pPlayer->PlayerTalkClass->CloseGossip();
+ }
+ }
+ break;
+ }
+ return true;
+}
+
+/*######
+## npc_sayge
+######*/
+
+#define SPELL_DMG 23768 //dmg
+#define SPELL_RES 23769 //res
+#define SPELL_ARM 23767 //arm
+#define SPELL_SPI 23738 //spi
+#define SPELL_INT 23766 //int
+#define SPELL_STM 23737 //stm
+#define SPELL_STR 23735 //str
+#define SPELL_AGI 23736 //agi
+#define SPELL_FORTUNE 23765 //faire fortune
+
+#define GOSSIP_HELLO_SAYGE "Yes"
+#define GOSSIP_SENDACTION_SAYGE1 "Slay the Man"
+#define GOSSIP_SENDACTION_SAYGE2 "Turn him over to liege"
+#define GOSSIP_SENDACTION_SAYGE3 "Confiscate the corn"
+#define GOSSIP_SENDACTION_SAYGE4 "Let him go and have the corn"
+#define GOSSIP_SENDACTION_SAYGE5 "Execute your friend painfully"
+#define GOSSIP_SENDACTION_SAYGE6 "Execute your friend painlessly"
+#define GOSSIP_SENDACTION_SAYGE7 "Let your friend go"
+#define GOSSIP_SENDACTION_SAYGE8 "Confront the diplomat"
+#define GOSSIP_SENDACTION_SAYGE9 "Show not so quiet defiance"
+#define GOSSIP_SENDACTION_SAYGE10 "Remain quiet"
+#define GOSSIP_SENDACTION_SAYGE11 "Speak against your brother openly"
+#define GOSSIP_SENDACTION_SAYGE12 "Help your brother in"
+#define GOSSIP_SENDACTION_SAYGE13 "Keep your brother out without letting him know"
+#define GOSSIP_SENDACTION_SAYGE14 "Take credit, keep gold"
+#define GOSSIP_SENDACTION_SAYGE15 "Take credit, share the gold"
+#define GOSSIP_SENDACTION_SAYGE16 "Let the knight take credit"
+#define GOSSIP_SENDACTION_SAYGE17 "Thanks"
+
+bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature)
+{
+ if (pCreature->isQuestGiver())
+ pPlayer->PrepareQuestMenu(pCreature->GetGUID());
+
+ if (pPlayer->HasSpellCooldown(SPELL_INT) ||
+ pPlayer->HasSpellCooldown(SPELL_ARM) ||
+ pPlayer->HasSpellCooldown(SPELL_DMG) ||
+ pPlayer->HasSpellCooldown(SPELL_RES) ||
+ pPlayer->HasSpellCooldown(SPELL_STR) ||
+ pPlayer->HasSpellCooldown(SPELL_AGI) ||
+ pPlayer->HasSpellCooldown(SPELL_STM) ||
+ pPlayer->HasSpellCooldown(SPELL_SPI))
+ pPlayer->SEND_GOSSIP_MENU(7393, pCreature->GetGUID());
+ else
+ {
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_SAYGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ pPlayer->SEND_GOSSIP_MENU(7339, pCreature->GetGUID());
+ }
+
+ return true;
+}
+
+void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction)
+{
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF+1:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ pPlayer->SEND_GOSSIP_MENU(7340, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF+2:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE5, GOSSIP_SENDER_MAIN+1, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE6, GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE7, GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->SEND_GOSSIP_MENU(7341, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF+3:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE8, GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE9, GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE10, GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->SEND_GOSSIP_MENU(7361, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF+4:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE11, GOSSIP_SENDER_MAIN+6, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE12, GOSSIP_SENDER_MAIN+7, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE13, GOSSIP_SENDER_MAIN+8, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->SEND_GOSSIP_MENU(7362, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF+5:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE14, GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE15, GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE16, GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF);
+ pPlayer->SEND_GOSSIP_MENU(7363, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF:
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE17, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
+ pPlayer->SEND_GOSSIP_MENU(7364, pCreature->GetGUID());
+ break;
+ case GOSSIP_ACTION_INFO_DEF+6:
+ pCreature->CastSpell(pPlayer, SPELL_FORTUNE, false);
+ pPlayer->SEND_GOSSIP_MENU(7365, pCreature->GetGUID());
+ break;
+ }
+}
+
+bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ switch(uiSender)
+ {
+ case GOSSIP_SENDER_MAIN:
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+1:
+ pCreature->CastSpell(pPlayer, SPELL_DMG, false);
+ pPlayer->AddSpellCooldown(SPELL_DMG,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+2:
+ pCreature->CastSpell(pPlayer, SPELL_RES, false);
+ pPlayer->AddSpellCooldown(SPELL_RES,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+3:
+ pCreature->CastSpell(pPlayer, SPELL_ARM, false);
+ pPlayer->AddSpellCooldown(SPELL_ARM,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+4:
+ pCreature->CastSpell(pPlayer, SPELL_SPI, false);
+ pPlayer->AddSpellCooldown(SPELL_SPI,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+5:
+ pCreature->CastSpell(pPlayer, SPELL_INT, false);
+ pPlayer->AddSpellCooldown(SPELL_INT,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+6:
+ pCreature->CastSpell(pPlayer, SPELL_STM, false);
+ pPlayer->AddSpellCooldown(SPELL_STM,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+7:
+ pCreature->CastSpell(pPlayer, SPELL_STR, false);
+ pPlayer->AddSpellCooldown(SPELL_STR,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ case GOSSIP_SENDER_MAIN+8:
+ pCreature->CastSpell(pPlayer, SPELL_AGI, false);
+ pPlayer->AddSpellCooldown(SPELL_AGI,0,time(NULL) + 7200);
+ SendAction_npc_sayge(pPlayer, pCreature, uiAction);
+ break;
+ }
+ return true;
+}
+
+struct TRINITY_DLL_DECL npc_steam_tonkAI : public ScriptedAI
+{
+ npc_steam_tonkAI(Creature *c) : ScriptedAI(c) {}
+
+ void Reset() {}
+ void EnterCombat(Unit *who) {}
+
+ void OnPossess(bool apply)
+ {
+ if (apply)
+ {
+ // Initialize the action bar without the melee attack command
+ m_creature->InitCharmInfo();
+ m_creature->GetCharmInfo()->InitEmptyActionBar(false);
+
+ m_creature->SetReactState(REACT_PASSIVE);
+ }
+ else
+ m_creature->SetReactState(REACT_AGGRESSIVE);
+ }
+
+};
+
+CreatureAI* GetAI_npc_steam_tonk(Creature* pCreature)
+{
+ return new npc_steam_tonkAI(pCreature);
+}
+
+#define SPELL_TONK_MINE_DETONATE 25099
+
+struct TRINITY_DLL_DECL npc_tonk_mineAI : public ScriptedAI
+{
+ npc_tonk_mineAI(Creature *c) : ScriptedAI(c)
+ {
+ m_creature->SetReactState(REACT_PASSIVE);
+ }
+
+ uint32 ExplosionTimer;
+
+ void Reset()
+ {
+ ExplosionTimer = 3000;
+ }
+
+ void EnterCombat(Unit *who) {}
+ void AttackStart(Unit *who) {}
+ void MoveInLineOfSight(Unit *who) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (ExplosionTimer <= diff)
+ {
+ DoCast(m_creature, SPELL_TONK_MINE_DETONATE, true);
+ m_creature->setDeathState(DEAD); // unsummon it
+ } else
+ ExplosionTimer -= diff;
+ }
+};
+
+CreatureAI* GetAI_npc_tonk_mine(Creature* pCreature)
+{
+ return new npc_tonk_mineAI(pCreature);
+}
+
+/*####
+## npc_brewfest_reveler
+####*/
+
+struct TRINITY_DLL_DECL npc_brewfest_revelerAI : public ScriptedAI
+{
+ npc_brewfest_revelerAI(Creature* c) : ScriptedAI(c) {}
+ void ReceiveEmote(Player* pPlayer, uint32 emote)
+ {
+ if (!IsHolidayActive(HOLIDAY_BREWFEST))
+ return;
+
+ if (emote == TEXTEMOTE_DANCE)
+ m_creature->CastSpell(pPlayer, 41586, false);
+ }
+};
+
+CreatureAI* GetAI_npc_brewfest_reveler(Creature* pCreature)
+{
+ return new npc_brewfest_revelerAI(pCreature);
+}
+
+/*####
+## npc_winter_reveler
+####*/
+
+struct TRINITY_DLL_DECL npc_winter_revelerAI : public ScriptedAI
+{
+ npc_winter_revelerAI(Creature* c) : ScriptedAI(c) {}
+ void ReceiveEmote(Player* pPlayer, uint32 emote)
+ {
+ if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL))
+ return;
+ //TODO: check auralist.
+ if (pPlayer->HasAura(26218))
+ return;
+
+ if (emote == TEXTEMOTE_KISS)
+ {
+ m_creature->CastSpell(m_creature, 26218, false);
+ pPlayer->CastSpell(pPlayer, 26218, false);
+ switch (urand(0,2))
+ {
+ case 0: m_creature->CastSpell(pPlayer, 26207, false); break;
+ case 1: m_creature->CastSpell(pPlayer, 26206, false); break;
+ case 2: m_creature->CastSpell(pPlayer, 45036, false); break;
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_winter_reveler(Creature* pCreature)
+{
+ return new npc_winter_revelerAI(pCreature);
+}
+
+
+/*####
+## npc_snake_trap_serpents
+####*/
+
+#define SPELL_MIND_NUMBING_POISON 25810 //Viper
+#define SPELL_DEADLY_POISON 34655 //Venomous Snake
+#define SPELL_CRIPPLING_POISON 3409 //Viper
+
+#define VENOMOUS_SNAKE_TIMER 1500
+#define VIPER_TIMER 3000
+
+#define C_VIPER 19921
+
+#define RAND 5
+
+struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
+{
+ npc_snake_trap_serpentsAI(Creature *c) : ScriptedAI(c) {}
+
+ uint32 SpellTimer;
+ bool IsViper;
+ bool Spawn;
+
+ void EnterCombat(Unit *who) {}
+
+ void Reset()
+ {
+ Spawn = true;
+ SpellTimer = 0;
+
+ CreatureInfo const *Info = m_creature->GetCreatureInfo();
+
+ if (Info->Entry == C_VIPER)
+ IsViper = true;
+ else
+ IsViper = false;
+
+ //Add delta to make them not all hit the same time
+ uint32 delta = (rand() % 7) * 100;
+ m_creature->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta);
+ m_creature->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , Info->attackpower);
+ }
+
+ //Redefined for random target selection:
+ void MoveInLineOfSight(Unit *who)
+ {
+ if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
+ {
+ if (m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ return;
+
+ float attackRadius = m_creature->GetAttackDistance(who);
+ if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
+ {
+ if (!(rand() % RAND))
+ {
+ m_creature->setAttackTimer(BASE_ATTACK, (rand() % 10) * 100);
+ SpellTimer = (rand() % 10) * 100;
+ AttackStart(who);
+ }
+ }
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (Spawn)
+ {
+ Spawn = false;
+ // Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target
+ if (!m_creature->getVictim() && m_creature->isSummon())
+ if (Unit * Owner = CAST_SUM(m_creature)->GetSummoner())
+ if (Owner->getAttackerForHelper())
+ AttackStart(Owner->getAttackerForHelper());
+ }
+
+ if (!m_creature->getVictim())
+ {
+ if (m_creature->isInCombat())
+ DoStopAttack();
+ return;
+ }
+
+ if (SpellTimer <= diff)
+ {
+ if (IsViper) //Viper
+ {
+ if (urand(0,2) == 0) //33% chance to cast
+ {
+ uint32 spell;
+ if (urand(0,1) == 0)
+ spell = SPELL_MIND_NUMBING_POISON;
+ else
+ spell = SPELL_CRIPPLING_POISON;
+
+ DoCast(m_creature->getVictim(), spell);
+ }
+
+ SpellTimer = VIPER_TIMER;
+ }
+ else //Venomous Snake
+ {
+ if (urand(0,2) == 0) //33% chance to cast
+ DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
+ SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
+ }
+ } else SpellTimer -= diff;
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_npc_snake_trap_serpents(Creature* pCreature)
+{
+ return new npc_snake_trap_serpentsAI(pCreature);
+}
+
+#define SAY_RANDOM_MOJO0 "Now that's what I call froggy-style!"
+#define SAY_RANDOM_MOJO1 "Your lily pad or mine?"
+#define SAY_RANDOM_MOJO2 "This won't take long, did it?"
+#define SAY_RANDOM_MOJO3 "I thought you'd never ask!"
+#define SAY_RANDOM_MOJO4 "I promise not to give you warts..."
+#define SAY_RANDOM_MOJO5 "Feelin' a little froggy, are ya?"
+#define SAY_RANDOM_MOJO6a "Listen, "
+#define SAY_RANDOM_MOJO6b ", I know of a little swamp not too far from here...."
+#define SAY_RANDOM_MOJO7 "There's just never enough Mojo to go around..."
+
+struct TRINITY_DLL_DECL mob_mojoAI : public ScriptedAI
+{
+ mob_mojoAI(Creature *c) : ScriptedAI(c) {Reset();}
+ uint32 hearts;
+ uint64 victimGUID;
+ void Reset()
+ {
+ victimGUID = 0;
+ hearts = 15000;
+ if (Unit* own = m_creature->GetOwner())
+ m_creature->GetMotionMaster()->MoveFollow(own,0,0);
+ }
+ void Aggro(Unit *who){}
+ void UpdateAI(const uint32 diff)
+ {
+ if (m_creature->HasAura(20372))
+ {
+ if (hearts <= diff)
+ {
+ m_creature->RemoveAurasDueToSpell(20372);
+ hearts = 15000;
+ } hearts -= diff;
+ }
+ }
+ void ReceiveEmote(Player* pPlayer, uint32 emote)
+ {
+ m_creature->HandleEmoteCommand(emote);
+ Unit* own = m_creature->GetOwner();
+ if (!own || own->GetTypeId() != TYPEID_PLAYER || CAST_PLR(own)->GetTeam() != pPlayer->GetTeam())
+ return;
+ if (emote == TEXTEMOTE_KISS)
+ {
+ std::string whisp = "";
+ switch (rand()%8)
+ {
+ case 0:whisp.append(SAY_RANDOM_MOJO0);break;
+ case 1:whisp.append(SAY_RANDOM_MOJO1);break;
+ case 2:whisp.append(SAY_RANDOM_MOJO2);break;
+ case 3:whisp.append(SAY_RANDOM_MOJO3);break;
+ case 4:whisp.append(SAY_RANDOM_MOJO4);break;
+ case 5:whisp.append(SAY_RANDOM_MOJO5);break;
+ case 6:
+ whisp.append(SAY_RANDOM_MOJO6a);
+ whisp.append(pPlayer->GetName());
+ whisp.append(SAY_RANDOM_MOJO6b);
+ break;
+ case 7:whisp.append(SAY_RANDOM_MOJO7);break;
+ }
+ m_creature->MonsterWhisper(whisp.c_str(),pPlayer->GetGUID());
+ if (victimGUID)
+ {
+ Player* victim = Unit::GetPlayer(victimGUID);
+ if (victim)
+ victim->RemoveAura(43906);//remove polymorph frog thing
+ }
+ m_creature->AddAura(43906,pPlayer);//add polymorph frog thing
+ victimGUID = pPlayer->GetGUID();
+ DoCast(m_creature, 20372, true);//tag.hearts
+ m_creature->GetMotionMaster()->MoveFollow(pPlayer,0,0);
+ hearts = 15000;
+ }
+ }
+};
+
+CreatureAI* GetAI_mob_mojo(Creature* pCreature)
+{
+ return new mob_mojoAI (pCreature);
+}
+
+struct TRINITY_DLL_DECL npc_mirror_image : CasterAI
+{
+ npc_mirror_image(Creature *c) : CasterAI(c) {}
+
+ void InitializeAI()
+ {
+ CasterAI::InitializeAI();
+ Unit * owner = me->GetOwner();
+ if (!owner)
+ return;
+ // Inherit Master's Threat List (not yet implemented)
+ owner->CastSpell((Unit*)NULL, 58838, true);
+ // here mirror image casts on summoner spell (not present in client dbc) 49866
+ // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?)
+ // Clone Me!
+ owner->CastSpell(me, 45204, false);
+ }
+
+ // Do not reload Creature templates on evade mode enter - prevent visual lost
+ void EnterEvadeMode()
+ {
+ if (me->IsInEvadeMode() || !me->isAlive())
+ return;
+
+ Unit *owner = me->GetCharmerOrOwner();
+
+ me->CombatStop(true);
+ if (owner && !me->hasUnitState(UNIT_STAT_FOLLOW))
+ {
+ me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, m_creature->GetFollowAngle(), MOTION_SLOT_ACTIVE);
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_mirror_image(Creature* pCreature)
+{
+ return new npc_mirror_image (pCreature);
+}
+
+struct TRINITY_DLL_DECL npc_ebon_gargoyleAI : CasterAI
+{
+ npc_ebon_gargoyleAI(Creature *c) : CasterAI(c) {}
+
+ int despawnTimer;
+
+ void InitializeAI()
+ {
+ CasterAI::InitializeAI();
+ Unit * owner = me->GetOwner();
+ if (!owner)
+ return;
+ // Not needed to be despawned now
+ despawnTimer = 0;
+ // Find victim of Summon Gargoyle spell
+ std::list<Unit*> targets;
+ Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_creature, m_creature, 30);
+ Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_creature, targets, u_check);
+ m_creature->VisitNearbyObject(30, searcher);
+ for (std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
+ if((*iter)->GetAura(49206,owner->GetGUID()))
+ {
+ me->Attack((*iter),false);
+ break;
+ }
+ }
+
+ void JustDied(Unit *killer)
+ {
+ // Stop Feeding Gargoyle when it dies
+ if (Unit *owner = me->GetOwner())
+ owner->RemoveAurasDueToSpell(50514);
+ }
+
+ // Fly away when dismissed
+ void SpellHit(Unit *source, const SpellEntry *spell)
+ {
+ if(spell->Id != 50515 || !me->isAlive() )
+ return;
+
+ Unit *owner = me->GetOwner();
+
+ if (!owner || owner != source)
+ return;
+
+ // Stop Fighting
+ me->ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, true);
+ // Sanctuary
+ me->CastSpell(m_creature, 54661, true);
+ me->SetReactState(REACT_PASSIVE);
+
+ // Fly Away
+ me->AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE|MOVEMENTFLAG_ASCEND|MOVEMENTFLAG_FLYING);
+ me->SetSpeed(MOVE_FLIGHT, 0.75f, true);
+ me->SetSpeed(MOVE_RUN, 0.75f, true);
+ float x = me->GetPositionX() + 20 * cos(me->GetOrientation());
+ float y = me->GetPositionY() + 20 * sin(me->GetOrientation());
+ float z = me->GetPositionZ() + 40;
+ me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->MovePoint(0, x, y, z);
+
+ // Despawn as soon as possible
+ despawnTimer = 4 * IN_MILISECONDS;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (despawnTimer > 0)
+ {
+ if (despawnTimer > diff)
+ despawnTimer -= diff;
+ else
+ {
+ me->ForcedDespawn();
+ }
+ return;
+ }
+ CasterAI::UpdateAI(diff);
+ }
+};
+
+CreatureAI* GetAI_npc_ebon_gargoyle(Creature* pCreature)
+{
+ return new npc_ebon_gargoyleAI (pCreature);
+}
+
+struct TRINITY_DLL_DECL npc_lightwellAI : public PassiveAI
+{
+ npc_lightwellAI(Creature *c) : PassiveAI(c) {}
+
+ void Reset()
+ {
+ DoCast(m_creature, 59907, false); // Spell for Lightwell Charges
+ }
+};
+
+CreatureAI* GetAI_npc_lightwellAI(Creature* pCreature)
+{
+ return new npc_lightwellAI (pCreature);
+}
+
+struct TRINITY_DLL_DECL npc_training_dummy : Scripted_NoMovementAI
+{
+ npc_training_dummy(Creature *c) : Scripted_NoMovementAI(c)
+ {
+ m_Entry = c->GetEntry();
+ }
+
+ uint64 m_Entry;
+ uint32 ResetTimer;
+ uint32 DespawnTimer;
+ void Reset()
+ {
+ m_creature->SetControlled(true,UNIT_STAT_STUNNED);//disable rotate
+ m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave
+ m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true);
+ ResetTimer = 10000;
+ DespawnTimer = 15000;
+ }
+
+ void DamageTaken(Unit *done_by, uint32 &damage)
+ {
+ ResetTimer = 10000;
+ damage = 0;
+ }
+
+ void EnterCombat(Unit *who)
+ {
+ if (m_Entry != 2674 && m_Entry != 2673)
+ return;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+ if (!m_creature->hasUnitState(UNIT_STAT_STUNNED))
+ m_creature->SetControlled(true,UNIT_STAT_STUNNED);//disable rotate
+
+ if (m_Entry != 2674 && m_Entry != 2673)
+ {
+ if (ResetTimer <= diff)
+ {
+ EnterEvadeMode();
+ ResetTimer = 10000;
+ }
+ else
+ ResetTimer -= diff;
+ return;
+ }
+ else
+ {
+ if (DespawnTimer <= diff)
+ m_creature->ForcedDespawn();
+ else
+ DespawnTimer -= diff;
+ }
+ }
+ void MoveInLineOfSight(Unit *who){return;}
+};
+
+CreatureAI* GetAI_npc_training_dummy(Creature* pCreature)
+{
+ return new npc_training_dummy (pCreature);
+}
+
+/*######
+# npc_shadowfiend
+######*/
+#define GLYPH_OF_SHADOWFIEND_MANA 58227
+#define GLYPH_OF_SHADOWFIEND 58228
+
+struct TRINITY_DLL_DECL npc_shadowfiendAI : public ScriptedAI
+{
+ npc_shadowfiendAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+
+ void DamageTaken(Unit* pKiller, uint32 &damage)
+ {
+ if (m_creature->isSummon())
+ if (Unit* pOwner = CAST_SUM(m_creature)->GetSummoner())
+ {
+ if (pOwner->HasAura(GLYPH_OF_SHADOWFIEND))
+ if (damage >= m_creature->GetHealth())
+ pOwner->CastSpell(pOwner,GLYPH_OF_SHADOWFIEND_MANA,true);
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_npc_shadowfiend(Creature* pCreature)
+{
+ return new npc_shadowfiendAI(pCreature);
+}
+
+void AddSC_npcs_special()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "npc_air_force_bots";
+ newscript->GetAI = &GetAI_npc_air_force_bots;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_lunaclaw_spirit";
+ newscript->pGossipHello = &GossipHello_npc_lunaclaw_spirit;
+ newscript->pGossipSelect = &GossipSelect_npc_lunaclaw_spirit;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_chicken_cluck";
+ newscript->GetAI = &GetAI_npc_chicken_cluck;
+ newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck;
+ newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_dancing_flames";
+ newscript->GetAI = &GetAI_npc_dancing_flames;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_injured_patient";
+ newscript->GetAI = &GetAI_npc_injured_patient;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_doctor";
+ newscript->GetAI = &GetAI_npc_doctor;
+ newscript->pQuestAccept = &QuestAccept_npc_doctor;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_garments_of_quests";
+ newscript->GetAI = &GetAI_npc_garments_of_quests;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_guardian";
+ newscript->GetAI = &GetAI_npc_guardian;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_kingdom_of_dalaran_quests";
+ newscript->pGossipHello = &GossipHello_npc_kingdom_of_dalaran_quests;
+ newscript->pGossipSelect = &GossipSelect_npc_kingdom_of_dalaran_quests;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_mount_vendor";
+ newscript->pGossipHello = &GossipHello_npc_mount_vendor;
+ newscript->pGossipSelect = &GossipSelect_npc_mount_vendor;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_rogue_trainer";
+ newscript->pGossipHello = &GossipHello_npc_rogue_trainer;
+ newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_sayge";
+ newscript->pGossipHello = &GossipHello_npc_sayge;
+ newscript->pGossipSelect = &GossipSelect_npc_sayge;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_steam_tonk";
+ newscript->GetAI = &GetAI_npc_steam_tonk;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_tonk_mine";
+ newscript->GetAI = &GetAI_npc_tonk_mine;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_winter_reveler";
+ newscript->GetAI = &GetAI_npc_winter_reveler;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_brewfest_reveler";
+ newscript->GetAI = &GetAI_npc_winter_reveler;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_snake_trap_serpents";
+ newscript->GetAI = &GetAI_npc_snake_trap_serpents;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_mirror_image";
+ newscript->GetAI = &GetAI_npc_mirror_image;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_ebon_gargoyle";
+ newscript->GetAI = &GetAI_npc_ebon_gargoyle;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_lightwell";
+ newscript->GetAI = &GetAI_npc_lightwellAI;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_mojo";
+ newscript->GetAI = &GetAI_mob_mojo;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_training_dummy";
+ newscript->GetAI = &GetAI_npc_training_dummy;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_shadowfiend";
+ newscript->GetAI = &GetAI_npc_shadowfiend;
+ newscript->RegisterSelf();
+}
+