Level 120: autohunt large targets, boss hit range, QUEST_INFO size

- QUEST_INFO: take the full packet size from the flags (server built it short)
- Bosses get the huge-race 500 centre hit test, like AVA2 IsBoss()
- Autohunt: defending reach as body size for large targets, walk straight
  at a body in reach when the planner finds no path, escalating skip for a
  target it keeps stalling on, new anchor after a teleport, immune skip only
  on an explicit 0-damage packet
- ava2-dungeons README: hydra range notes, snow key stack note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-17 11:59:54 +09:00
co-authored by Claude Opus 5.5
parent a1e7da68a4
commit 569afb1378
11 changed files with 189 additions and 43 deletions
+1
View File
@@ -936,6 +936,7 @@ void CActorInstance::__Initialize()
m_eActorType = TYPE_PC;
m_eRace = 0;
m_bRankIndex = 0;
m_eShape = 0;
m_eHair = 0;
+7
View File
@@ -267,6 +267,10 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
bool IsNPC();
bool IsEnemy();
bool IsStone();
// PORT: AVA2 - mob_proto rank; bosses (>= 4) are attacked like IS_HUGE_RACE.
bool IsBoss() { return m_bRankIndex >= 4; }
BYTE GetRank() { return m_bRankIndex; }
void SetRank(BYTE bNewRank) { m_bRankIndex = bNewRank; }
bool IsWarp();
bool IsGoto();
bool IsObject();
@@ -326,6 +330,8 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
void UpdateAdvancingPointInstance();
BOOL IsClickableDistanceDestInstance(CActorInstance & rkInstDst, float fDistance);
// PORT: farthest ground distance from the actor's position to the edge of a defending sphere.
float GetDefendingReach();
bool AvoidObject(const CGraphicObjectInstance& c_rkBGObj);
bool IsBlockObject(const CGraphicObjectInstance& c_rkBGObj);
@@ -723,6 +729,7 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
DWORD m_eActorType;
DWORD m_eRace;
BYTE m_bRankIndex;
DWORD m_eShape;
DWORD m_eHair;
BOOL m_isPreInput;
+18 -2
View File
@@ -145,6 +145,22 @@ BOOL CActorInstance::IsClickableDistanceDestInstance(CActorInstance & rkInstDst,
return FALSE;
}
float CActorInstance::GetDefendingReach()
{
TPixelPosition kPPos;
GetPixelPosition(&kPPos);
float fReach = 0.0f;
for (auto& rkPtInst : m_DefendingPointInstanceList)
for (auto& rkSphere : rkPtInst.SphereInstanceVector)
{
// Same frame as IsClickableDistanceDestInstance: the actor position and the spheres are both world space.
const float fGround = std::hypot(rkSphere.v3Position.x - kPPos.x, rkSphere.v3Position.y - kPPos.y);
fReach = std::max(fReach, fGround + rkSphere.fRadius);
}
return fReach;
}
void CActorInstance::InputNormalAttackCommand(float fDirRot)
{
if (!__CanInputNormalAttackCommand())
@@ -569,7 +585,7 @@ bool CActorInstance::__CanPushDestActor(CActorInstance& rkActorDst)
// 거대 몬스터 밀림 제외
extern bool IS_HUGE_RACE(unsigned int vnum);
if (IS_HUGE_RACE(rkActorDst.GetRace()))
if (IS_HUGE_RACE(rkActorDst.GetRace()) || rkActorDst.IsBoss())
return false;
if (rkActorDst.IsStun())
@@ -643,7 +659,7 @@ void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c
// #0000780: [M2KR] 수룡 타격구 문제
extern bool IS_HUGE_RACE(unsigned int vnum);
if (IS_HUGE_RACE(rVictim.GetRace()))
if (IS_HUGE_RACE(rVictim.GetRace()) || rVictim.IsBoss())
{
vec3Effect = c_rv3Position;
}
@@ -338,7 +338,7 @@ BOOL CActorInstance::__NormalAttackProcess(CActorInstance & rVictim)
float fDistance = D3DXVec3LengthSq(&v3Distance);
extern bool IS_HUGE_RACE(unsigned int vnum);
if (IS_HUGE_RACE(rVictim.GetRace()))
if (IS_HUGE_RACE(rVictim.GetRace()) || rVictim.IsBoss())
{
if (fDistance >= 500.0f*500.0f)
return FALSE;
@@ -460,7 +460,7 @@ BOOL CActorInstance::__NormalAttackProcess(CActorInstance & rVictim)
// #0000780: [M2KR] 수룡 타격구 문제
extern bool IS_HUGE_RACE(unsigned int vnum);
if (IS_HUGE_RACE(rVictim.GetRace()))
if (IS_HUGE_RACE(rVictim.GetRace()) || rVictim.IsBoss())
{
v3HitPosition = (GetPosition() + sub.v3Position) * 0.5f;
}