This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! ByNameModding crashes

naclto

Platinian
i'm using bynamemodding in the following code, but it crashes. May I ask if anyone can tell me What is the reason for this?

int(*getcoin)(void *instance);
void (*old_FunctionExample)(void *instance);
void FunctionExample(void *instance) {
instanceBtn = instance;

if (instance != NULL) {
getcoin = (int (*)(void*))((uint64_t) instance +GETFIELD_BNM("BattleCore.dll","BattleCore","BattlePlayer","get_Gold"));
int pd = getcoin(instance);
if(pd==0 && switch){
*(int *) ((uint64_t) instance +GETFIELD_BNM("BattleCore.dll","BattleCore","ActorData","m_hp"))=1;
}
if(pd>0&& switch)
{
*(int *) ((uint64_t) instance +GETFIELD_BNM("BattleCore.dll","BattleCore","ActorAttrData","Atk"))=9999999;
}
}
return old_FunctionExample(instance);
}
 
and corresponding dump.cs like this:
// RVA: 0x1143024 VA: 0x7b48580024
public Int32 get_Gold() { }

private Int32 m_hp; // 0x78

public Int32 Atk; // 0x14

I hook function:

HOOK_BNM("BattleCore.dll", "BattleCore", "ActorData", "RefreshAttr",0,FunctionExample);
 
We need more information to be able to help you post the game name or the dump maybe you did a error in your declaration check bnm on load post the logcat

Thank u for ur time,I just upload a dump file, hook_bnm is always work when I put it on other hooks.
that's a linked set_hp function, I would like to unlink it, but it doesnt work whatever i use fields or class


and hook_bnm function is:

C++:
#define HOOK_BNM(dll,namespace,class,function,count,newfunction) \
DobbyHook((void *) (Il2CppGetMethodOffset(OBFUSCATE(dll), OBFUSCATE(namespace), OBFUSCATE(class) , OBFUSCATE(function), count)),(void *) newfunction , (void **) &old_##newfunction)
)
 
Code:
// Dll : BattleCore.dll
// Namespace: BattleCore
public class ActorData : ActorEntityCmpt
{
    // Fields
    private List<BattleCore.ActorAttrImpactMgr> m_listImpact; // 0x20
    private List<BattleCore.ActorAttrImpactMgr> m_listRuntimeImpact; // 0x28
    private ActorAttrData m_attrData; // 0x30
    internal ActorAttrData m_baseData; // 0x38
    private ActorAttrData m_runtimeBase; // 0x40
    private ActorAttrImpactMgr m_tempImpactMgr; // 0x48
    private Boolean m_baseChanged; // 0x50
    private Boolean m_runtimeChanged; // 0x51
    private Int32 <LogicReliveCnt>k__BackingField; // 0x54
    private Int32 <ReliveCnt>k__BackingField; // 0x58
    private Int32 m_maxHp; // 0x5c
    private FP <OriginalMaxHp>k__BackingField; // 0x60
    private FP m_originalHpPercent; // 0x68
    private FP m_hpPercent; // 0x70
    private Int32 m_hp; // 0x78
    private Int32 m_hpCount; // 0x7c
    private Int32 m_mp; // 0x80
    private Int32 m_maxMP; // 0x84
    private FP m_mpPercent; // 0x88
    private FP m_defenseFactor; // 0x90
    private Int32 <AutoReliveCnt>k__BackingField; // 0x98
    private Int32 <TotalReliveCnt>k__BackingField; // 0x9c
    private Int32 m_shield; // 0xa0
    private Int32 m_noDeathCount; // 0xa4
    private Int32 m_invincibleDeathNum; // 0xa8
    internal Int32 TotalInvincibleDeathNum; // 0xac
    private Int32 m_ignoreDamageCount; // 0xb0
    private Int32 m_exp; // 0xb4
    private Int32 m_expLevel; // 0xb8
    private FP m_shieldMaxPercentage; // 0xc0

