Files
TCPlayerbotCore/src/server/scripts/Kalimdor/winterspring.cpp
T

169 lines
5.7 KiB
C++
Raw Normal View History

2009-02-17 18:08:26 +01:00
/* 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
*/
2009-10-17 15:51:44 -07:00
/* ScriptData
SDName: Winterspring
SD%Complete: 90
SDComment: Quest support: 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. Obtain Cache of Mau'ari
SDCategory: Winterspring
EndScriptData */
2009-10-17 15:51:44 -07:00
/* ContentData
npc_lorax
npc_rivern_frostwind
npc_witch_doctor_mauari
EndContentData */
2009-10-17 15:51:44 -07:00
#include "ScriptPCH.h"
2009-10-17 15:51:44 -07:00
/*######
## npc_lorax
######*/
2009-10-17 15:51:44 -07:00
#define GOSSIP_HL "Talk to me"
2009-10-17 15:51:44 -07:00
#define GOSSIP_SL1 "What do you do here?"
#define GOSSIP_SL2 "I can help you"
#define GOSSIP_SL3 "What deal?"
#define GOSSIP_SL4 "Then what happened?"
#define GOSSIP_SL5 "He is not safe, i'll make sure of that."
2009-10-17 15:51:44 -07:00
2009-08-14 00:39:07 +02:00
bool GossipHello_npc_lorax(Player* pPlayer, Creature* pCreature)
{
2009-08-14 00:39:07 +02:00
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
2009-08-14 00:02:13 +02:00
if (pPlayer->GetQuestStatus(5126) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
2009-10-17 15:51:44 -07:00
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
return true;
}
2009-10-17 15:51:44 -07:00
2010-04-19 09:26:37 +02:00
bool GossipSelect_npc_lorax(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
2009-08-15 00:32:04 +02:00
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3759, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3760, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3761, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3762, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3763, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
2009-08-14 00:02:13 +02:00
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->AreaExploredOrEventHappens(5126);
break;
}
return true;
}
2009-10-17 15:51:44 -07:00
/*######
## npc_rivern_frostwind
######*/
2009-10-17 15:51:44 -07:00
2009-08-14 00:39:07 +02:00
bool GossipHello_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature)
{
2009-08-14 00:39:07 +02:00
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
2009-08-14 00:39:07 +02:00
if (pCreature->isVendor() && pPlayer->GetReputationRank(589) == REP_EXALTED)
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
2009-10-17 15:51:44 -07:00
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
return true;
}
2009-10-17 15:51:44 -07:00
2010-04-19 09:26:37 +02:00
bool GossipSelect_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
2009-08-15 00:32:04 +02:00
if (uiAction == GOSSIP_ACTION_TRADE)
2009-08-14 00:39:07 +02:00
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
return true;
}
2009-10-17 15:51:44 -07:00
/*######
## npc_witch_doctor_mauari
######*/
2009-10-17 15:51:44 -07:00
#define GOSSIP_HWDM "I'd like you to make me a new Cache of Mau'ari please."
2009-10-17 15:51:44 -07:00
2009-08-14 00:39:07 +02:00
bool GossipHello_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature)
{
2009-08-14 00:39:07 +02:00
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
2009-08-14 00:02:13 +02:00
if (pPlayer->GetQuestRewardStatus(975))
{
2009-08-14 00:02:13 +02:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HWDM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3377, pCreature->GetGUID());
}else
2009-08-14 00:39:07 +02:00
pPlayer->SEND_GOSSIP_MENU(3375, pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
return true;
}
2009-10-17 15:51:44 -07:00
2010-04-19 09:26:37 +02:00
bool GossipSelect_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
2010-04-07 23:56:35 +02:00
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
2009-08-14 00:02:13 +02:00
pPlayer->CLOSE_GOSSIP_MENU();
2009-08-14 00:39:07 +02:00
pCreature->CastSpell(pPlayer, 16351, false);
}
2009-10-17 15:51:44 -07:00
return true;
}
2009-10-17 15:51:44 -07:00
void AddSC_winterspring()
{
Script *newscript;
2009-10-17 15:51:44 -07:00
newscript = new Script;
newscript->Name = "npc_lorax";
newscript->pGossipHello = &GossipHello_npc_lorax;
newscript->pGossipSelect = &GossipSelect_npc_lorax;
newscript->RegisterSelf();
2009-10-17 15:51:44 -07:00
newscript = new Script;
newscript->Name = "npc_rivern_frostwind";
newscript->pGossipHello = &GossipHello_npc_rivern_frostwind;
newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind;
newscript->RegisterSelf();
2009-10-17 15:51:44 -07:00
newscript = new Script;
newscript->Name = "npc_witch_doctor_mauari";
newscript->pGossipHello = &GossipHello_npc_witch_doctor_mauari;
newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari;
newscript->RegisterSelf();
}
2009-02-17 20:07:49 -06:00