mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Script: Messenger Torvus.
This commit is contained in:
8
sql/updates/world/3.3.5/2016_10_28_01_world.sql
Normal file
8
sql/updates/world/3.3.5/2016_10_28_01_world.sql
Normal 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");
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user