    // Properties
    public ActorAttrData AttrData { get; }
    public Int32 ReliveCnt { get; set; }
    public Int32 MaxHp { get; set; }
    public FP OriginalMaxHp { get; }
    public Int32 Hp { get; set; }
    public Int32 HpCount { get; set; }
    public FP HpPercent { get; }
    public Int32 MP { get; set; }
    public Int32 MaxMp { get; }
    public FP DefenseFactor { get; set; }
    public Int32 TotalReliveCnt { set; }
    public Int32 Shield { get; set; }
    internal Int32 InvincibleDeathNum { get; set; }
    public Int32 IgnoreDamageCount { get; set; }
    public Int32 ExpLevel { get; }

    // Methods
    // RVA: 0x1084e7c VA: 0x7b484c1e7c
    internal Void RegAttrImpact(ActorAttrImpactMgr impactMgr) { }
    // RVA: 0x1084f78 VA: 0x7b484c1f78
    internal Void RegRuntimgAttrImpact(ActorAttrImpactMgr impactMgr) { }
    // RVA: 0x1085074 VA: 0x7b484c2074
    internal Void UnRegRuntimeAttrImpact(ActorAttrImpactMgr impactMgr) { }
    // RVA: 0x10850e4 VA: 0x7b484c20e4
    public ActorAttrData get_AttrData() { }
    // RVA: 0x10850ec VA: 0x7b484c20ec
    public FP GetAttrValue(Int32 dataType) { }
    // RVA: 0x1085164 VA: 0x7b484c2164
    public Int32 get_ReliveCnt() { }
    // RVA: 0x108516c VA: 0x7b484c216c
    internal Void set_ReliveCnt(Int32 value) { }
    // RVA: 0x1085174 VA: 0x7b484c2174
    public Int32 get_MaxHp() { }
    // RVA: 0x108517c VA: 0x7b484c217c
    internal Void set_MaxHp(Int32 value) { }
    // RVA: 0x108544c VA: 0x7b484c244c
    public FP get_OriginalMaxHp() { }
    // RVA: 0x1085454 VA: 0x7b484c2454
    internal Void set_Hp(Int32 value) { }
    // RVA: 0x1085528 VA: 0x7b484c2528
    public Int32 get_Hp() { }
    // RVA: 0x1085530 VA: 0x7b484c2530
    internal Void set_HpCount(Int32 value) { }
    // RVA: 0x1085548 VA: 0x7b484c2548
    public Int32 get_HpCount() { }
    // RVA: 0x1085550 VA: 0x7b484c2550
    public FP get_HpPercent() { }
    // RVA: 0x1085558 VA: 0x7b484c2558
    public Int32 get_MP() { }
    // RVA: 0x1085560 VA: 0x7b484c2560
    internal Void set_MP(Int32 value) { }
    // RVA: 0x1085638 VA: 0x7b484c2638
    public Int32 get_MaxMp() { }
    // RVA: 0x10856a0 VA: 0x7b484c26a0
    public FP get_DefenseFactor() { }
    // RVA: 0x10856a8 VA: 0x7b484c26a8
    public Void set_DefenseFactor(FP value) { }
    // RVA: 0x1085720 VA: 0x7b484c2720
    public Void set_TotalReliveCnt(Int32 value) { }
    // RVA: 0x1085728 VA: 0x7b484c2728
    public Int32 get_Shield() { }
    // RVA: 0x1085730 VA: 0x7b484c2730
    public Void set_Shield(Int32 value) { }
    // RVA: 0x108578c VA: 0x7b484c278c
    internal Int32 get_InvincibleDeathNum() { }
    // RVA: 0x1085794 VA: 0x7b484c2794
    internal Void set_InvincibleDeathNum(Int32 value) { }
    // RVA: 0x10857c0 VA: 0x7b484c27c0
    public Int32 get_IgnoreDamageCount() { }
    // RVA: 0x10857c8 VA: 0x7b484c27c8
    internal Void set_IgnoreDamageCount(Int32 value) { }
    // RVA: 0x1085810 VA: 0x7b484c2810
    public Int32 get_ExpLevel() { }
    // RVA: 0x1085818 VA: 0x7b484c2818
    public Void RefreshAttr() { }
    // RVA: 0x1085958 VA: 0x7b484c2958
    public Void MarkBaseImpactDirty() { }
    // RVA: 0x1085964 VA: 0x7b484c2964
    private Void MarkRuntimeImpactDirty() { }
    // RVA: 0x1085970 VA: 0x7b484c2970
    protected override Void Awake() { }
    // RVA: 0x1085a10 VA: 0x7b484c2a10
    protected override Void OnDestroy() { }
    // RVA: 0x1085ac8 VA: 0x7b484c2ac8
    private Void ClearImpactList(List<BattleCore.ActorAttrImpactMgr> listImpact, Boolean free) { }
    // RVA: 0x10851d0 VA: 0x7b484c21d0
    internal Void RefreshHpPercent() { }
    // RVA: 0x1085bf0 VA: 0x7b484c2bf0
    internal Void SetHP(Int32 hp) { }
    // RVA: 0x1085bf4 VA: 0x7b484c2bf4
    public Void .ctor() { }
}

