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

Closes #24852
This commit is contained in:
offl
2020-07-02 23:20:19 +02:00
committed by Killyana
parent 4a4aac61d5
commit 2ebef0c51c
2 changed files with 24 additions and 26 deletions

View File

@@ -687,31 +687,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();
@@ -719,5 +694,4 @@ void AddSC_dragonblight()
new spell_q12096_q12092_bark();
new npc_wyrmrest_defender();
new npc_torturer_lecraft();
new at_nearby_messenger_torvus();
}