/* * public void OpenWindow() * { * if (Singleton<ObjManager>.GetInstance().MainPlayer.Controller) * { * m_AutoFightOpenToggle.value = Singleton<ObjManager>.GetInstance().MainPlayer.Controller.CombatFlag; * } * } */ public void AutoFightOK() { //LogModule.DebugLog("AutoFightOK:"+m_AutoFightOpenToggle.value); Obj_MainPlayer User = Singleton <ObjManager> .Instance.MainPlayer; if (User) //更新信息 { if (VipData.GetVipLv() >= m_viplimit && User.BaseAttr.Level >= GlobeVar.MAX_AUTOEQUIT_LIVE) { User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_EQUIP1, m_AutoFightBaiSe.value); User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_EQUIP2, m_AutoFightYouXiu.value); User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_EQUIP3, m_AutoFightJingLiang.value); // User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_EQUIP4, m_AutoFightShiShi.value); // User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_EQUIP5, m_AutoFightChuanQi.value); // User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_STUFF, m_AutoFightZhengQi.value); // User.SetAutoPickUpFlag((int)Games.GlobeDefine.GameDefine_Globe.AUTOCOMBAT_PICKUP_TYPE.PICKUP_OTHER, m_AutoFightQiTa.value); } User.AutoInviteTeamAccept = m_AutoFightTeam.value; User.AutoActivityAccept = m_AutoActivity.value; User.AutoJoinTeamAccept = m_AutoFightReqTeam.value; User.AutoHpPercent = m_AutoFightInfoHpSlider.value; User.AutoMpPercent = m_AutoFightInfoMppSlider.value; //User.AutoRadius = (int)(m_AutoFightInfoSearchSlider.value * 100); // User.AutoBuyDrug = m_AutoFightDrug.value; User.ServerAutoInfo(); if (m_IsAutoFight == true) { User.EnterAutoCombat(); } else { User.LeveAutoCombat(); } if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateAutoFightBtnState(); } } }
public void OnOpenAFK() { if (m_bOpening) { return; } Obj_MainPlayer mainPalyer = Singleton <ObjManager> .Instance.MainPlayer; if (null == mainPalyer) { return; } if (mainPalyer.IsOpenAutoCombat) { mainPalyer.LeveAutoCombat(); } else { mainPalyer.EnterAutoCombat(); } }