// Dll : BattleCore.dll
// Namespace: BattleCore
public class ActorVisualRuntime
{
    // Fields
    private ActorEntity m_actor; // 0x10
    private Int32 m_skillAnimIndex; // 0x18
    private Single m_skillAnimScale; // 0x1c

    // Properties
    public Int32 SkillAnimIndex { get; set; }
    public Single SkillAnimScale { get; set; }

    // Methods
    // RVA: 0x1085cd0 VA: 0x7b484c2cd0
    public Void .ctor(ActorEntity entity) { }
    // RVA: 0x1085d00 VA: 0x7b484c2d00
    public Int32 get_SkillAnimIndex() { }
    // RVA: 0x1085d08 VA: 0x7b484c2d08
    public Void set_SkillAnimIndex(Int32 value) { }
    // RVA: 0x1085d3c VA: 0x7b484c2d3c
    public Single get_SkillAnimScale() { }
    // RVA: 0x1085d44 VA: 0x7b484c2d44
    public Void set_SkillAnimScale(Single value) { }
}

// Dll : BattleCore.dll
// Namespace: BattleCore
public class BattleVisualAttrData
{
    // Fields
    private ActorAttrData m_data; // 0x10

    // Properties
    public ActorAttrData Data { get; }

    // Methods
    // RVA: 0x1085d78 VA: 0x7b484c2d78
    public ActorAttrData get_Data() { }
    // RVA: 0x1085d80 VA: 0x7b484c2d80
    public FP GetAttr(Int32 dataType) { }
    // RVA: 0x1085d98 VA: 0x7b484c2d98
    public Void ClearAttr() { }
    // RVA: 0x1085db0 VA: 0x7b484c2db0
    public Void .ctor() { }
}


