Scripts/World: move Leviroth's item_script to SAI

(cherry picked from commit 17143938d7)
This commit is contained in:
Wyreth
2017-10-21 11:54:12 +02:00
committed by funjoker
parent 3b36278d02
commit 7204bb35e3
2 changed files with 12 additions and 28 deletions

View File

@@ -361,33 +361,6 @@ public:
}
};
enum TheEmissary
{
QUEST_THE_EMISSARY = 11626,
NPC_LEVIROTH = 26452
};
class item_trident_of_nazjan : public ItemScript
{
public:
item_trident_of_nazjan() : ItemScript("item_Trident_of_Nazjan") { }
bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override
{
if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
{
if (Creature* pLeviroth = player->FindNearestCreature(NPC_LEVIROTH, 10.0f)) // spell range
{
pLeviroth->AI()->AttackStart(player);
return false;
} else
player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr);
} else
player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, nullptr);
return true;
}
};
enum CapturedFrog
{
QUEST_THE_PERFECT_SPIES = 25444,
@@ -449,7 +422,6 @@ void AddSC_item_scripts()
new item_pile_fake_furs();
new item_petrov_cluster_bombs();
new item_dehta_trap_smasher();
new item_trident_of_nazjan();
new item_captured_frog();
new item_generic_limit_chance_above_60();
}