Merge pull request #9024 from Xanvial/4.3.4

Scripts/Creature: Hira Snowdawn no longer sells Tome of Cold Weather Fli...
This commit is contained in:
Nay
2013-01-22 10:38:09 -08:00
2 changed files with 4 additions and 45 deletions
@@ -0,0 +1,4 @@
-- NPC Hira Snowdawn no longer sells Tome of Cold Weather Flight
UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=31238;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=10723 AND `id`=1;
DELETE FROM `npc_vendor` WHERE `entry`=31238 AND `item`=49177;
@@ -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;
}