Add free cloak-style auto-hunt pull for 3 10 or 20 monster groups

This commit is contained in:
shen
2026-09-30 17:07:24 -07:00
parent d1f8d3dddd
commit 8a6aeaedf0
18 changed files with 558 additions and 96 deletions
+8 -7
View File
@@ -718,16 +718,17 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
bool bAttackStone;
bool bAttackBoss;
DWORD dwSkillSlotMask; // bit i = local quick slot i may be cast
int iGatherCount; // gather mode: hit this many mobs once each, then fight them together; 0 = off
int iGatherCount; // cloak pull: max 3/10/20 server monster groups; 0 = off
};
void AutoHunt_SetEnabled(bool isEnable);
bool AutoHunt_IsEnabled();
int AutoHunt_GetState();
int AutoHunt_GetStopReason();
// Gather mode: still pulling (vs. fighting the pack), and the pulled mobs still alive.
// Gather mode: still pulling (vs. fighting the pack), and the number of pulled groups.
bool AutoHunt_IsGathering();
int AutoHunt_GetGatheredCount();
bool AutoHunt_HandleServerCommand(const char* command); // PORT: server-authoritative cloak pull replies
bool AutoHunt_HasNoPotion(bool isHP);
const SAutoHuntConfig& AutoHunt_GetConfig();
void AutoHunt_SetConfig(const SAutoHuntConfig& c_rkConfig);
@@ -740,10 +741,9 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
bool __AutoHunt_UpdateBuff(CInstanceBase& rkInstMain, float fNow);
void __AutoHunt_UpdateAttackSkill(CInstanceBase& rkInstMain, CInstanceBase& rkInstVictim, float fNow);
bool __AutoHunt_IsSkillReady(DWORD dwSkillSlot, CPythonSkill::TSkillData** ppSkillData);
DWORD __AutoHunt_FindTarget(CInstanceBase& rkInstMain, float fNow, bool isExceptGathered = false);
DWORD __AutoHunt_FindTarget(CInstanceBase& rkInstMain, float fNow);
DWORD __AutoHunt_FindGatheredTarget(CInstanceBase& rkInstMain);
void __AutoHunt_PurgeGathered();
bool __AutoHunt_IsGatherDone(float fNow);
DWORD __AutoHunt_FindItem(CInstanceBase& rkInstMain, float fNow);
bool __AutoHunt_IsInventoryFull();
void __AutoHunt_Engage(DWORD dwVID, float fNow);
@@ -771,9 +771,10 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
std::map<DWORD, float> m_kMap_dwAutoHuntSkipItem; // ground item vid -> ignored until
bool m_isAutoHuntGathering;
float m_fAutoHuntGatherStartTime;
float m_fAutoHuntHitTime; // attacking the current target this long (gather tagging)
float m_fAutoHuntLastUpdateTime;
std::set<DWORD> m_kSet_dwAutoHuntGathered; // mobs hit while gathering, until they die
float m_fAutoHuntNextPullTime;
DWORD m_dwAutoHuntPullRequest;
int m_iAutoHuntGatheredGroups;
std::set<DWORD> m_kSet_dwAutoHuntGathered; // server-confirmed pulled mobs, until they die
private:
std::map<DWORD, DWORD> m_kMap_dwAffectIndexToSkillIndex;