From 23dc67639f02642000aac5eaf213b7ebefe95d57 Mon Sep 17 00:00:00 2001 From: devbox Date: Sun, 23 Aug 2026 22:09:06 +1000 Subject: [PATCH] Exiles Reach: trample damage from the boar, not the rider 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. --- .../exiles_reach_darkmaul_plains.cpp | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp b/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp index fab070af8..74ee61eb0 100644 --- a/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp +++ b/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp @@ -1001,19 +1001,27 @@ public: if (!caster || !caster->IsInWorld()) return; - float radius = GetEffectInfo().CalcRadius(caster).Max; + // Damage comes from the boar vehicle so the undead aggro the boar, + // not the rider (a player-cast trample would pull threat onto the + // player and the mobs would chew through the rider's health). + Unit* source = caster; + if (Player* player = caster->ToPlayer()) + if (Unit* boar = player->GetVehicleBase()) + source = boar; + + float radius = GetEffectInfo().CalcRadius(source).Max; int32 damage = GetEffectValue(); std::list targets; - Trinity::AnyUnitInObjectRangeCheck u_check(caster, radius); - Trinity::CreatureListSearcher searcher(caster, targets, u_check); - Cell::VisitGridObjects(caster, searcher, radius); + Trinity::AnyUnitInObjectRangeCheck u_check(source, radius); + Trinity::CreatureListSearcher searcher(source, targets, u_check); + Cell::VisitGridObjects(source, searcher, radius); for (Creature* target : targets) { - if (!caster->IsValidAttackTarget(target)) + if (!source->IsValidAttackTarget(target)) continue; - Unit::DealDamage(caster, target, uint32(damage), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL); + Unit::DealDamage(source, target, uint32(damage), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL); } }