diff options
author | click <none@none> | 2010-11-21 23:43:44 +0100 |
---|---|---|
committer | click <none@none> | 2010-11-21 23:43:44 +0100 |
commit | ea9e88a48cb4c61755248e5ac4aa9d3dad6f2079 (patch) | |
tree | 35917fc08d063e8068dcd0daa94a1709e6435598 /src | |
parent | 634ddae566c803cdcf057ce8b77d9d29d78ec2ba (diff) |
Core/Scripts: Add support for questID 25444 (Da Perfect Spies)
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/World/item_scripts.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 8500c289119..fa77089f8c5 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -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(); } |