Core/Script: Messenger Torvus.

This commit is contained in:
SnapperRy
2016-10-28 03:46:53 +02:00
committed by Aokromes
parent 9c9ea81f9c
commit 25caefdf4c
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
--
DELETE FROM `creature_text` WHERE `entry`=26649;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(26649, 0, 0, "Pssst... Over here, by the mailbox. Come quickly and make sure you aren't followed.", 15, 0, 100, 0, 0, 0, 25823, 0, "Borus Ironbender");
DELETE FROM `areatrigger_scripts` WHERE `entry`=4960;
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(4960, "at_nearby_messenger_torvus");

View File

@@ -701,6 +701,31 @@ 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, const AreaTriggerEntry* /*at*/) override
{
if (player && player->IsAlive())
if (const Quest* 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();
@@ -708,4 +733,5 @@ void AddSC_dragonblight()
new spell_q12096_q12092_bark();
new npc_wyrmrest_defender();
new npc_torturer_lecraft();
new at_nearby_messenger_torvus();
}