diff options
author | _manuel_ <manue.l@live.com.ar> | 2010-02-26 01:59:29 -0300 |
---|---|---|
committer | _manuel_ <manue.l@live.com.ar> | 2010-02-26 01:59:29 -0300 |
commit | ea0df87c97d08f8d427d1a78775a0d30c05f9268 (patch) | |
tree | cda3ca20c8db2d2df2c54009d419afd1cc804dec /src | |
parent | 9bfd68893165522f418fcf63e822ace4bf079d11 (diff) |
Implemented script for npc Squire David. Related with quest The Valiant´s Challenge.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts/northrend/icecrown.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/scripts/northrend/icecrown.cpp b/src/scripts/northrend/icecrown.cpp index 40519cad616..92ea4145db5 100644 --- a/src/scripts/northrend/icecrown.cpp +++ b/src/scripts/northrend/icecrown.cpp @@ -130,6 +130,48 @@ bool GossipSelect_npc_dame_evniki_kapsalis(Player* pPlayer, Creature* pCreature, return true; } +/*###### +## npc_squire_david +######*/ + +enum eSquireDavid +{ + QUEST_THE_ASPIRANT_S_CHALLENGE_H = 13680, + QUEST_THE_ASPIRANT_S_CHALLENGE_A = 13679, + + NPC_ARGENT_VALIANT = 33448, + + GOSSIP_TEXTID_SQUIRE = 14407 +}; + +#define GOSSIP_SQUIRE_ITEM_1 "I am ready to fight!" +#define GOSSIP_SQUIRE_ITEM_2 "How do the Argent Crusader raiders fight?" + +bool GossipHello_npc_squire_david(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_THE_ASPIRANT_S_CHALLENGE_H) == QUEST_STATUS_INCOMPLETE || + pPlayer->GetQuestStatus(QUEST_THE_ASPIRANT_S_CHALLENGE_A) == QUEST_STATUS_INCOMPLETE )//We need more info about it. + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SQUIRE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SQUIRE_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SQUIRE, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_squire_david(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->SummonCreature(NPC_ARGENT_VALIANT,8575.451,952.472,547.554,0.38); + } + //else + //pPlayer->SEND_GOSSIP_MENU(???, pCreature->GetGUID()); Missing text + return true; +} + void AddSC_icecrown() { Script *newscript; @@ -145,4 +187,9 @@ void AddSC_icecrown() newscript->pGossipHello = &GossipHello_npc_dame_evniki_kapsalis; newscript->pGossipSelect = &GossipSelect_npc_dame_evniki_kapsalis; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_squire_david"; + newscript->pGossipHello = &GossipHello_npc_squire_david; + newscript->pGossipSelect = &GossipSelect_npc_squire_david; } |