private byte[] GenerateString(ArenaOpponent opponentList) { if (opponentList == null) { return(null); } return(SerializationHelper.ToByte(opponentList)); }
// Token: 0x06009E98 RID: 40600 RVA: 0x002CEB38 File Offset: 0x002CCD38 public void SetArenaOpponent(ArenaOpponent o, int idx, bool isGuardBattle) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetArenaOpponentArenaOpponentInt32Boolean_hotfix != null) { this.m_SetArenaOpponentArenaOpponentInt32Boolean_hotfix.call(new object[] { this, o, idx, isGuardBattle }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_playerNameText.text = o.Name; this.m_playerLevelText.text = o.Level.ToString(); this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(o.HeadIcon))); if (isGuardBattle) { this.m_arenaPointsGameObject.SetActive(false); } else { this.m_arenaPointsGameObject.SetActive(true); this.m_arenaPointsText.text = o.ArenaPoints.ToString(); } this.m_index = idx; int num = 3 - idx; if (isGuardBattle) { this.m_uiStateCtrl.SetToUIState("High", false, true); } else if (num == 1) { this.m_uiStateCtrl.SetToUIState("Low", false, true); } else if (num == 2) { this.m_uiStateCtrl.SetToUIState("Normal", false, true); } else if (num == 3) { this.m_uiStateCtrl.SetToUIState("High", false, true); } IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ConfigDataArenaOpponentPointZoneInfo configDataArenaOpponentPointZoneInfo = configDataLoader.GetConfigDataArenaOpponentPointZoneInfo(num); if (configDataArenaOpponentPointZoneInfo != null) { this.m_victoryPointsText.text = "+ " + configDataArenaOpponentPointZoneInfo.VictoryPoint; } }
public static int get_UserId(IntPtr l) { int result; try { ArenaOpponent arenaOpponent = (ArenaOpponent)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, arenaOpponent.UserId); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int constructor(IntPtr l) { int result; try { ArenaOpponent o = new ArenaOpponent(); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int PBArenaOpponentToArenaOpponent_s(IntPtr l) { int result; try { ProArenaOpponent pbArenaOpponent; LuaObject.checkType <ProArenaOpponent>(l, 1, out pbArenaOpponent); ArenaOpponent o = ArenaOpponent.PBArenaOpponentToArenaOpponent(pbArenaOpponent); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_HeadIcon(IntPtr l) { int result; try { ArenaOpponent arenaOpponent = (ArenaOpponent)LuaObject.checkSelf(l); int headIcon; LuaObject.checkType(l, 2, out headIcon); arenaOpponent.HeadIcon = headIcon; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_ArenaPoints(IntPtr l) { int result; try { ArenaOpponent arenaOpponent = (ArenaOpponent)LuaObject.checkSelf(l); ushort arenaPoints; LuaObject.checkType(l, 2, out arenaPoints); arenaOpponent.ArenaPoints = arenaPoints; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_Level(IntPtr l) { int result; try { ArenaOpponent arenaOpponent = (ArenaOpponent)LuaObject.checkSelf(l); int level; LuaObject.checkType(l, 2, out level); arenaOpponent.Level = level; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_Name(IntPtr l) { int result; try { ArenaOpponent arenaOpponent = (ArenaOpponent)LuaObject.checkSelf(l); string name; LuaObject.checkType(l, 2, out name); arenaOpponent.Name = name; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int FindOpponent(IntPtr l) { int result; try { DataSectionArena dataSectionArena = (DataSectionArena)LuaObject.checkSelf(l); int index; LuaObject.checkType(l, 2, out index); ArenaOpponent o = dataSectionArena.FindOpponent(index); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Token: 0x06006C2C RID: 27692 RVA: 0x001E5098 File Offset: 0x001E3298 public void FlushOpponents(List <ProArenaOpponent> pbOpponents, long nextFlushTime) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_FlushOpponentsList ` 1Int64_hotfix != null) { this.m_FlushOpponentsList ` 1Int64_hotfix.call(new object[] { this, pbOpponents, nextFlushTime }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; List <ArenaOpponent> list = new List <ArenaOpponent>(); foreach (ProArenaOpponent pbArenaOpponent in pbOpponents) { list.Add(ArenaOpponent.PBArenaOpponentToArenaOpponent(pbArenaOpponent)); } this.m_arenaDS.SetOpponents(list); this.m_arenaDS.ArenaPlayerInfo.NextFlushOpponentTime = nextFlushTime; }
/// <summary> /// 刷新对手 /// </summary> /// <param name="managerId">经理id</param> /// <param name="danGrading">段位</param> /// <param name="matchOpponent">打过的对手</param> /// <returns></returns> private ArenaOpponent RefreshOpponent(Guid managerId, int danGrading, List <Guid> matchOpponent) { var result = new ArenaOpponent(); var opponentList = new List <OpponentEntity>(); var resultList = new List <Guid>(); for (int i = 1; i < 4; i++) //选3个对手 { var key = CacheFactory.ArenaCache.GetKey(danGrading, i); //获取key if (!_OpponentDic.ContainsKey(key)) { return(null); } var list = new List <ArenaManagerinfoEntity>(); //循环添加。避免操作list影响对手池 foreach (var item in _OpponentDic[key]) { list.Add(item); } int index = 0; while (index < 10 && list.Count > 0) //循环10次排除重复 { var listIndex = RandomHelper.GetInt32WithoutMax(0, list.Count); var info = list[listIndex]; //随机一个对手 list.RemoveAt(listIndex); //移除随机过的项 if (managerId == info.ManagerId) //排除自己 { continue; } if (!resultList.Exists(r => r == info.ManagerId)) //结果里面已经包含了该对手 { if (matchOpponent != null && matchOpponent.Count < 5 && matchOpponent.Exists(r => r == info.ManagerId)) //打过比赛的对手里面已经包含了该对手 { index++; continue; } var entity = new OpponentEntity(); entity.OpponentManagerId = info.ManagerId; entity.OpponentZoneName = info.SiteId; if (info.IsNpc) { entity.OpponentKpi = info.Kpi; entity.OpponentName = info.ManagerName; } else { entity.OpponentName = info.ZoneName + "." + info.ManagerName; var arenaFrame = new ArenaTeammemberFrame(entity.OpponentManagerId, (EnumArenaType)this.ArenaType, entity.OpponentZoneName); entity.OpponentKpi = arenaFrame.Kpi; } entity.IsNpc = info.IsNpc; entity.OpponentLogo = info.Logo; entity.OpponentIntegral = info.Integral; entity.OpponentDanGrading = info.DanGrading; resultList.Add(entity.OpponentManagerId); opponentList.Add(entity); break; } index++; } if (index >= 10 || list.Count == 0) { return(null); } } CheckOpponent(ref opponentList); result.OpponentList = opponentList; result.MatchOpponent = matchOpponent; return(result); }
public static ArenaOpponent AssertNotDefeated3X3(this ArenaOpponent opponent) => default;
public static bool IsArena3X3Win(this ArenaOpponent opponent) => default;
public static bool IsFirstBattleInARow(this ArenaOpponent currentOpponent) => default;