fix Jail Break escort quest (#831)

This commit is contained in:
Grimfeather
2025-10-27 02:01:20 +01:00
committed by GitHub
parent 6eb0513062
commit 34bf8397d1
2 changed files with 11 additions and 5 deletions

View File

@@ -283,7 +283,7 @@ INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `
(9023, 5, 283.62, -116.09, -70.21, 0, ''),
(9023, 6, 296.18, -94.3, -74.08, 0, ''),
(9023, 7, 294.57, -93.11, -74.08, 0, 'escort paused - SAY_WINDSOR_CELL_DUGHAL_1'),
(9023, 8, 294.57, -93.11, -74.08, 10000, ''),
(9023, 8, 294.57, -93.11, -74.08, 5000, ''),
(9023, 9, 294.57, -93.11, -74.08, 3000, 'SAY_WINDSOR_CELL_DUGHAL_3'),
(9023, 10, 314.31, -74.31, -76.09, 0, ''),
(9023, 11, 360.22, -62.93, -66.77, 0, ''),
@@ -325,7 +325,7 @@ INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `
(9023, 47, 549.2, -252.4, -70.34, 4000, 'SAY_WINDSOR_CELL_CREST_2'),
(9023, 48, 555.33, -269.16, -74.4, 0, ''),
(9023, 49, 554.31, -270.88, -74.4, 0, 'escort paused - SAY_WINDSOR_CELL_TOBIAS_1'),
(9023, 50, 554.31, -270.88, -74.4, 10000, ''),
(9023, 50, 554.31, -270.88, -74.4, 5000, ''),
(9023, 51, 554.31, -270.88, -74.4, 4000, 'SAY_WINDSOR_CELL_TOBIAS_2'),
(9023, 52, 536.1, -249.6, -67.47, 0, ''),
(9023, 53, 520.94, -216.65, -59.28, 0, ''),
@@ -335,6 +335,11 @@ INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `
(9023, 57, 452.45, 29.85, -70.37, 1500, 'SAY_WINDSOR_FREE_1'),
(9023, 58, 452.45, 29.85, -70.37, 15000, 'SAY_WINDSOR_FREE_2');
-- adding this single waypoint avoids a console error - temporary fix
DELETE FROM `waypoint_data` WHERE `id` IN (9023);
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(9023, 1, 316.33, -225.52, -77.72, NULL, 0, 0, 0, 100, 0);
DELETE FROM `creature_text` WHERE `CreatureID` = 9023;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(9023, 0, 0, 'You locked up the wrong Marshal, $n. Prepare to be destroyed!', 12, 0, 100, 0, 0, 0, 5253, 0, 'Marshal Windsor - SAY_AGGRO'),

View File

@@ -104,8 +104,6 @@ public:
void SetGUID(ObjectGuid const& playerGUID, int32 /*id*/) override
{
_playerGUID = playerGUID;
Start(true, playerGUID, nullptr, false, false, false);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_IMMUNE_TO_PC);
}
void UpdateAI(uint32 diff) override
@@ -157,7 +155,7 @@ public:
{
case 1:
Talk(SAY_START_ESCORT);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_IMMUNE_TO_PC);
break;
case 7:
me->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
@@ -218,6 +216,7 @@ public:
case 23:
Talk(SAY_EQUIPMENT_4);
me->GetMotionMaster()->Clear();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_IMMUNE_TO_PC);
if (Player* player = ObjectAccessor::FindPlayer(_playerGUID))
me->SetFacingToObject(player);
break;
@@ -393,6 +392,8 @@ public:
if (quest->GetQuestId() == QUEST_JAIL_BREAK)
{
me->AI()->SetGUID(player->GetGUID());
me->SetWalk(true);
CAST_AI(npc_marshal_windsor::npc_marshal_windsorAI, me->AI())->Start(false, player->GetGUID());
}
else
{