diff options
| author | click <none@none> | 2010-05-01 08:30:46 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-05-01 08:30:46 +0200 |
| commit | 8df6879e94c255a9cfb3063f8e5437ee77874d3e (patch) | |
| tree | 9eae30c0001a56d43a953900976d9118eeb31545 /src/scripts | |
| parent | 3a616674921763c5cf3f3409dbd1fe06251ec9c2 (diff) | |
Add support for quest 11626 (The Emissary) - patch by antihrists (thanks)
Closes issue #1061
--HG--
branch : trunk
Diffstat (limited to 'src/scripts')
| -rw-r--r-- | src/scripts/world/item_scripts.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/scripts/world/item_scripts.cpp b/src/scripts/world/item_scripts.cpp index 49294213d91..d87a21a8c95 100644 --- a/src/scripts/world/item_scripts.cpp +++ b/src/scripts/world/item_scripts.cpp @@ -387,6 +387,27 @@ bool ItemUse_item_dehta_trap_smasher(Player* pPlayer, Item* /*pItem*/, const Spe return false; } +enum TheEmissary +{ + QUEST_THE_EMISSARY = 11626, + NPC_LEVIROTH = 26452 +}; + +bool ItemUse_item_Trident_of_Nazjan(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + if (pPlayer->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE) + { + if (Creature* pLeviroth = pPlayer->FindNearestCreature(NPC_LEVIROTH, 10.0f)) // spell range + { + pLeviroth->AI()->AttackStart(pPlayer); + 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() { Script *newscript; @@ -450,4 +471,9 @@ void AddSC_item_scripts() newscript->Name = "item_dehta_trap_smasher"; newscript->pItemUse = &ItemUse_item_dehta_trap_smasher; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_Trident_of_Nazjan"; + newscript->pItemUse = &ItemUse_item_Trident_of_Nazjan; + newscript->RegisterSelf(); } |
