Scripts/Creature: Hira Snowdawn no longer sells Tome of Cold Weather Flight

This commit is contained in:
Xanvial committed 2013-01-23 01:20:31 +07:00
1 parent d258c12d73
commit d0d3d0f3c4
2 files changed
+4 -45

No files matched your search

@@ -126,52 +126,7 @@ public:
}
};
/*######
## npc_hira_snowdawn
######*/
enum eHiraSnowdawn
{
SPELL_COLD_WEATHER_FLYING = 54197
};
#define GOSSIP_TEXT_TRAIN_HIRA "I seek training to ride a steed."
class npc_hira_snowdawn : public CreatureScript
{
public:
npc_hira_snowdawn() : CreatureScript("npc_hira_snowdawn") { }
bool OnGossipHello(Player* player, Creature* creature)
{
if (!creature->isVendor() || !creature->isTrainer())
return false;
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_TRAIN_HIRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
if (player->getLevel() >= 80 && player->HasSpell(SPELL_COLD_WEATHER_FLYING))
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_TRAIN)
player->GetSession()->SendTrainerList(creature->GetGUID());
if (action == GOSSIP_ACTION_TRADE)
player->GetSession()->SendListInventory(creature->GetGUID());
return true;
}
};
void AddSC_dalaran()
{
new npc_mageguard_dalaran;
new npc_hira_snowdawn;
}