diff options
| author | John Holiver <none@none> | 2010-07-28 16:21:45 -0300 |
|---|---|---|
| committer | John Holiver <none@none> | 2010-07-28 16:21:45 -0300 |
| commit | 783fe4574eb92e2864fed831a612080716ed6ea0 (patch) | |
| tree | 464d0116791e1591bd935709c1cdb1b286d54c54 /src | |
| parent | 140bc313d2663fb0e05ad4a81c22b0b13e0bb971 (diff) | |
Implements Roxi Ramrocket, finally Engineers will be able to buy Choppers materials. Credits to BroodWyrm. Fixes #2979.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Northrend/storm_peaks.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index bcc846be1dc..a074cd2a2e9 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -439,6 +439,45 @@ bool GossipSelect_npc_injured_goblin(Player* pPlayer, Creature* pCreature, uint3 return true; } +/*###### +## npc_roxi_ramrocket +######*/ + +#define SPELL_MECHANO_HOG 60866 +#define SPELL_MEKGINEERS_CHOPPER 60867 + +bool GossipHello_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature) +{ + //Quest Menu + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //Trainer Menu + if( pCreature->isTrainer() ) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + //Vendor Menu + if( pCreature->isVendor() ) + if(pPlayer->HasSpell(SPELL_MECHANO_HOG) || pPlayer->HasSpell(SPELL_MEKGINEERS_CHOPPER)) + 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_roxi_ramrocket(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action ) +{ + switch(action) + { + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST( pCreature->GetGUID() ); + break; + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST( pCreature->GetGUID() ); + break; + } + return true; +} void AddSC_storm_peaks() { @@ -488,4 +527,10 @@ void AddSC_storm_peaks() newscript->pGossipSelect = &GossipSelect_npc_injured_goblin; newscript->pQuestAccept = &QuestAccept_npc_injured_goblin; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_roxi_ramrocket"; + newscript->pGossipHello = &GossipHello_npc_roxi_ramrocket; + newscript->pGossipSelect = &GossipSelect_npc_roxi_ramrocket; + newscript->RegisterSelf(); } |
