本文整理汇总了C#中PlayerStats.reset方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerStats.reset方法的具体用法?C# PlayerStats.reset怎么用?C# PlayerStats.reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerStats
的用法示例。
在下文中一共展示了PlayerStats.reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnListPlayers
//.........这里部分代码省略.........
{
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].TBvalue;
}
}
else if (this.strcurrentGametype.Contains("TeamDeathMatch"))
{
if (this.ScrambleByTDM == "Rank"){
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].rank;
}else if (this.ScrambleByTDM == "Skill"){
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].skill;
}else if (this.ScrambleByTDM == "SPM"){
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].spm;
}else if (this.ScrambleByTDM == "SPMcombat"){
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].spmcombat;
}else if (this.ScrambleByTDM == "K/D"){
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].kdr;
}
else if (this.ScrambleByTDM == "TB-Value")
{
this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].TBvalue;
}
}
if ( ( ((IList<string>)this.strAWhitelistComplete).Contains(cpiPlayer.SoldierName) || ( ((IList<string>)this.strAClantagWhitelist).Contains(dicPlayerCache[cpiPlayer.SoldierName].tag) && dicPlayerCache[cpiPlayer.SoldierName].tag != String.Empty ) ) && this.ynbWhitelist == enumBoolYesNo.Yes)
{
this.dicPlayerCache[cpiPlayer.SoldierName].playerWL = 1;
}
}
else
{
PlayerStats stats = new PlayerStats();
stats.reset();
/* If stats fetching is taking too long, skip for the rest of the current players list */
if (numStatsFetch > 0)
{
DebugInfoSkill("Starting Battlelog stats fetch for: ^b^5" + cpiPlayer.SoldierName);
DateTime startTime = DateTime.Now;
if (Servertype == "BF3")
{
stats = this.bclient.getPlayerStats(cpiPlayer.SoldierName, BattlelogClient.ServerType.BF3);
}
if (Servertype == "BF4")
{
stats = this.bclient.getPlayerStats(cpiPlayer.SoldierName, BattlelogClient.ServerType.BF4);
}
stats.statsFetched = true;
String name = (stats.tag != String.Empty) ? "[" + stats.tag + "]" + cpiPlayer.SoldierName : cpiPlayer.SoldierName;
DebugInfoSkill("^5^b" + name + "^n^9 stats fetched, rank is " + stats.rank + ", spm is " + stats.spm.ToString("F0") + ", ^b" + numRemaining + "^n players still need stats. ^2ELAPSED TIME: " + DateTime.Now.Subtract(startTime).TotalSeconds.ToString("F1") + " seconds");
--numStatsFetch;
}
double ValueTemp = 0;
double tempskill = stats.skill;
if (tempskill == 0)
tempskill = (this.skillA + this.skillB) / 2;
else if (tempskill < 0)