Exiles Reach: revert ship sparring leash + fix trample script compile
Build (Windows x64) / build (push) Canceled after 0s
Build (Windows x64) / linux-build (push) Canceled after 0s

- 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).
This commit is contained in:
devbox
2026-08-23 18:41:45 +10:00
parent ffaac9ece6
commit c7a4bf966e
2 changed files with 2 additions and 28 deletions
@@ -1001,7 +1001,7 @@ public:
if (!caster || !caster->IsInWorld())
return;
float radius = GetEffectInfo().CalcRadius(caster);
float radius = GetEffectInfo().CalcRadius(caster).Max;
int32 damage = GetEffectValue();
std::list<Creature*> targets;
@@ -1013,7 +1013,7 @@ public:
{
if (!caster->IsValidAttackTarget(target))
continue;
caster->DealDamage(target, damage, nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL);
Unit::DealDamage(caster, target, uint32(damage), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL);
}
}
@@ -214,25 +214,6 @@ struct npc_exiles_reach_ship_166583_160664 : public ScriptedAI
{
npc_exiles_reach_ship_166583_160664(Creature* creature) : ScriptedAI(creature) {}
void SetLeashPosition(Position const& pos) { _leashPosition = pos; _leashSet = true; }
void UpdateAI(uint32 diff) override
{
if (Unit* victim = me->GetVictim())
{
// Stay on the boat: if the sparring partner gets dragged past the
// deck edge, stop chasing and walk back on the ship's geometry
// (avoids the boundary-evade spline that clips through the hull).
if (_leashSet && me->GetDistance(_leashPosition) > 15.0f)
{
me->AttackStop();
me->GetMotionMaster()->MovePoint(0, _leashPosition);
return;
}
}
ScriptedAI::UpdateAI(diff);
}
void BeFriendly()
{
me->AttackStop();
@@ -249,9 +230,6 @@ struct npc_exiles_reach_ship_166583_160664 : public ScriptedAI
case QUEST_H_STAND_YOUR_GROUND:
if (Creature* clone = me->SummonPersonalClone(me->GetPosition(), TEMPSUMMON_MANUAL_DESPAWN, 0s, 0U, 0U, player))
{
if (npc_exiles_reach_ship_166583_160664* personalAI = CAST_AI(npc_exiles_reach_ship_166583_160664, clone->AI()))
personalAI->SetLeashPosition(me->GetPosition());
clone->SetHealth(player->GetHealth());
clone->AI()->Talk(0, player);
// I'll take my position. Strike first, and strike hard!
@@ -327,10 +305,6 @@ struct npc_exiles_reach_ship_166583_160664 : public ScriptedAI
else
me->CastSpell(player, SPELL_JUMP_BEHIND, true);
}
private:
Position _leashPosition;
bool _leashSet = false;
};
void AddSC_exiles_reach_north_sea()