public void onSendTalentPageIndexForEffect() { cmd_Entity_Talent_Start_Effect cmdPointEffect = new cmd_Entity_Talent_Start_Effect(); cmdPointEffect.nCurTalentPage = LogicDataCenter.talentPageDataManager.GetDataIndex(); EntityEventHelper.Instance.SendCommand <cmd_Entity_Talent_Start_Effect>(EntityFactory.MainHeroID, EntityLogicDef.ENTITY_CMD_BEGIN_TALENT_PAGE_EFFECT, ref cmdPointEffect); }
// 获得数据库索引,保存和删除都是数据库索引而不是排序号 public void GetCurPageDataIndex() { if (!Value.IsValueValid(TalentMenuFrame)) { return; } int nCurPageNum = TalentMenuFrame.Invoke("GetCurPageDataIndex"); cmd_Entity_Talent_Start_Effect cmdPointEffect = new cmd_Entity_Talent_Start_Effect(); cmdPointEffect.nCurTalentPage = nCurPageNum; IntPtrHelper helper = new IntPtrHelper(); IntPtr ptr = helper.toPtr <cmd_Entity_Talent_Start_Effect>(ref cmdPointEffect); int len = Marshal.SizeOf(cmdPointEffect); GameLogicAPI.onEntityEvent(EntityFactory.MainHeroID, (int)EntityLogicDef.ENTITY_CMD_BEGIN_TALENT_PAGE_EFFECT, len, "", ptr, len); }