aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-01 23:30:55 -0700
committermaximius <none@none>2009-10-01 23:30:55 -0700
commitee8c59baa49489dd885037c73ff8a152308c556c (patch)
tree5177c637c46694a0199f4bf37cfcfb20670e2725
parentb832355b453ba834d377ec811e03e14972a0438b (diff)
*Set AnzuEncounter only when Anzu is created, to avoid having Anzu dead on spawn, by Trazom.
*Improved go_fel_crystalforge script, by johnholiver. --HG-- branch : trunk
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp15
-rw-r--r--src/bindings/scripts/scripts/world/go_scripts.cpp41
2 files changed, 49 insertions, 7 deletions
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/src/bindings/scripts/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp
index 060e09a1325..baae57dcee4 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp
@@ -45,12 +45,17 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
void OnCreatureCreate(Creature* pCreature, bool add)
{
- if (pCreature->GetEntry() == NPC_ANZU && AnzuEncounter >= IN_PROGRESS)
+ if (pCreature->GetEntry() == NPC_ANZU)
{
- pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- pCreature->RemoveCorpse();
- } else {
- AnzuEncounter = IN_PROGRESS;
+ if (AnzuEncounter >= IN_PROGRESS)
+ {
+ pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ pCreature->RemoveCorpse();
+ }
+ else
+ {
+ AnzuEncounter = IN_PROGRESS;
+ }
}
}
diff --git a/src/bindings/scripts/scripts/world/go_scripts.cpp b/src/bindings/scripts/scripts/world/go_scripts.cpp
index 0aa59f689e1..e434d18b13f 100644
--- a/src/bindings/scripts/scripts/world/go_scripts.cpp
+++ b/src/bindings/scripts/scripts/world/go_scripts.cpp
@@ -407,6 +407,12 @@ bool GOHello_go_tele_to_violet_stand(Player* pPlayer, GameObject* pGo)
## 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
{
SPELL_CREATE_1_FLASK_OF_BEAST = 40964,
@@ -415,8 +421,38 @@ enum
bool GOHello_go_fel_crystalforge(Player* pPlayer, GameObject* pGO)
{
- pPlayer->CastSpell(pPlayer,SPELL_CREATE_1_FLASK_OF_BEAST,false);
- return false;
+ 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;
}
/*######
@@ -537,6 +573,7 @@ void AddSC_go_scripts()
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;