public ArenaRankLevel GetRankLevel(uint rank) { ArenaRankLevel ranklevel = ArenaRankLevel.ArenaRankLevel_End; IDictionaryEnumerator itr = DataManager.ArenaTable.GetEnumerator(); while (itr.MoveNext()) { ArenaTableItem item = itr.Value as ArenaTableItem; if (rank >= item.mHighestRank && rank <= item.mLowestRank) { ranklevel = (ArenaRankLevel)item.mRankLevel; break; } } // foreach(ArenaTableItem item in DataManager.ArenaTable.Values) // { // if(rank >= item.mHighestRank && rank <= item.mLowestRank) // { // ranklevel = (ArenaRankLevel)item.mRankLevel; // break; // } // } return(ranklevel); }
public string GetRankLevelStringByRankLevel(ArenaRankLevel ranklevel) { if (ArenaRankLevel.ArenaRankLevel_0 <= ranklevel && ranklevel <= ArenaRankLevel.ArenaRankLevel_3) { return(StringHelper.GetString("arena_rank_" + ((int)ranklevel).ToString())); } return(StringHelper.GetString("arena_rank_out")); }