DB/SAI: convert Blood Knight Dawnstar script to DB

closes #4701
This commit is contained in:
malcrom
2012-01-08 09:55:34 +01:00
committed by ZxBiohazardZx
parent 4a0ab9177f
commit b52f381c3e
2 changed files with 24 additions and 39 deletions
@@ -33,45 +33,6 @@ EndContentData */
#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
## npc_blood_knight_dawnstar
######*/
#define GOSSIP_H_BKD "Take Blood Knight Insignia"
class npc_blood_knight_dawnstar : public CreatureScript
{
public:
npc_blood_knight_dawnstar() : CreatureScript("npc_blood_knight_dawnstar") { }
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction)
{
player->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
ItemPosCountVec dest;
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 24226, 1, NULL);
if (msg == EQUIP_ERR_OK)
{
player->StoreNewItem(dest, 24226, 1, true);
player->PlayerTalkClass->ClearMenus();
}
}
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
{
if (player->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(24226, 1, true))
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_BKD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
};
/*######
## npc_budd_nedreck
######*/