Move the Giant Boar ride scene triggers ('Trampling Time', 'Big Kill Credit', 'Knockback') from exiles_reach_general_playerscript::OnSceneTriggerEvent into a new scene_exiles_reach_boar_ride SceneScript, bound via scene_template.ScriptName (SQL included). Core dispatches these events to the bound SceneScript on every branch, so the boar trample spell works without the ScriptMgr.cpp PlayerScript fan-out change. 'Teleport' triggers stay in the PlayerScript hook.
Jaina (156807) stays by Austin Huxworth at the rock edging (quest-giver);
add Captain Garrick (245394) as a separate NPC by the campfire. Both are
summoned on the ride reward.
- Revert the quest-giver from Captain Garrick (245394) back to Jaina
(156807); she belongs at the camp next to the campfire by Quartermaster
Richter, not in front of Wrathion. The scripted summon now places Jaina
there on the ride reward.
- Quartermaster Richter (156800) was missing UNIT_NPC_FLAG_REPAIR (0x1000),
so Repair Yourself (85678) couldn't be completed. Add the flag.
The phase-15017 regular spawn wasn't reliably showing Garrick (245394) for
the player. Summon him on the ride quest reward in front of Wrathion with
the QUESTGIVER npcflag set, so Stocking Up (55194) / Repair Yourself (85678)
are offered. Also set npcflag=2 on 245394 in the DB (it had 0, so it never
presented as a quest giver).
Log the player's area and quest state each phase-check tick, and the
GARRICK_15017 phase evaluation, to see why Captain Garrick (245394) doesn't
appear after the boar ride is rewarded.
- The post-Torgak quest-giver was 156807, which wrongly reused Jaina's model
(88316), so it read as a duplicate Jaina. Point the phase-15017 spawn and
the Stocking Up (55194) / Repair Yourself (85678) quest starters+enders at
245394 (Captain Garrick, model 109008).
- GARRICK_BEFORE_DARKMAUL_CITADEL phase was only shown after MESSAGE_TO_BASE +
WESTWARD_BOUND were rewarded, so Garrick never appeared right after the ride.
Show it once the boar ride is rewarded, until the player heads to the citadel.
Log when the ride abandon is detected, how many undead are tracked, and the
spawnIds being forced to respawn — to pinpoint why the mobs don't come back.
- The ride-giver the player actually talks to is on the Darkmaul Plains
(phase 13779), and its phase was removed when the ride was accepted
(!QuestAccepted) — so Jaina vanished on accept. Show it until the ride is
rewarded (matches the ogre-ruins GARRICK_CAMP fix).
- OnQuestStatusChange does NOT fire on quest abandon (RemoveActiveQuest
erases the entry without the hook), so the respawn-on-abandon never ran.
Detect the active->gone transition in OnPlayerWorldObjectUpdate and force
the mowed-down undead to respawn (Map::Respawn), while keeping them dead
on completion.
Same fix as the Alliance GARRICK_CAMP phase: Shuja's phase was only shown
after QUEST_H_THE_REDEATHER completed, so she vanished when the ride began.
Show it while accepted or completed.
- Remove the 156807 follower summon on ride accept (it reuses Jaina's
model 88316, so it read as a duplicate Jaina following you). Ride alone.
- GARRICK_CAMP phase was only shown after the ride was rewarded, so Jaina
phased out the moment she gave the quest. Show it while the ride is
accepted too.
The mobs' phase desync made IsValidAttackTarget fail, so the despawn loop
skipped them (they stayed alive and killed the rider when the ride ended).
Use IsHostileTo (faction-based, no phase check) in both the trample and the
Big Kill Credit despawning.
Track the undead spawnIds despawned by the boar (1h respawn delay). On
quest abandon, force their respawn (Map::Respawn sets the pending respawn
time to now) so the ride can be retried; clear tracking on completion.
The ogre-ruins undead are regular spawns, so DespawnOrUnsummon removed them
briefly then the spawn timer respawned them. Force a 1h respawn delay on
both the trample and the Big Kill Credit despawning so the mowed-down mobs
don't pop back during the ride.
The trample's own grid search didn't reliably despawn the undead (they stayed
alive and attacked the rider). Tie the despawn to the 'Big Kill Credit' scene
event (which reliably fires as the ride progresses): despawn all hostile mobs
within 50y (excluding Torgok). Also apply the rider's UNIT_FLAG_IMMUNE_TO_NPC
on EFFECT_0 (CONTROL_VEHICLE) as well as EFFECT_1 so the mobs can't damage the
player.
Kill+DespawnOrUnsummon left the corpses visible (regular spawns). Just
DespawnOrUnsummon the targets — the scene's 'Big Kill Credit' grants the
quest credit, so the mobs simply vanish when trampled.
The trample only dealt 120 damage, leaving healthier zombies/ogres alive
and visible. Kill and despawn each hostile target so the trampled army
actually disappears.
Some undead still hit the player during the boar ride (mobs that aggro on
sight, not via the trample). Set UNIT_FLAG_IMMUNE_TO_NPC on the player for
the ride's duration so mob attacks can't reach the rider (IsValidAttackTarget
checks target->IsImmuneToNPC); the boar takes the hits and the trample kills
the cadavers.
The trample script dealt damage from the player (GetCaster), so the undead
aggro'd the rider and chewed through the player's health during the boar
ride. Attribute the trample damage to the boar vehicle (GetVehicleBase) so
the mobs attack the boar instead.
ScriptMgr::OnSceneTrigger/Cancel/Complete only called the bound SceneScript
(via scene_template.ScriptName). The Thordekk Exiles Reach ride (and other
scene-driven content) registers its handlers as PlayerScript hooks
(OnSceneTriggerEvent/OnSceneComplete/OnSceneCancel), so 'Trampling Time' and
'Big Kill Credit' never fired -> the Giant Boar trample never cast and the
cadaver kill credit never granted. Add the FOREACH_SCRIPT(PlayerScript)
dispatch to all three.
- Revert the Cole/Throg sparring distance-leash (exiles_reach_north_sea.cpp):
it fought the clone's position/LOS desync on the ship (map 2261), making
the clone run away and clip; back to the original combat chase while we
investigate the position/LOS root cause.
- Fix spell_giant_boar_trample_305557 compile: CalcRadius returns SpellRange
(use .Max) and DealDamage is static (Unit::DealDamage, uint32 damage).
The trample's Effect 1 is a SPELL_EFFECT_DUMMY (radius 13, targets the
caster) that was never scripted, so it did nothing to the Monstrous
Cadavers (157091) during Ride of the Scientifically Enhanced Boar. Add a
spell script that damages all hostile creatures within the effect radius
(caster->DealDamage, effect value). Registered + spell_script_names row.
The SetBoundary approach made the sparring partner evade back to home with a
straight spline, clipping through the boat hull. Use a distance leash in
UpdateAI instead: stop chasing past 15y and walk back on the ship geometry.
The Alliance ride (Ride of the Scientifically Enhanced Boar, 55879) hides
phase 13783 (PHASE_GENERAL_DARKMAUL_PLAINS_ZOMBIES_AND_CADAVERS) while the
player rides (HasAura(SPELL_RIDING_GIANT_BOAR) or quest accepted), so the
Monstrous Cadavers (157091, phase 13783) are server-side out of phase:
visible to the client but not valid attack targets -> the boar trample
deals 0 damage and the ride can't progress to Torgok. Keep the phase
active while the ride is incomplete (hidden only after it's rewarded).
Applied to the identical condition in ogre_ruins, darkmaul_plains and
hruns_barrow.