mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Quest: Update 'Trail of Fire' & 'Warning: Some Assembly Required' (#27184)
(cherry picked from commit cbb13b0efb)
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
--
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` = 23784;
|
||||
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `MountCreatureID`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
|
||||
(23784,0,0,0,0,1,0,0,'5680');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23784;
|
||||
|
||||
UPDATE `creature` SET `spawntimesecs` = 0 WHERE `id` = 23784;
|
||||
|
||||
DELETE FROM `creature_equip_template` WHERE `CreatureID` = 23784;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 23784 AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 2378400 AND 2378407 AND `source_type` = 9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(23784,0,0,0,11,0,100,0,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Spawn - Set Flag Standstate Kneel"),
|
||||
(23784,0,1,0,11,0,100,0,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Spawn - Set Event Phase 1"),
|
||||
|
||||
(23784,0,2,0,1,1,100,0,2000,2000,25000,25000,0,5,20,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - Out of Combat - Play Emote 20 (Phase 1)"),
|
||||
(23784,0,3,0,2,0,100,0,0,75,10000,10000,0,11,17534,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - Between 0-75% Health - Cast 'Healing Potion'"),
|
||||
|
||||
(23784,0,4,0,19,0,100,0,11241,0,0,0,0,80,2378400,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Quest 'Trail of Fire' Taken - Run Script"),
|
||||
|
||||
(23784,0,5,0,58,0,100,0,0,2378400,0,0,0,80,2378401,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
(23784,0,6,0,58,0,100,0,0,2378401,0,0,0,80,2378402,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
(23784,0,7,0,58,0,100,0,0,2378402,0,0,0,80,2378403,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
(23784,0,8,0,58,0,100,0,0,2378403,0,0,0,80,2378404,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
(23784,0,9,0,58,0,100,0,0,2378404,0,0,0,80,2378405,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
(23784,0,10,0,58,0,100,0,0,2378405,0,0,0,80,2378406,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
(23784,0,11,0,58,0,100,0,0,2378406,0,0,0,80,2378407,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Waypoint Finished - Run Script"),
|
||||
|
||||
(23784,0,12,0,6,0,100,0,0,0,0,0,0,6,11241,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Death - Fail Quest 'Trail of Fire'"),
|
||||
|
||||
(2378400,9,0,0,0,0,100,0,0,0,0,0,0,64,1,0,0,0,0,0,16,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Store Targetlist"),
|
||||
(2378400,9,1,0,0,0,100,0,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Set Event Phase 0"),
|
||||
(2378400,9,2,0,0,0,100,0,0,0,0,0,0,2,232,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Set Faction 232"),
|
||||
(2378400,9,3,0,0,0,100,0,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Remove NPC Flag Questgiver"),
|
||||
(2378400,9,4,0,0,0,100,0,3000,3000,0,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 0"),
|
||||
(2378400,9,5,0,0,0,100,0,5000,5000,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Remove Flag Standstate Kneel"),
|
||||
(2378400,9,6,0,0,0,100,0,0,0,0,0,0,53,1,2378400,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378401,9,0,0,0,0,100,0,2000,2000,0,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 1"),
|
||||
(2378401,9,1,0,0,0,100,0,4000,4000,0,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Play Emote 16"),
|
||||
(2378401,9,2,0,0,0,100,0,0,0,0,0,0,71,0,1,1906,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Set Mainhand Item"),
|
||||
(2378401,9,3,0,0,0,100,0,2000,2000,0,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 2"),
|
||||
(2378401,9,4,0,0,0,100,0,5000,5000,0,0,0,53,1,2378401,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378402,9,0,0,0,0,100,0,0,0,0,0,0,11,42685,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Cast 'Burn'"),
|
||||
(2378402,9,1,0,0,0,100,0,2000,2000,0,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 3"),
|
||||
(2378402,9,2,0,0,0,100,0,6000,6000,0,0,0,53,1,2378402,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378403,9,0,0,0,0,100,0,0,0,0,0,0,11,42685,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Cast 'Burn'"),
|
||||
(2378403,9,1,0,0,0,100,0,2000,2000,0,0,0,53,1,2378403,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378404,9,0,0,0,0,100,0,0,0,0,0,0,11,42685,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Cast 'Burn'"),
|
||||
(2378404,9,1,0,0,0,100,0,2000,2000,0,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 4"),
|
||||
(2378404,9,2,0,0,0,100,0,6000,6000,0,0,0,53,1,2378404,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378405,9,0,0,0,0,100,0,0,0,0,0,0,11,42685,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Cast 'Burn'"),
|
||||
(2378405,9,1,0,0,0,100,0,4000,4000,0,0,0,5,11,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Play Emote 11"),
|
||||
(2378405,9,2,0,0,0,100,0,2000,2000,0,0,0,5,14,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Play Emote 14"),
|
||||
(2378405,9,3,0,0,0,100,0,0,0,0,0,0,1,5,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 5"),
|
||||
(2378405,9,4,0,0,0,100,0,7000,7000,0,0,0,1,6,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 6"),
|
||||
(2378405,9,5,0,0,0,100,0,7000,7000,0,0,0,53,1,2378405,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378406,9,0,0,0,0,100,0,1000,1000,0,0,0,1,7,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 7"),
|
||||
(2378406,9,1,0,0,0,100,0,0,0,0,0,0,53,1,2378406,0,0,0,3,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Start Waypoint"),
|
||||
|
||||
(2378407,9,0,0,0,0,100,0,0,0,0,0,0,15,11241,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Quest Credit 'Trail of Fire'"),
|
||||
(2378407,9,1,0,0,0,100,0,4000,4000,0,0,0,1,8,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Say Line 8"),
|
||||
(2378407,9,2,0,0,0,100,0,7000,7000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Apothecary Hanes - On Script - Despawn");
|
||||
|
||||
DELETE FROM `script_waypoint` WHERE `entry` = 23784;
|
||||
DELETE FROM `waypoints` WHERE `entry` BETWEEN 2378400 AND 2378406;
|
||||
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
|
||||
(2378400,1,1379.8127,-6409.2007,1.5396829,"Apothecary Hanes"),
|
||||
(2378400,2,1380.1144,-6401.7446,2.5179543,"Apothecary Hanes"),
|
||||
|
||||
(2378401,1,1386.2698,-6393.396,3.5779068,"Apothecary Hanes"),
|
||||
(2378401,2,1394.7676,-6387.7085,3.68069,"Apothecary Hanes"),
|
||||
(2378401,3,1405.6936,-6380.924,4.6247597,"Apothecary Hanes"),
|
||||
(2378401,4,1416.1797,-6370.6562,5.9504433,"Apothecary Hanes"),
|
||||
(2378401,5,1425.0476,-6361.604,6.354269,"Apothecary Hanes"),
|
||||
(2378401,6,1427.9548,-6350.528,6.354269,"Apothecary Hanes"),
|
||||
(2378401,7,1424.6168,-6340.581,5.786398,"Apothecary Hanes"),
|
||||
(2378401,8,1416.3439,-6335.9087,5.7054653,"Apothecary Hanes"),
|
||||
(2378401,9,1404.9205,-6335.286,6.229269,"Apothecary Hanes"),
|
||||
(2378401,10,1400.8588,-6340.079,6.4763393,"Apothecary Hanes"),
|
||||
|
||||
(2378402,1,1419.2825,-6332.3086,5.531731,"Apothecary Hanes"),
|
||||
(2378402,2,1428.4545,-6335.082,5.604269,"Apothecary Hanes"),
|
||||
(2378402,3,1446.9548,-6338.7773,7.9524603,"Apothecary Hanes"),
|
||||
(2378402,4,1457.2695,-6343.141,8.380317,"Apothecary Hanes"),
|
||||
(2378402,5,1465.7235,-6345.1685,7.788642,"Apothecary Hanes"),
|
||||
|
||||
(2378403,1,1471.4004,-6349.006,8.6504135,"Apothecary Hanes"),
|
||||
|
||||
(2378404,1,1462.0583,-6341.999,7.9957952,"Apothecary Hanes"),
|
||||
(2378404,2,1461.3224,-6337.461,7.834174,"Apothecary Hanes"),
|
||||
(2378404,3,1465.0768,-6331.357,7.562849,"Apothecary Hanes"),
|
||||
(2378404,4,1475.6212,-6327.219,7.1195745,"Apothecary Hanes"),
|
||||
(2378404,5,1490.5508,-6315.3184,8.244208,"Apothecary Hanes"),
|
||||
(2378404,6,1497.6818,-6311.0225,7.41413,"Apothecary Hanes"),
|
||||
(2378404,7,1505.3026,-6313.5127,6.890468,"Apothecary Hanes"),
|
||||
(2378404,8,1506.4313,-6317.528,7.3721576,"Apothecary Hanes"),
|
||||
|
||||
(2378405,1,1504.4158,-6305.0034,6.825893,"Apothecary Hanes"),
|
||||
(2378405,2,1513.4985,-6287.4907,5.8186994,"Apothecary Hanes"),
|
||||
(2378405,3,1513.9366,-6277.724,5.5831037,"Apothecary Hanes"),
|
||||
(2378405,4,1523.0132,-6259.2554,4.5991592,"Apothecary Hanes"),
|
||||
(2378405,5,1538.9414,-6220.414,6.434206,"Apothecary Hanes"),
|
||||
(2378405,6,1554.7721,-6204.8276,6.6884785,"Apothecary Hanes"),
|
||||
(2378405,7,1566.7456,-6192.293,7.5899744,"Apothecary Hanes"),
|
||||
|
||||
(2378406,1,1583.7823,-6168.5923,8.31788,"Apothecary Hanes"),
|
||||
(2378406,2,1588.5541,-6163.325,7.8191605,"Apothecary Hanes"),
|
||||
(2378406,3,1600.5142,-6157.163,8.667747,"Apothecary Hanes"),
|
||||
(2378406,4,1606.8141,-6158.777,8.844871,"Apothecary Hanes"),
|
||||
(2378406,5,1615.0626,-6157.8174,9.339622,"Apothecary Hanes");
|
||||
@@ -27,226 +27,6 @@
|
||||
#include "TemporarySummon.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
/*######
|
||||
## npc_apothecary_hanes
|
||||
######*/
|
||||
enum Entries
|
||||
{
|
||||
NPC_APOTHECARY_HANES = 23784,
|
||||
QUEST_TRAIL_OF_FIRE = 11241,
|
||||
|
||||
SPELL_HEALING_POTION = 17534,
|
||||
SPELL_BURN = 42685,
|
||||
|
||||
EVENT_EMOTE_BEG = 1,
|
||||
EVENT_BEGIN = 2,
|
||||
EVENT_START_ESCORT = 3,
|
||||
EVENT_TALK_1 = 4,
|
||||
EVENT_KNEEL = 5,
|
||||
EVENT_TALK_2 = 6,
|
||||
EVENT_BURN_CRATES = 7,
|
||||
EVENT_TALK_3 = 8,
|
||||
EVENT_TALK_4 = 9,
|
||||
EVENT_LAUGH = 10,
|
||||
EVENT_TALK_5 = 11,
|
||||
EVENT_TALK_6 = 12,
|
||||
EVENT_TALK_8 = 13,
|
||||
|
||||
TALK_0 = 0,
|
||||
TALK_1 = 1,
|
||||
TALK_2 = 2,
|
||||
TALK_3 = 3,
|
||||
TALK_4 = 4,
|
||||
TALK_5 = 5,
|
||||
TALK_6 = 6,
|
||||
TALK_7 = 7,
|
||||
TALK_8 = 8,
|
||||
|
||||
EQUIP_TORCH = 2
|
||||
};
|
||||
|
||||
class npc_apothecary_hanes : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_apothecary_hanes() : CreatureScript("npc_apothecary_hanes") { }
|
||||
|
||||
struct npc_Apothecary_HanesAI : public EscortAI
|
||||
{
|
||||
npc_Apothecary_HanesAI(Creature* creature) : EscortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void StartEscort(Player* player)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_BEGIN, 2s);
|
||||
events.ScheduleEvent(EVENT_START_ESCORT, 6s);
|
||||
_player = player->GetGUID();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PotTimer = 10000; //10 sec cooldown on potion
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_EMOTE_BEG, 2s);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
_player = ObjectGuid();
|
||||
}
|
||||
|
||||
uint32 PotTimer;
|
||||
EventMap events;
|
||||
ObjectGuid _player;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SetDespawnAtFar(false);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(QUEST_TRAIL_OF_FIRE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (HealthBelowPct(75))
|
||||
{
|
||||
if (PotTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_HEALING_POTION, true);
|
||||
PotTimer = 10000;
|
||||
} else PotTimer -= diff;
|
||||
}
|
||||
|
||||
if (IsActiveAttacker() && UpdateVictim())
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
EscortAI::UpdateAI(diff);
|
||||
|
||||
if (me->IsInCombat())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_EMOTE_BEG:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_BEG);
|
||||
events.ScheduleEvent(EVENT_EMOTE_BEG, 25s);
|
||||
break;
|
||||
case EVENT_BEGIN:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_0, player);
|
||||
break;
|
||||
case EVENT_START_ESCORT:
|
||||
events.Reset();
|
||||
me->SetFaction(FACTION_ESCORTEE_H_PASSIVE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
ENSURE_AI(EscortAI, (me->AI()))->Start(true, true, _player);
|
||||
break;
|
||||
case EVENT_TALK_1:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_1, player);
|
||||
break;
|
||||
case EVENT_KNEEL:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
break;
|
||||
case EVENT_TALK_2:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_2, player);
|
||||
me->LoadEquipment(EQUIP_TORCH);
|
||||
me->SetSheath(SHEATH_STATE_MELEE);
|
||||
break;
|
||||
case EVENT_BURN_CRATES:
|
||||
DoCastAOE(SPELL_BURN, true);
|
||||
break;
|
||||
case EVENT_TALK_3:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_3, player);
|
||||
break;
|
||||
case EVENT_TALK_4:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_4, player);
|
||||
break;
|
||||
case EVENT_LAUGH:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
|
||||
break;
|
||||
case EVENT_TALK_5:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_5, player);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_RUDE);
|
||||
break;
|
||||
case EVENT_TALK_6:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_6, player);
|
||||
break;
|
||||
case EVENT_TALK_8:
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_8, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
|
||||
{
|
||||
if (!GetPlayerForEscort())
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_TALK_1, Seconds(3));
|
||||
events.ScheduleEvent(EVENT_KNEEL, 5s);
|
||||
events.ScheduleEvent(EVENT_TALK_2, Seconds(6));
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
break;
|
||||
case 12:
|
||||
events.ScheduleEvent(EVENT_BURN_CRATES, 1s);
|
||||
events.ScheduleEvent(EVENT_TALK_3, Seconds(3));
|
||||
break;
|
||||
case 20:
|
||||
events.ScheduleEvent(EVENT_BURN_CRATES, 0s);
|
||||
break;
|
||||
case 21:
|
||||
events.ScheduleEvent(EVENT_BURN_CRATES, 0s);
|
||||
events.ScheduleEvent(EVENT_TALK_4, Seconds(3));
|
||||
break;
|
||||
case 28:
|
||||
events.ScheduleEvent(EVENT_BURN_CRATES, 0s);
|
||||
events.ScheduleEvent(EVENT_LAUGH, 7s);
|
||||
events.ScheduleEvent(EVENT_TALK_5, Seconds(9));
|
||||
events.ScheduleEvent(EVENT_TALK_6, Seconds(17));
|
||||
break;
|
||||
case 35:
|
||||
if (Player* pl = ObjectAccessor::GetPlayer(*me, _player))
|
||||
Talk(TALK_7, pl);
|
||||
break;
|
||||
case 40:
|
||||
if (Player* pl = ObjectAccessor::GetPlayer(*me, _player))
|
||||
pl->GroupEventHappens(QUEST_TRAIL_OF_FIRE, me);
|
||||
events.ScheduleEvent(EVENT_TALK_8, Seconds(4));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_TRAIL_OF_FIRE)
|
||||
StartEscort(player);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_Apothecary_HanesAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_daegarn
|
||||
######*/
|
||||
@@ -421,96 +201,81 @@ private:
|
||||
SummonList _summons;
|
||||
};
|
||||
|
||||
enum MindlessAbomination
|
||||
/*######
|
||||
## Quest 11310: Warning: Some Assembly Required
|
||||
######*/
|
||||
|
||||
enum SomeAssemblyRequired
|
||||
{
|
||||
EVENT_CHECK_CHARMED = 1
|
||||
SPELL_PING_MASTER = 43393, // casted on owner after spawn, presumably has a spell script to force owner cast SPELL_MINDLESS_ABOMINATION_CONTROL (currently handled by linked spells)
|
||||
SPELL_MINDLESS_ABOMINATION_CONTROL = 42168,
|
||||
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON = 42266,
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE = 42267,
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE_2 = 42274
|
||||
};
|
||||
|
||||
class npc_mindless_abomination : public CreatureScript
|
||||
struct npc_mindless_abomination : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_mindless_abomination() : CreatureScript("npc_mindless_abomination") { }
|
||||
npc_mindless_abomination(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
struct npc_mindless_abominationAI : public ScriptedAI
|
||||
void JustAppeared() override
|
||||
{
|
||||
npc_mindless_abominationAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
me->SetCorpseDelay(0, true);
|
||||
|
||||
void Reset() override
|
||||
_scheduler.Schedule(1s, [this](TaskContext task)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_CHECK_CHARMED, 1s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CHECK_CHARMED:
|
||||
if (!me->IsCharmedOwnedByPlayerOrPlayer())
|
||||
me->DespawnOrUnsummon();
|
||||
else
|
||||
events.ScheduleEvent(EVENT_CHECK_CHARMED, 1s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_mindless_abominationAI(creature);
|
||||
if (!me->IsCharmedOwnedByPlayerOrPlayer())
|
||||
me->DespawnOrUnsummon();
|
||||
else
|
||||
task.Repeat();
|
||||
});
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
|
||||
// 42268 - Quest - Mindless Abomination Explosion FX Master
|
||||
class spell_mindless_abomination_explosion_fx_master : public SpellScriptLoader
|
||||
class spell_mindless_abomination_explosion_fx_master : public SpellScript
|
||||
{
|
||||
enum Spells
|
||||
PrepareSpellScript(spell_mindless_abomination_explosion_fx_master);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON = 42266,
|
||||
SPELL_COSMETIC_BLOOD_EXPLOSION_GREEN_LARGE = 43401
|
||||
};
|
||||
|
||||
public:
|
||||
spell_mindless_abomination_explosion_fx_master() : SpellScriptLoader("spell_mindless_abomination_explosion_fx_master") { }
|
||||
|
||||
class spell_mindless_abomination_explosion_fx_master_SpellScript : public SpellScript
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
PrepareSpellScript(spell_mindless_abomination_explosion_fx_master_SpellScript);
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON,
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE,
|
||||
SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE_2
|
||||
});
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON, SPELL_COSMETIC_BLOOD_EXPLOSION_GREEN_LARGE });
|
||||
}
|
||||
void HandleScript(SpellEffIndex /*eff*/)
|
||||
{
|
||||
Creature* caster = GetCaster()->ToCreature();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
void HandleScript(SpellEffIndex /*eff*/)
|
||||
{
|
||||
Creature* caster = GetCaster()->ToCreature();
|
||||
if (!caster)
|
||||
return;
|
||||
for (uint8 i = 0; i < 11; ++i)
|
||||
caster->CastSpell(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON);
|
||||
|
||||
caster->CastSpell(caster, SPELL_COSMETIC_BLOOD_EXPLOSION_GREEN_LARGE);
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
caster->CastSpell(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE);
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
caster->CastSpell(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON);
|
||||
}
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
caster->CastSpell(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE_2);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mindless_abomination_explosion_fx_master_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mindless_abomination_explosion_fx_master_SpellScript();
|
||||
}
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mindless_abomination_explosion_fx_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
@@ -533,7 +298,7 @@ enum RivenwoodCaptives
|
||||
SPELL_SUMMON_FREED_MIST_WHISPER_SCOUT = 43289
|
||||
};
|
||||
|
||||
uint32 const CocoonSummonSpells[11] =
|
||||
std::array<uint32, 11> const CocoonSummonSpells =
|
||||
{
|
||||
SPELL_SUMMON_BABY_RIVEN_WIDOWS,
|
||||
SPELL_SUMMON_DARKCLAW_BAT,
|
||||
@@ -598,10 +363,9 @@ class spell_rivenwood_captives_on_quest : public SpellScript
|
||||
|
||||
void AddSC_howling_fjord()
|
||||
{
|
||||
new npc_apothecary_hanes();
|
||||
RegisterCreatureAI(npc_daegarn);
|
||||
new npc_mindless_abomination();
|
||||
new spell_mindless_abomination_explosion_fx_master();
|
||||
RegisterCreatureAI(npc_mindless_abomination);
|
||||
RegisterSpellScript(spell_mindless_abomination_explosion_fx_master);
|
||||
RegisterSpellScript(spell_rivenwood_captives_not_on_quest);
|
||||
RegisterSpellScript(spell_rivenwood_captives_on_quest);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user