Core/Scripts: Add support for questID 25444 (Da Perfect Spies)
--HG-- branch : trunk
This commit is contained in:
@@ -485,6 +485,32 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum eCapturedFrog
|
||||
{
|
||||
QUEST_THE_PERFECT_SPIES = 25444,
|
||||
NPC_VANIRAS_SENTRY_TOTEM = 40187
|
||||
};
|
||||
|
||||
class item_captured_frog : public ItemScript
|
||||
{
|
||||
public:
|
||||
item_captured_frog() : ItemScript("item_captured_frog") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* target = pPlayer->FindNearestCreature(NPC_VANIRAS_SENTRY_TOTEM, 10.0f))
|
||||
return false;
|
||||
else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
}
|
||||
else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_item_scripts()
|
||||
{
|
||||
new item_only_for_flight;
|
||||
@@ -500,4 +526,5 @@ void AddSC_item_scripts()
|
||||
new item_petrov_cluster_bombs;
|
||||
new item_dehta_trap_smasher;
|
||||
new item_trident_of_nazjan;
|
||||
new item_captured_frog();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user