// Dll : BattleCore.dll
// Namespace: BattleCore
public class BattlePlayer
{
    // Fields
    private Battle m_ownBattle; // 0x10
    private UInt64 <PlayerID>k__BackingField; // 0x18
    internal ActorEntitySide m_side; // 0x20
    private Boolean <FlipX>k__BackingField; // 0x24
    private Boolean <FlipY>k__BackingField; // 0x25
    internal GPSkillTempData m_GPSkillTempData; // 0x28
    public BattleMergeMgr m_mergeMgr; // 0x30
    public BattleMapGridMgr m_mapGridMgr; // 0x38
    internal BattleRandomItemMgr m_randomItemMgr; // 0x40
    public MergeBagHPMgr m_mergeBagHPMgr; // 0x48
    internal BattleDropItemMgr m_dropItemMgr; // 0x50
    internal AffixDataMgr m_affixDataMgr; // 0x58
    internal RandomBuildCtrl m_randomBuildCtrl; // 0x60
    internal GamePlaySkillCtrl m_gpSkillCtrl; // 0x68
    internal BattlePlantMgr m_plantMgr; // 0x70
    internal PlayerEntityMgr m_playerEntityMgr; // 0x78
    internal GridEffectDataMgr m_gridEffectDataMgr; // 0x80
    protected LevelExpCalc m_expCalc; // 0x88
    private ExpParam m_curExpParam; // 0x90
    private Dictionary<System.Int32,BattleCore.BattleMonsterKillData> m_killData; // 0x98
    private List<BattleCore.BattleMonsterKillData> m_killDataList; // 0xa0
    internal BattleKillMonsterNumData BattleKillMonsterNumData; // 0xa8
    private List<BattleCore.MergeItemRecordData> m_ItemRecordDataList; // 0xb0
    public Boolean OnePunchKillForGM; // 0xb8
    public List<System.UInt32> BuildIDs; // 0xc0
    internal BattleWishItemMgr m_wishItemMgr; // 0xc8
    internal AoShuEntity MainAoShuEntity; // 0xd0
    internal List<BattleCore.BattleAoShuCDData> AoShuCDDataList; // 0xd8
    internal List<BattleCore.OtherEntityRunData> OtherEntityRunDataList; // 0xe0
    private Boolean <RejectRevive>k__BackingField; // 0xe8
    private FP <MaxWaitReviveEndTime>k__BackingField; // 0xf0
    private Boolean m_lastIsWaitingRevive; // 0xf8
    private Int32 <AutoReliveNum>k__BackingField; // 0xfc
    private Int32 <ReliveNum>k__BackingField; // 0x100
    private Int32 <MaxReliveNum>k__BackingField; // 0x104
    public List<BattleCore.BattleFreqLimitData> FreqLimitDatas; // 0x108
    internal Boolean NoDeath; // 0x110
    private Int32 <Gold>k__BackingField; // 0x114
    private Int32 <Chip>k__BackingField; // 0x118
    private Int32 <WishNum>k__BackingField; // 0x11c
    public Int32 Level; // 0x120
    public Int32 Exp; // 0x124
    public BigNumber TotalDamage; // 0x128
    public UInt32 RandomSkillGID; // 0x130
    public Int32 MaxNormalChapterId; // 0x134
    public UInt32 TotalPlantFightCnt; // 0x138
    private Boolean m_failFlag; // 0x13c
    private FP <CurExpRate>k__BackingField; // 0x140
    private FTimer m_delayTriggerRandomSkillEventimer; // 0x148
    private Int32 <TeamAverageAtk>k__BackingField; // 0x150
    internal BattlePlayerCreateParam m_createParam; // 0x158
    private LevelBaseConfig m_levelBaseCfg; // 0x160
    private FP m_secondKillInterval; // 0x168
    private FP m_curSecondKillTime; // 0x170
    public Int32 ResetBagWeaponCnt; // 0x178
    internal Boolean Draging; // 0x17c
    private Boolean <HasNormalMonthCard>k__BackingField; // 0x17d
    private Boolean <HasHighMonthCard>k__BackingField; // 0x17e
    private FP m_currInternalTime; // 0x180
    private FP m_startTimerTime; // 0x188
    private TaskEventData m_taskEventData; // 0x190
    private List<BattleCore.PlantUnlockConfig> m_tempUnlockCfgList; // 0x198

    // Properties
    public UInt64 PlayerID { get; set; }
    public Boolean FlipX { get; set; }
    public Boolean FlipY { get; set; }
    internal PlayerEntity MainPlayerEntity { get; }
    public Boolean RejectRevive { get; set; }
    public FP MaxWaitReviveEndTime { get; set; }
    public Boolean IsReviveTimeout { get; }
    public Boolean CanRelive { get; }
    public Boolean HasRelive { get; }
    public Boolean IsWaitingRevive { get; }
    public Boolean IsVeryDead { get; }
    public Int32 AutoReliveNum { get; set; }
    public Int32 ReliveNum { get; set; }
    public Int32 MaxReliveNum { get; set; }
    public Int32 Gold { get; set; }
    public Int32 Chip { get; set; }
    public Int32 WishNum { get; set; }
    public FP CurExpRate { get; set; }
    public Int32 TeamAverageAtk { get; set; }
    public BattleContext Context { get; }
    public BattlePlayerCreateParam CreateParam { get; }
    private Boolean HasNormalMonthCard { set; }
    public Boolean HasHighMonthCard { get; set; }
    public TaskEventData TaskEventData { get; }

