--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-08-17 01:43:26 +02:00
5 changed files with 166 additions and 2 deletions

View File

@@ -17,12 +17,13 @@
/* ScriptData
SDName: Sholazar_Basin
SD%Complete: 100
SDComment: Quest support: 12570
SDComment: Quest support: 12570, 12573
SDCategory: Sholazar_Basin
EndScriptData */
/* ContentData
npc_injured_rainspeaker_oracle
npc_vekjik
EndContentData */
#include "precompiled.h"
@@ -158,6 +159,60 @@ CreatureAI* GetAI_npc_injured_rainspeaker_oracle(Creature* pCreature)
return new npc_injured_rainspeaker_oracleAI(pCreature);
}
/*######
## npc_vekjik
######*/
#define GOSSIP_VEKJIK_ITEM1 "Shaman Vekjik, I have spoken with the big-tongues and they desire peace. I have brought this offering on their behalf."
#define GOSSIP_VEKJIK_ITEM2 "No no... I had no intentions of betraying your people. I was only defending myself. it was all a misunderstanding."
enum
{
GOSSIP_TEXTID_VEKJIK1 = 13137,
GOSSIP_TEXTID_VEKJIK2 = 13138,
SAY_TEXTID_VEKJIK1 = -1000208,
SPELL_FREANZYHEARTS_FURY = 51469,
QUEST_MAKING_PEACE = 12573
};
bool GossipHello_npc_vekjik(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (pPlayer->GetQuestStatus(QUEST_MAKING_PEACE) == QUEST_STATUS_INCOMPLETE)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK1, pCreature->GetGUID());
return true;
}
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_vekjik(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK2, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->CLOSE_GOSSIP_MENU();
DoScriptText(SAY_TEXTID_VEKJIK1, pCreature, pPlayer);
pPlayer->AreaExploredOrEventHappens(QUEST_MAKING_PEACE);
pCreature->CastSpell(pPlayer, SPELL_FREANZYHEARTS_FURY, false);
break;
}
return true;
}
void AddSC_sholazar_basin()
{
Script *newscript;
@@ -168,4 +223,10 @@ void AddSC_sholazar_basin()
newscript->pGossipSelect = &GossipSelect_npc_injured_rainspeaker_oracle;
newscript->pQuestAccept = &QuestAccept_npc_injured_rainspeaker_oracle;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_vekjik";
newscript->pGossipHello = &GossipHello_npc_vekjik;
newscript->pGossipSelect = &GossipSelect_npc_vekjik;
newscript->RegisterSelf();
}

View File

@@ -26,6 +26,7 @@ npc_aeranas
go_haaleshi_altar
npc_naladu
npc_tracy_proudwell
npc_trollbane
npc_wounded_blood_elf
EndContentData */
@@ -203,6 +204,51 @@ bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint
return true;
}
/*######
## npc_trollbane
######*/
#define GOSSIP_TROLLBANE_ITEM1 "Tell me of the Sons of Lothar."
#define GOSSIP_TROLLBANE_ITEM2 "<more>"
#define GOSSIP_TROLLBANE_ITEM3 "Tell me of your homeland."
enum
{
GOSSIP_TEXTID_TROLLBANE1 = 9932,
GOSSIP_TEXTID_TROLLBANE2 = 9933,
GOSSIP_TEXTID_TROLLBANE3 = 8772
};
bool GossipHello_npc_trollbane(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_trollbane(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE1, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE2, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE3, pCreature->GetGUID());
break;
}
return true;
}
/*######
## npc_wounded_blood_elf
######*/
@@ -321,6 +367,12 @@ void AddSC_hellfire_peninsula()
newscript->pGossipSelect = &GossipSelect_npc_tracy_proudwell;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_trollbane";
newscript->pGossipHello = &GossipHello_npc_trollbane;
newscript->pGossipSelect = &GossipSelect_npc_trollbane;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_wounded_blood_elf";
newscript->GetAI = &GetAI_npc_wounded_blood_elf;

View File

@@ -27,6 +27,7 @@ npc_cooshcoosh
npc_elder_kuruti
npc_mortog_steamhead
npc_kayra_longmane
npc_timothy_daniels
EndContentData */
#include "precompiled.h"
@@ -333,6 +334,47 @@ CreatureAI* GetAI_npc_kayra_longmaneAI(Creature* pCreature)
{
return new npc_kayra_longmaneAI(pCreature);
}
/*######
## npc_timothy_daniels
######*/
#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?"
#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies."
enum
{
GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239
};
bool GossipHello_npc_timothy_daniels(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (pCreature->isVendor())
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_timothy_daniels(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TIMOTHY_DANIELS1, pCreature->GetGUID());
break;
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
break;
}
return true;
}
/*######
## AddSC
######*/
@@ -371,5 +413,11 @@ void AddSC_zangarmarsh()
newscript->GetAI = &GetAI_npc_kayra_longmaneAI;
newscript->pQuestAccept = &QuestAccept_npc_kayra_longmane;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_timothy_daniels";
newscript->pGossipHello = &GossipHello_npc_timothy_daniels;
newscript->pGossipSelect = &GossipSelect_npc_timothy_daniels;
newscript->RegisterSelf();
}