Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | _actor.ActorInfo.ResetHp(-1, -1, (int)vNetData.Value); |
| | | } |
| | | |
| | | if(_actor is GActorNpcFight) |
| | | if (_actor is GActorNpcFight) |
| | | { |
| | | if((PlayerDataRefresh)vNetData.RefreshType == PlayerDataRefresh.Speed) |
| | | if ((PlayerDataRefresh)vNetData.RefreshType == PlayerDataRefresh.Speed) |
| | | { |
| | | _actor.ActorInfo.moveSpeed = 500f / vNetData.Value; |
| | | } |
| | |
| | | return;
|
| | | }
|
| | | #endif
|
| | |
|
| | | // 跨服竞技场不检测反击逻辑
|
| | | if(PlayerDatas.Instance.baseData.MapID == 31340)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | // 是否反击
|
| | | if (_sTarget.ObjID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | |
| | | TransBytes (out SeasonList[i].SeasonID, vBytes, NetDataType.WORD);
|
| | | TransBytes (out SeasonList[i].Order, vBytes, NetDataType.WORD);
|
| | | TransBytes (out SeasonList[i].DanLV, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out SeasonList[i].Score, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out SeasonList[i].AwardLV, vBytes, NetDataType.BYTE);
|
| | | }
|
| | | }
|
| | |
| | | public ushort SeasonID; // 赛季ID
|
| | | public ushort Order; // 名次
|
| | | public byte DanLV; // 段位
|
| | | public uint Score; // 积分
|
| | | public byte AwardLV; // 赛季结算奖励等级,比如王者法宝的属性取该等级对应属性
|
| | | }
|
| | |
|
| | |
| | | #if UNITY_EDITOR
|
| | | && RuntimeLogUtility.s_forceAutoFight
|
| | | #endif
|
| | | )
|
| | | && PlayerDatas.Instance.baseData.MapID != 31340)
|
| | | {
|
| | | if (!aiHandler.IsAuto() && !BossShowModel.Instance.BossShowing)
|
| | | {
|
| | |
| | | ActorInfo.Hp = m_H0434.HP;
|
| | | ActorInfo.MaxHp = m_H0434.MaxHP;
|
| | |
|
| | | if (s_OnRefreshLife != null)
|
| | | {
|
| | | s_OnRefreshLife(ServerInstID, ActorInfo.RealHp, ActorInfo.RealMaxHp);
|
| | | }
|
| | |
|
| | | RequestName();
|
| | |
|
| | | m_CmdManager = new CmdManager();
|
| | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.UpdateCrossArenaRedpoint( ); |
| | | gen_to_be_invoked.UpdateCrossDayAwardsRedpoint( ); |
| | | |
| | | |
| | | |
| | |
| | | SelectEquipModel selectModel {get { return ModelCenter.Instance.GetModel<SelectEquipModel>(); }}
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | playerPack.ItemCntReduceAct += UpdateItemCount;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | playerPack.ItemCntReduceAct -= UpdateItemCount;
|
| | | }
|
| | |
|
| | | public void SetDisplay(ItemCompoundConfig _itemCompound,NeedMatType _matType,bool isLock,string des = "", int _itemId = 0,int _itemIndex = -1)
|
| | | {
|
| | | this.itemCompound = _itemCompound;
|
| | |
| | | WindowCenter.Instance.Open<SelectItemWin>();
|
| | | }
|
| | |
|
| | | private void UpdateItemCount(PackType type, int index, int id)
|
| | | {
|
| | | if (itemModel == null) return;
|
| | | |
| | | if(itemModel.packType == type |
| | | && itemModel.itemInfo.ItemPlace == index
|
| | | && itemModel.itemId == id)
|
| | | {
|
| | | ClickReduce();
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickReduce()
|
| | | {
|
| | | if (itemModel == null) return;
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | CrossServerOneVsOnePKSeason.Instance.updateSelfSeasonEvent -= UpdateSeason;
|
| | | TimeMgr.Instance.OnMinuteEvent -= UpdateMinute;
|
| | | dungeonModel.updateMissionEvent -= UpdateFBHelp;
|
| | | rewardModel.CrossRealmPKAwardStateUpdate -= UpdateDayAwardState;
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | CrossServerOneVsOnePKSeason.Instance.updateSelfSeasonEvent += UpdateSeason;
|
| | | TimeMgr.Instance.OnMinuteEvent += UpdateMinute;
|
| | | rewardModel.CrossRealmPKAwardStateUpdate += UpdateDayAwardState;
|
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent += UpdateDayAwardState;
|
| | |
| | | SendCrossMatch(1);
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | UpdateCrossMatchRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | |
|
| | | private void UpdateMinute()
|
| | | {
|
| | | UpdateCrossMatchRedpoint();
|
| | | if (!IsMatching) return;
|
| | |
|
| | | if(!CrossServerOneVsOnePKSeason.Instance.isSatisfyMatch)
|
| | |
| | | UpdateDayAwardsEvent();
|
| | | }
|
| | |
|
| | | UpdateCrossArenaRedpoint();
|
| | | UpdateCrossDayAwardsRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateSeason()
|
| | | {
|
| | | UpdateCrossMatchRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateFBHelp()
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching7");
|
| | | return true;
|
| | | }
|
| | |
|
| | | int remainMatchNum = CrossServerOneVsOnePlayerInfo.Instance.GetDayRemainNum();
|
| | | if(remainMatchNum <= 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching16");
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | |
|
| | | }
|
| | |
| | | public int order;
|
| | | public int division;
|
| | | public int rewardLevel;
|
| | | public int score;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | #endregion
|
| | |
|
| | | #region 红点
|
| | | public const int CrossServerRedKey = 213;
|
| | | public Redpoint crossServerRedpoint = new Redpoint(CrossServerRedKey);
|
| | | public const int CrossOneVsOneRedKey = 21301;
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossOneVsOneRedKey);
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossServerRedKey,CrossOneVsOneRedKey);
|
| | | public const int CrossArenaRedKey = 2130101;
|
| | | public Redpoint crossArenaRedpoint = new Redpoint(CrossOneVsOneRedKey, CrossArenaRedKey);
|
| | | public const int CrossDayAwardsRedKey = 21301011;
|
| | | public Redpoint crossDayAwardsRedpoint = new Redpoint(CrossArenaRedKey,CrossDayAwardsRedKey);
|
| | | public const int CrossMatchRedKey = 21301012;
|
| | | public Redpoint crossMatchRedpoint = new Redpoint(CrossArenaRedKey, CrossMatchRedKey);
|
| | | public void UpdateCrossArenaRedpoint()
|
| | | public void UpdateCrossDayAwardsRedpoint()
|
| | | {
|
| | | var playerInfo = CrossServerOneVsOnePlayerInfo.Instance;
|
| | | var pkSeason = CrossServerOneVsOnePKSeason.Instance;
|
| | |
|
| | | if(pkSeason.InPkSeason(TimeUtility.ServerNow) |
| | | && pkSeason.InOpenTime()
|
| | | && playerInfo.GetDayRemainNum() > 0)
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | |
| | | bool isReceive = false;
|
| | | for(int i = 0; i < dayAwardTypelist.Count; i++)
|
| | | {
|
| | |
| | | crossDayAwardsRedpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateCrossMatchRedpoint()
|
| | | {
|
| | | var playerInfo = CrossServerOneVsOnePlayerInfo.Instance;
|
| | | var pkSeason = CrossServerOneVsOnePKSeason.Instance;
|
| | |
|
| | | if (pkSeason.InPkSeason(TimeUtility.ServerNow)
|
| | | && pkSeason.InOpenTime()
|
| | | && playerInfo.GetDayRemainNum() > 0)
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (crossMatchRedpoint.state != RedPointState.None)
|
| | | {
|
| | | crossServerRedpoint.count = playerInfo.GetDayRemainNum();
|
| | | crossServerRedpoint.state = RedPointState.Quantity;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossServerRedpoint.count = 0;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | }
|
| | | }
|
| | |
| | | this.DayPKCount = playerInfo.DayPKCount;
|
| | | this.DayBuyCount = playerInfo.DayBuyCount;
|
| | | this.DayWinCount = playerInfo.DayWinCount;
|
| | | crossServerModel.UpdateCrossArenaRedpoint();
|
| | | crossServerModel.UpdateCrossDayAwardsRedpoint();
|
| | | if (UpdatePlayerInfoEvent != null)
|
| | | {
|
| | | UpdatePlayerInfoEvent();
|
| | |
| | |
|
| | | public int GetDayRemainNum()
|
| | | {
|
| | | return DayBuyCount + crossServerModel.freeMaxMatchNum - DayPKCount;
|
| | | int remainNum = DayBuyCount + crossServerModel.freeMaxMatchNum - DayPKCount;
|
| | | return remainNum > 0 ? remainNum : 0;
|
| | | }
|
| | |
|
| | | public int GetDayRemainBuyNum()
|
| | | {
|
| | | return crossServerModel.buyMaxMatchNum - DayBuyCount;
|
| | | int remainNum = crossServerModel.buyMaxMatchNum - DayBuyCount;
|
| | | return remainNum > 0 ? remainNum : 0;
|
| | | }
|
| | |
|
| | | public string DisplayWinningRate()
|
| | |
| | | {
|
| | | if (GameNetSystem.Instance.crossServerConnected_Loigc)//副本结算界面
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<CrossServerOneVsOneRoundWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<CrossServerOneVsOneRoundWin>();
|
| | | }
|
| | | WindowCenter.Instance.Open<CrossServerSettlementWin>();
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | var match = new CC104_tagCMExitCrossRealm();
|
| | | GameNetSystem.Instance.SendToCrossServer(match);
|
| | | SetPkType();
|
| | | }
|
| | |
|
| | | private static int pkDanLvNow = 0;
|
| | |
| | | set { m_PkType = value; }
|
| | | }
|
| | |
|
| | | private static void SetPkType()
|
| | | public static void SetPkType()
|
| | | {
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)m_PkType);
|
| | | if (m_PkType != 1)
|
| | | {
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)m_PkType);
|
| | | }
|
| | | else
|
| | | {
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)0);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CrossServerRewardModel.SetPkType(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | |
| | | m_SegmentTxt2.text = config2.Name;
|
| | |
|
| | | }
|
| | | m_SorceText.text = crossServerModel.pkResultInfo.CurScore + "(+" + crossServerModel.pkResultInfo.AddScore + ")";
|
| | | if (crossServerModel.pkResultInfo.WinStreak > 1)
|
| | | {
|
| | | m_SorceText.text = Language.Get("CrossServer_Z1", crossServerModel.pkResultInfo.CurScore, crossServerModel.pkResultInfo.AddScore);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SorceText.text = Language.Get("CrossServer_Z2", crossServerModel.pkResultInfo.CurScore, crossServerModel.pkResultInfo.AddScore);
|
| | | }
|
| | | } |
| | | |
| | | private void SetBrokenLine()
|
| | |
| | | int playerID = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | if (WinnerID == playerID)
|
| | | {
|
| | | m_BrokenLineText.text = "对手离开战斗";
|
| | | m_BrokenLineText.text = Language.Get("CrossServer_Z6");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BrokenLineText.text = "重新连接超时";
|
| | | m_BrokenLineText.text = Language.Get("CrossServer_Z7");
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.WinStreak > 1)
|
| | | {
|
| | |
| | | {
|
| | | m_SegmentObj1.SetActive(false);
|
| | | }
|
| | | m_Sorce_Txt.text = crossServerModel.pkResultInfo.CurScore + "(+" + crossServerModel.pkResultInfo.AddScore + ")";
|
| | | if (crossServerModel.pkResultInfo.WinStreak > 1)
|
| | | {
|
| | | m_Sorce_Txt.text = Language.Get("CrossServer_Z1", crossServerModel.pkResultInfo.CurScore, crossServerModel.pkResultInfo.AddScore);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Sorce_Txt.text = Language.Get("CrossServer_Z2", crossServerModel.pkResultInfo.CurScore, crossServerModel.pkResultInfo.AddScore);
|
| | | }
|
| | | } |
| | | } |
| | | |
| | |
| | |
|
| | | private void ClickRecieve()
|
| | | {
|
| | | if (awardType == null) return;
|
| | | if (awardType == null || m_CrossServerCyclicScroll.showing) return;
|
| | |
|
| | | isLineMove = true;
|
| | | switch (awardType.type)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var surplus = dungeonEndTime - DateTime.Now;
|
| | | m_CountdownText.text = ((int)surplus.TotalSeconds).ToString();
|
| | | var surplus = dungeonEndTime - DateTime.Now; |
| | | m_CountdownText.text = (Mathf.CeilToInt((float)surplus.TotalSeconds)).ToString();
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, December 28, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class KingRewardItem:MonoBehaviour { |
| | | |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_KingText; |
| | | public ItemCell ItemCell
|
| | | {
|
| | | get { return m_ItemCell; }
|
| | | set { m_ItemCell = value; }
|
| | | }
|
| | | public Text KingText
|
| | | {
|
| | | get { return m_KingText; }
|
| | | set { m_KingText = value; }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1df826046c779c545b19c4a08452d77c |
| | | timeCreated: 1545963952 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | int Index = cell.index;
|
| | | Button Btn = cell.GetComponent<Button>();
|
| | | Text txt = cell.transform.Find("Text").GetComponent<Text>();
|
| | | txt.text = "赛区" + Index;
|
| | | txt.text = Language.Get("CrossServer_Z4") + Index;
|
| | | Btn.SetListener(() =>
|
| | | {
|
| | | crossServerRewardModel.ZoneID = Index;
|
| | |
| | | int Index = cell.index;
|
| | | Button Btn = cell.GetComponent<Button>();
|
| | | Text txt = cell.transform.Find("Text").GetComponent<Text>();
|
| | | txt.text = "赛季" + Index;
|
| | | txt.text = Language.Get("CrossServer_Z3") + Index;
|
| | | Btn.SetListener(() =>
|
| | | {
|
| | | crossServerRewardModel.SeasonID = Index;
|
| | |
| | | |
| | | private void SetZoneAndSeasonNum()
|
| | | {
|
| | | m_DivisionNameText1.text = "赛区"+crossServerRewardModel.ZoneID.ToString();
|
| | | m_DivisionNameText2.text = "赛季"+crossServerRewardModel.SeasonID.ToString();
|
| | | m_DivisionNameText1.text = Language.Get("CrossServer_Z4") +crossServerRewardModel.ZoneID.ToString();
|
| | | m_DivisionNameText2.text = Language.Get("CrossServer_Z3") + crossServerRewardModel.SeasonID.ToString();
|
| | | } |
| | | |
| | | private void SetZoneIDAndSeasonID()//设置赛区和ID
|
| | |
| | | var keyList = crossServerRewardModel.SeasonRewardDic.AwardDic.Keys.ToList();
|
| | | int Index = keyList.IndexOf(id);
|
| | | if (Index == 0)
|
| | | {
|
| | | m_Text_Ranking.text = "1-" + id + "名";
|
| | | { |
| | | m_Text_Ranking.text = Language.Get("CrossServer_Z5", 1, id);
|
| | | }
|
| | | else
|
| | | {
|
| | | int Number = keyList[(Index - 1)];
|
| | | m_Text_Ranking.text = (Number+1) + "-" + id + "名";
|
| | | int Number = keyList[(Index - 1)]; |
| | | m_Text_Ranking.text = Language.Get("CrossServer_Z5", (Number + 1), id);
|
| | | }
|
| | | switch (Index)
|
| | | {
|
| | |
| | | for (int i = 0; i < m_Itemlist.childCount; i++)
|
| | | {
|
| | | GameObject ObjChild = m_Itemlist.GetChild(i).gameObject;
|
| | | KingRewardItem kingRewardItem = ObjChild.GetComponent<KingRewardItem>();
|
| | | if (i < List.Count)
|
| | | {
|
| | | ObjChild.SetActive(true);
|
| | | ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
|
| | | var config = Config.Instance.Get<KingTreasureItemConfig>(List[i].item.id);
|
| | | if (config != null)
|
| | | {
|
| | | kingRewardItem.KingText.gameObject.SetActive(true);
|
| | | kingRewardItem.KingText.text = config.qualityName;
|
| | | var Itemconfig = Config.Instance.Get<ItemConfig>(List[i].item.id);
|
| | | if (Itemconfig != null)
|
| | | {
|
| | | kingRewardItem.KingText.color = UIHelper.GetUIColor(Itemconfig.ItemColor,false); |
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | kingRewardItem.KingText.gameObject.SetActive(false);
|
| | | }
|
| | | ItemCell _ItemCell = kingRewardItem.ItemCell;
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].item.id, true, (ulong)List[i].item.count, List[i].isBind);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | |
| | | if (config != null)
|
| | | {
|
| | | m_Segmenttext.text = config.Name;
|
| | | m_Segmenttext.color = UIHelper.GetDanLVColor(config.DanLV, true);
|
| | | // m_Segmenttext.color = UIHelper.GetDanLVColor(config.DanLV, false);
|
| | | }
|
| | | if (CrossServerOneVsOnePKSeason.Instance.SeasonState != 2)
|
| | | {
|
| | |
| | | for (int i = 0; i < m_Itemlist.childCount; i++)
|
| | | {
|
| | | GameObject ObjChild = m_Itemlist.GetChild(i).gameObject;
|
| | | KingRewardItem kingRewardItem = ObjChild.GetComponent<KingRewardItem>();
|
| | | if (i < List.Count)
|
| | | {
|
| | | ObjChild.SetActive(true);
|
| | | ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
|
| | | var config = Config.Instance.Get<KingTreasureItemConfig>(List[i].ItemId);
|
| | | if (config != null)
|
| | | {
|
| | | kingRewardItem.KingText.gameObject.SetActive(true);
|
| | | kingRewardItem.KingText.text = config.qualityName;
|
| | | var Itemconfig = Config.Instance.Get<ItemConfig>(List[i].ItemId);
|
| | | if (Itemconfig != null)
|
| | | {
|
| | | kingRewardItem.KingText.color = UIHelper.GetUIColor(Itemconfig.ItemColor, false);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | kingRewardItem.KingText.gameObject.SetActive(false);
|
| | | }
|
| | | ItemCell _ItemCell = kingRewardItem.ItemCell;
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].ItemId, true, (ulong)List[i].ItemNumber, List[i].Isbind);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | |
| | | public event Action fairyFeastPlayerUpdate;
|
| | |
|
| | | public float transmitCostSeconds { get; private set; }
|
| | | public float transmitExpSeconds { get; private set; }
|
| | | string expFormula { get; set; }
|
| | | public int riseLevel { get; private set; }
|
| | | public int expFlyStage { get; private set; }
|
| | |
| | | void ParseConfig()
|
| | | {
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("FairyFeastTransmit");
|
| | | transmitCostSeconds = 15;
|
| | | transmitCostSeconds = 8.5f;
|
| | | transmitExpSeconds = 7.7f;
|
| | | expFlyCount = 3;
|
| | | expFlyStage = 3;
|
| | | if (config != null)
|
| | |
| | | transmitCostSeconds = float.Parse(config.Numerical2) / 1000;
|
| | | expFlyStage = int.Parse(config.Numerical3);
|
| | | expFlyCount = int.Parse(config.Numerical4);
|
| | | transmitExpSeconds = float.Parse(config.Numerical5) / 1000;
|
| | | }
|
| | | config = Config.Instance.Get<FuncConfigConfig>("FamilyPartySitAward");
|
| | | expFormula = config.Numerical1;
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | return timer / model.transmitCostSeconds;
|
| | | return timer / model.transmitExpSeconds;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | Stop();
|
| | | return;
|
| | | }
|
| | | if (timer >= stage * model.transmitCostSeconds / (model.expFlyStage + 1))
|
| | | if (timer >= stage * model.transmitExpSeconds / (model.expFlyStage + 1))
|
| | | {
|
| | | StepStage();
|
| | | stage++;
|
| | |
| | | myTeamRefreshEvent();
|
| | | OnRefreshFairyInfo();
|
| | | CheckRealmSfx();
|
| | |
|
| | |
|
| | | MailCountChange();
|
| | | GetRealmLevel();
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | if (PlayerDatas.Instance.hero.aiHandler.IsAuto())
|
| | |
| | | OnHeroHandupAIStopPassive();
|
| | | }
|
| | | }
|
| | | MailCountChange();
|
| | | GetRealmLevel();
|
| | | |
| | | |
| | | }
|
| | |
|
| | | public void OnAfterOpen()
|
| | |
| | | m_TaskSwithButton.gameObject.SetActive(false);
|
| | | m_InGamePusher.gameObject.SetActive(false);
|
| | | m_RedBag.gameObject.SetActive(false);
|
| | | IsShowTaskPanel();
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
|
| | | {
|
| | | ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
|
| | |
| | | return SatisfyCondition(config.EffectValueA1, config.EffectValueB1, out _place, out _hole);
|
| | | }
|
| | |
|
| | | /*旧版红点规则
|
| | | public void OnUpdateRedPoint()
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Gem))
|
| | | {
|
| | | return;
|
| | | }
|
| | | UpdateHoleRedpoint(presentGemEquip);
|
| | | for (int i = 1; i <= 10; i++)
|
| | | {
|
| | | ItemModel item = playerPack.GetItemModelByIndex(PackType.rptEquip, i);
|
| | | redpointList[i - 1].state = RedPointState.None;
|
| | | if (item != null)
|
| | | {
|
| | | ItemConfig itemCfg = Config.Instance.Get<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | List<ItemModel> list = IsBagHaveGem(FuncConfigConfig.GetGemTypeByEquipPos(item.itemInfo.ItemPlace));
|
| | | if (list == null || list.Count == 0) continue;
|
| | | uint[] stones = PlayerStoneData.Instance.GetStoneInfo(i);
|
| | | for (int j = 0; j < 4; j++)
|
| | | {
|
| | | if (j == 3)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < gemVipHoleLv || itemCfg.LV < gemOpenArray[0])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemCfg.LV < gemOpenArray[j])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | if ((stones == null || stones[j] == 0) && list.Count > 0)
|
| | | {
|
| | | redpointList[i - 1].state = RedPointState.Simple;
|
| | | break;
|
| | | }
|
| | | else
|
| | | {
|
| | | bool _replace = false;
|
| | | foreach (var gemItem in list)
|
| | | {
|
| | | if (gemItem.itemInfo.ItemID > stones[j])
|
| | | {
|
| | | redpointList[i - 1].state = RedPointState.Simple;
|
| | | _replace = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (!_replace && IsSatisfyGemCompose(i, j, (int)stones[j]))
|
| | | {
|
| | | redpointList[i - 1].state = RedPointState.Simple;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateHoleRedpoint(int _index)
|
| | | {
|
| | | for (int i = 0; i < gemHoleReds.Count; i++)
|
| | | {
|
| | | gemHoleReds[i].state = RedPointState.None;
|
| | | gemComposeReds[i].state = RedPointState.None;
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Gem))
|
| | | {
|
| | | return;
|
| | | }
|
| | | ItemModel item = playerPack.GetItemModelByIndex(PackType.rptEquip, _index);
|
| | | if (item != null)
|
| | | {
|
| | | ItemConfig itemCfg = Config.Instance.Get<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | List<ItemModel> list = IsBagHaveGem(FuncConfigConfig.GetGemTypeByEquipPos(item.itemInfo.ItemPlace));
|
| | | if (list == null || list.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | uint[] stones = PlayerStoneData.Instance.GetStoneInfo(_index);
|
| | | for (int j = 0; j < 4; j++)
|
| | | {
|
| | | if (j == 3)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < gemVipHoleLv || itemCfg.LV < gemOpenArray[0])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemCfg.LV < gemOpenArray[j])
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | if ((stones == null || stones[j] == 0) && list.Count > 0)
|
| | | {
|
| | | gemHoleReds[j].state = RedPointState.Simple;
|
| | | continue;
|
| | | }
|
| | | else
|
| | | {
|
| | | bool _replace = false;
|
| | | foreach (var gemItem in list)
|
| | | {
|
| | | if (gemItem.itemInfo.ItemID > stones[j])
|
| | | {
|
| | | gemHoleReds[j].state = RedPointState.Simple;
|
| | | _replace = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (!_replace && IsSatisfyGemCompose(_index, j, (int)stones[j]))
|
| | | {
|
| | | gemComposeReds[j].state = RedPointState.Simple;
|
| | | gemHoleReds[j].state = RedPointState.Simple;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }*/
|
| | |
|
| | | private Dictionary<int, Dictionary<int, bool>> gemHoleRedpoints = new Dictionary<int, Dictionary<int, bool>>();
|
| | |
|
| | | public void OnUpdateRedPoint()
|
| | |
| | | if (model.TryGetSeason(treasureId, out season)
|
| | | && treasureModel.TryGetTreasure(treasureId, out treasure))
|
| | | {
|
| | | var seasonNotStart = season > CrossServerOneVsOnePKSeason.Instance.SeasonID;
|
| | | var seasonNotStart = season > CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | || (season == CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | && CrossServerOneVsOnePKSeason.Instance.SeasonState == 0);
|
| | | m_ContainerSeasonNotStart.gameObject.SetActive(seasonNotStart);
|
| | | m_ContainerSeasonStartOrEnd.gameObject.SetActive(!seasonNotStart);
|
| | |
|
| | | bool seasonEnd = season < CrossServerOneVsOnePKSeason.Instance.SeasonID;
|
| | | bool seasonEnd = season < CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | || (season == CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | && CrossServerOneVsOnePKSeason.Instance.SeasonState == 2);
|
| | | if (!seasonNotStart)
|
| | | {
|
| | | m_EndState.gameObject.SetActive(seasonEnd);
|
| | |
| | | {
|
| | | DisplayGot();
|
| | | }
|
| | | else if (season < CrossServerOneVsOnePKSeason.Instance.SeasonID)
|
| | | else if (season < CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | || (season == CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | && CrossServerOneVsOnePKSeason.Instance.SeasonState == 2))
|
| | | {
|
| | | DisplayEnd();
|
| | | }
|
| | |
| | | if (kingTreasureModel.TryGetSeason(model.selectedTreasure, out session)
|
| | | && crossServerOneVsOneModel.TryGetOneVsOneHistory(session, out history))
|
| | | {
|
| | | m_Score.text = history.score.ToString();
|
| | | var divisionConfig = Config.Instance.Get<CrossServerArenaConfig>(history.division);
|
| | | if (divisionConfig != null)
|
| | | {
|
| | |
| | | bool containsDivision = kingTreasureModel.TryGetDivision(model.selectedTreasure, history.rewardLevel, out division);
|
| | | m_ContainerBaseProperty.gameObject.SetActive(containsDivision && division.basePropertys.Count > 0);
|
| | | m_ContainerSpecialProperty.gameObject.SetActive(containsDivision && division.specialPropertys.Count > 0);
|
| | | var index = 0;
|
| | | if (containsDivision && division.basePropertys.Count > 0)
|
| | | {
|
| | | var index = 0;
|
| | | foreach (var key in division.basePropertys.Keys)
|
| | | {
|
| | | if (index < m_BasePropertys.Length)
|
| | |
| | | }
|
| | | index++;
|
| | | }
|
| | | for (int i = index; i < m_BasePropertys.Length; i++)
|
| | | {
|
| | | m_BasePropertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | for (int i = index; i < m_BasePropertys.Length; i++)
|
| | | {
|
| | | m_BasePropertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | index = 0;
|
| | | if (containsDivision && division.specialPropertys.Count > 0)
|
| | | {
|
| | | var index = 0;
|
| | | foreach (var key in division.specialPropertys.Keys)
|
| | | {
|
| | | if (index < m_SpecialPropertys.Length)
|
| | |
| | | }
|
| | | index++;
|
| | | }
|
| | | for (int i = index; i < m_SpecialPropertys.Length; i++)
|
| | | {
|
| | | m_SpecialPropertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | for (int i = index; i < m_SpecialPropertys.Length; i++)
|
| | | {
|
| | | m_SpecialPropertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var season = 0;
|
| | | if (kingTreasureModel.TryGetSeason(id, out season))
|
| | | {
|
| | | if (season == CrossServerOneVsOnePKSeason.Instance.SeasonID + 1)
|
| | | if (season > CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | || (season == CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | && CrossServerOneVsOnePKSeason.Instance.SeasonState == 0))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TreasureOneVsOneSeasonNotStart");
|
| | | return false;
|
| | |
| | |
|
| | | private void Goto()
|
| | | {
|
| | | //--todo 跳转至赛季目标
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)278);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | var season = 0;
|
| | | if (model.TryGetSeason(_treasureId, out season))
|
| | | {
|
| | | if (season == CrossServerOneVsOnePKSeason.Instance.SeasonID + 1)
|
| | | if (season > CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | || (season == CrossServerOneVsOnePKSeason.Instance.SeasonID
|
| | | && CrossServerOneVsOnePKSeason.Instance.SeasonState == 0))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TreasureOneVsOneSeasonNotStart");
|
| | | return;
|