DB/Creature: Convert & update support for 'Messenger Torvus' to SAI

Closes #24852

(cherry picked from commit 2ebef0c51c)
This commit is contained in:
offl
2020-07-02 23:20:19 +02:00
committed by Shauren
parent fb39553831
commit dde859cb21
2 changed files with 24 additions and 26 deletions

View File

@@ -686,31 +686,6 @@ class npc_torturer_lecraft : public CreatureScript
}
};
enum MessengerTorvus
{
NPC_MESSENGER_TORVUS = 26649,
QUEST_MESSAGE_FROM_THE_WEST = 12033,
TALK_0 = 0
};
class at_nearby_messenger_torvus : public AreaTriggerScript
{
public:
at_nearby_messenger_torvus() : AreaTriggerScript("at_nearby_messenger_torvus") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* /*at*/) override
{
if (player->IsAlive())
if (Quest const* quest = sObjectMgr->GetQuestTemplate(QUEST_MESSAGE_FROM_THE_WEST))
if (player->CanTakeQuest(quest, false))
if (Creature* creature = player->FindNearestCreature(NPC_MESSENGER_TORVUS, 50.0f, true))
creature->AI()->Talk(TALK_0, player);
return true;
}
};
void AddSC_dragonblight()
{
new npc_commander_eligor_dawnbringer();
@@ -718,5 +693,4 @@ void AddSC_dragonblight()
new spell_q12096_q12092_bark();
new npc_wyrmrest_defender();
new npc_torturer_lecraft();
new at_nearby_messenger_torvus();
}