    // Methods
    // RVA: 0x1142e60 VA: 0x7b4857fe60
    public UInt64 get_PlayerID() { }
    // RVA: 0x1142e68 VA: 0x7b4857fe68
    internal Void set_PlayerID(UInt64 value) { }
    // RVA: 0x1142e70 VA: 0x7b4857fe70
    public Boolean get_FlipX() { }
    // RVA: 0x1142e78 VA: 0x7b4857fe78
    private Void set_FlipX(Boolean value) { }
    // RVA: 0x1142e84 VA: 0x7b4857fe84
    public Boolean get_FlipY() { }
    // RVA: 0x1142e8c VA: 0x7b4857fe8c
    private Void set_FlipY(Boolean value) { }
    // RVA: 0x1142e98 VA: 0x7b4857fe98
    internal PlayerEntity get_MainPlayerEntity() { }
    // RVA: 0x1142eb4 VA: 0x7b4857feb4
    public Boolean get_RejectRevive() { }
    // RVA: 0x1142ebc VA: 0x7b4857febc
    internal Void set_RejectRevive(Boolean value) { }
    // RVA: 0x1142ec8 VA: 0x7b4857fec8
    public FP get_MaxWaitReviveEndTime() { }
    // RVA: 0x1142ed0 VA: 0x7b4857fed0
    internal Void set_MaxWaitReviveEndTime(FP value) { }
    // RVA: 0x113faf0 VA: 0x7b4857caf0
    public Boolean get_IsReviveTimeout() { }
    // RVA: 0x113fab8 VA: 0x7b4857cab8
    public Boolean get_CanRelive() { }
    // RVA: 0x1142ef4 VA: 0x7b4857fef4
    public Boolean get_HasRelive() { }
    // RVA: 0x1142f18 VA: 0x7b4857ff18
    public Boolean get_IsWaitingRevive() { }
    // RVA: 0x1142f88 VA: 0x7b4857ff88
    public Boolean get_IsVeryDead() { }
    // RVA: 0x1142ff4 VA: 0x7b4857fff4
    public Int32 get_AutoReliveNum() { }
    // RVA: 0x1142ffc VA: 0x7b4857fffc
    internal Void set_AutoReliveNum(Int32 value) { }
    // RVA: 0x1143004 VA: 0x7b48580004
    public Int32 get_ReliveNum() { }
    // RVA: 0x114300c VA: 0x7b4858000c
    internal Void set_ReliveNum(Int32 value) { }
    // RVA: 0x1143014 VA: 0x7b48580014
    public Int32 get_MaxReliveNum() { }
    // RVA: 0x114301c VA: 0x7b4858001c
    internal Void set_MaxReliveNum(Int32 value) { }
    // RVA: 0x1143024 VA: 0x7b48580024
    public Int32 get_Gold() { }
    // RVA: 0x114302c VA: 0x7b4858002c
    private Void set_Gold(Int32 value) { }
    // RVA: 0x1143034 VA: 0x7b48580034
    public Int32 get_Chip() { }
    // RVA: 0x114303c VA: 0x7b4858003c
    private Void set_Chip(Int32 value) { }
    // RVA: 0x1143044 VA: 0x7b48580044
    public Int32 get_WishNum() { }
    // RVA: 0x114304c VA: 0x7b4858004c
    private Void set_WishNum(Int32 value) { }
    // RVA: 0x1143054 VA: 0x7b48580054
    public FP get_CurExpRate() { }
    // RVA: 0x114305c VA: 0x7b4858005c
    private Void set_CurExpRate(FP value) { }
    // RVA: 0x1143064 VA: 0x7b48580064
    public Int32 get_TeamAverageAtk() { }
    // RVA: 0x114306c VA: 0x7b4858006c
    private Void set_TeamAverageAtk(Int32 value) { }
    // RVA: 0x1143074 VA: 0x7b48580074
    internal Void .ctor(Battle ownBattle) { }
    // RVA: 0x1142ed8 VA: 0x7b4857fed8
    public BattleContext get_Context() { }
    // RVA: 0x11433cc VA: 0x7b485803cc
    public BattlePlayerCreateParam get_CreateParam() { }
    // RVA: 0x11433d4 VA: 0x7b485803d4
    private Void set_HasNormalMonthCard(Boolean value) { }
    // RVA: 0x11433e0 VA: 0x7b485803e0
    public Boolean get_HasHighMonthCard() { }
    // RVA: 0x11433e8 VA: 0x7b485803e8
    private Void set_HasHighMonthCard(Boolean value) { }
    // RVA: 0x11433f4 VA: 0x7b485803f4
    internal Void Init(BattlePlayerCreateParam param, ActorEntitySide side, Int32 index) { }
    // RVA: 0x11446d4 VA: 0x7b485816d4
    internal Void Destroy() { }
    // RVA: 0x1144ad4 VA: 0x7b48581ad4
    internal Void Update() { }
    // RVA: 0x1144ba8 VA: 0x7b48581ba8
    internal Void AddExp(Int32 exp) { }
    // RVA: 0x1144bbc VA: 0x7b48581bbc
    private Void OnExpChg(ExpParam param) { }
    // RVA: 0x1144cec VA: 0x7b48581cec
    internal Void TriggerRandomSkillEvent(UInt32 boxLibId, SelectSkillType skillType) { }
    // RVA: 0x1144d04 VA: 0x7b48581d04
    internal Void PrepareTimeChangeGoldCmd() { }
    // RVA: 0x1144e9c VA: 0x7b48581e9c
    private Void AddInitStageCurrency() { }
    // RVA: 0x11400f0 VA: 0x7b4857d0f0
    internal Void AddGold(Int32 addVal, Boolean sendGoldChgEvent) { }
    // RVA: 0x1145040 VA: 0x7b48582040
    internal Boolean DecGold(Int32 decVal) { }
    // RVA: 0x1144f94 VA: 0x7b48581f94
    internal Void AddChip(Int32 addVal, Boolean sendChipChgEvent) { }
    // RVA: 0x11450f4 VA: 0x7b485820f4
    internal Boolean DecChip(Int32 decVal) { }
    // RVA: 0x11451a8 VA: 0x7b485821a8
    internal Void AddWishNum() { }
    // RVA: 0x11451b8 VA: 0x7b485821b8
    public Boolean CheckGoldCanRandomBag() { }
    // RVA: 0x11451fc VA: 0x7b485821fc
    public Boolean CheckChipCanWish() { }
    // RVA: 0x1145234 VA: 0x7b48582234
    public Boolean IsChipEnoughToWish() { }
    // RVA: 0x114525c VA: 0x7b4858225c
    public Int32 GetWishRequireChip() { }
    // RVA: 0x1145278 VA: 0x7b48582278
    internal Void CheckAndSelectSkill(UInt32 gid, UInt32 index) { }
    // RVA: 0x11453f0 VA: 0x7b485823f0
    internal Void CheckAndSelectAllSkill(UInt32 gid) { }
    // RVA: 0x11457a0 VA: 0x7b485827a0
    internal Void LearnDropSkillBox(UInt32 boxLibID, ActorEntity actor) { }
    // RVA: 0x1140240 VA: 0x7b4857d240
    internal Void OnGamePlayerStart() { }
    // RVA: 0x1145cf4 VA: 0x7b48582cf4
    internal Void OnMergeStageEnter() { }
    // RVA: 0x1145d24 VA: 0x7b48582d24
    public List<BattleCore.RandomBuildNormalData> GetCacheSkillData() { }
    // RVA: 0x1145ef0 VA: 0x7b48582ef0
    public List<System.UInt32> GetSelectedBuildIdList() { }
    // RVA: 0x1145f08 VA: 0x7b48582f08
    public Int32 GetCacheBuildCnt() { }
    // RVA: 0x113fa7c VA: 0x7b4857ca7c
    public Boolean IsDied() { }
    // RVA: 0x1145f1c VA: 0x7b48582f1c
    public Int32 GetSnapBattlePlayerHp() { }
    // RVA: 0x1145f58 VA: 0x7b48582f58
    public Int32 GetMp() { }
    // RVA: 0x1145f8c VA: 0x7b48582f8c
    public Void SetFailFlag(Boolean state) { }
    // RVA: 0x1140078 VA: 0x7b4857d078
    public Void OnRelive() { }
    // RVA: 0x11457b4 VA: 0x7b485827b4
    public Void ProcessBuildID() { }
    // RVA: 0x11461a4 VA: 0x7b485831a4
    public TaskEventData get_TaskEventData() { }
    // RVA: 0x11461ac VA: 0x7b485831ac
    public Void RecordKillMonster(Int32 monsterId) { }
    // RVA: 0x1146308 VA: 0x7b48583308
    public Void SnapKillMonsterData(ref List<BattleCore.BattleMonsterKillData>& ret) { }
    // RVA: 0x1146464 VA: 0x7b48583464
    public Void RecordKillMonsterNum(ActorEntity entity) { }
    // RVA: 0x1146504 VA: 0x7b48583504
    public Void RecordMergeItem(Int32 itemId, Int32 mergeLv) { }
    // RVA: 0x1146668 VA: 0x7b48583668
    public Void SnapMergeBagItemData(ref List<BattleCore.MergeItemRecordData>& ret) { }
    // RVA: 0x11467bc VA: 0x7b485837bc
    private BattleFreqLimitData GetFreqLimitData(Int32 key) { }
    // RVA: 0x1145614 VA: 0x7b48582614
    internal Void AddBattleFreqLimitData(Int32 curKey, Boolean useAd) { }
    // RVA: 0x1145554 VA: 0x7b48582554
    public Boolean IsReachMaxLimitVal(Int32 key, Boolean useAd) { }
    // RVA: 0x114685c VA: 0x7b4858385c
    public Int32 GetCurLevelFreqLimitVal(Int32 key, Boolean useAd) { }
    // RVA: 0x11468c0 VA: 0x7b485838c0
    public Int32 GetChapterFreqLimitVal(Int32 key, Boolean useAd) { }
    // RVA: 0x1146918 VA: 0x7b48583918
    public Int32 GetCurLevelFreqLeftVal(Int32 key, Boolean useAd) { }
    // RVA: 0x11469d4 VA: 0x7b485839d4
    public Int32 GetChapterFreqLeftVal(Int32 key, Boolean useAd) { }
    // RVA: 0x1146a70 VA: 0x7b48583a70
    public Boolean CheckHasFormula(Int32 plantID) { }
    // RVA: 0x1146a84 VA: 0x7b48583a84
    public PlantEntity GetPlantEntityByGridIdx(Int32 gridIdx) { }
    // RVA: 0x1146a98 VA: 0x7b48583a98
    public Void GetGridEffectByCurPlantId(Int32 plantId, ref List<BattleCore.GridEffectFuncData>& retList) { }
    // RVA: 0x1146b2c VA: 0x7b48583b2c
    public Void GetAllShowPlantID(ref List<System.Int32>& list) { }
    // RVA: 0x1146bc8 VA: 0x7b48583bc8
    public Void GetAllFightPlantID(ref List<System.Int32>& list) { }
    // RVA: 0x1146c64 VA: 0x7b48583c64
    public PlayerEntityRunData GetPlayerEntityRunData() { }
    // RVA: 0x1146c7c VA: 0x7b48583c7c
    public PlayerEntity GetCurPlayerEntity() { }
    // RVA: 0x1146c94 VA: 0x7b48583c94
    public Int64 GetCurAllDamage() { }
    // RVA: 0x1146cd4 VA: 0x7b48583cd4
    public Int64 GetMonsterTypeDamage(Int32 type) { }
    // RVA: 0x1146d24 VA: 0x7b48583d24
    public PlantRunData GetPlantRunData(Int32 id) { }
    // RVA: 0x1146d38 VA: 0x7b48583d38
    public UInt32 GetCurTotalPlantFightCnt() { }
    // RVA: 0x1146d40 VA: 0x7b48583d40
    public Int32 GetFightPlantCount(Int32 id) { }
    // RVA: 0x1146d54 VA: 0x7b48583d54
    public Int32 GetReRandSkillCnt(Int32 key) { }
    // RVA: 0x1146e08 VA: 0x7b48583e08
    public Boolean CheckIsPickPlantItem(Int32 plantId) { }
    // RVA: 0x1146ec0 VA: 0x7b48583ec0
    public UInt32 GetPlantLv(Int32 plantId) { }
    // RVA: 0x1146ed4 VA: 0x7b48583ed4
    public UInt32 GetPlantStarLv(Int32 plantId) { }
    // RVA: 0x1146ee8 VA: 0x7b48583ee8
    internal Boolean CheckChangeStageToLevelRandomSkill() { }
    // RVA: 0x1145930 VA: 0x7b48582930
    internal Boolean CheckAddDefaultBuildLib() { }
    // RVA: 0x1145b5c VA: 0x7b48582b5c
    private Boolean CheckAddEngraveBuildLib() { }
    // RVA: 0x1146fb8 VA: 0x7b48583fb8
    private Boolean CheckBuildBelongBaseFightPlant(BuildConfig buildCfg) { }
    // RVA: 0x1147134 VA: 0x7b48584134
    internal Void NewLearnGPSkill(GamePlaySkillFuncType funcType) { }
    // RVA: 0x11471d4 VA: 0x7b485841d4
    public Boolean CanFreeWish() { }
    // RVA: 0x1147204 VA: 0x7b48584204
    public Int32 GetAoShuCount() { }
    // RVA: 0x1147254 VA: 0x7b48584254
    public BattleAoShuEntry GetAoshuEntry(Int32 index) { }
    // RVA: 0x1144254 VA: 0x7b48581254
    private Void CreateMainAoShuEntity() { }
    // RVA: 0x11472e0 VA: 0x7b485842e0
    public List<BattleCore.BattleAoShuEntry> GetAoShuList() { }
    // RVA: 0x11472fc VA: 0x7b485842fc
    public Boolean IsAoShuInCd(Int32 skillID) { }
    // RVA: 0x1147478 VA: 0x7b48584478
    public Int32 GetMaxMp() { }
    // RVA: 0x11474c0 VA: 0x7b485844c0
    public Void RecordAoShuSkill(UInt32 skillID) { }
    // RVA: 0x1147678 VA: 0x7b48584678
    public Boolean CanClipGrid() { }
    // RVA: 0x114455c VA: 0x7b4858155c
    private Void UpdateTeamAverageAttr() { }
}
 
inside of your code you do
Code:
getcoin = (int (*)(void*))((uint64_t) instance +GETFIELD_BNM("BattleCore.dll","BattleCore","BattlePlayer","get_Gold"));

while we dont know the struct of your declare but get_Gold is not a field in your dump its a method

i cannot do feather investigaion becuse you only parsed the battleplayer class not the full dump its for what game
 
sry it seems i can't upload the file,so I upload to web,im not sure if you can open this website:
 
and also why try hooking getgold insted of the Update function thats avalaible in your class try a basic hook and try to add logs to see where its crashin


Code:
bool MaxDamage = false ;

void (*old_BattlePlayer_Update)(void *instance);
void BattlePlayer_Update(void * instance){

    if(instance != nullptr){

        if(MaxDamage){

            *(int *) ((uint64_t) instance + 0x14) = 9999;
            *(int *) ((uint64_t) instance + 0x78) = 1;
        }

    }

    old_BattlePlayer_Update(instance);

}
 
actually it doesnt crash when i try a basic hook,but it links me and enemy,that fields and function work 2 sides,im trying to unlink the roles