游戏精英
 
- 贡献度
- 230
- 金元
- 44826
- 积分
- 5413
- 精华
- 1
- 注册时间
- 2009-11-19
|
在 GameAlgorithms里
// Token: 0x06001281 RID: 4737
public static RoomPrestige CalculateRoomPrestige(FloorPlan floorPlan)
{
int num = 0;
float num2 = 0f;
float progress = 0f;
RoomPrestigeLevel roomPrestigeLevel = GameAlgorithms._config.RoomPrestigeLevels[num];
if (floorPlan != null)
{
float num3 = 0f;
float num4 = GameAlgorithms.CalculateRoomTilePrestige(floorPlan);
foreach (RoomItem roomItem in floorPlan.Items)
{
num3 += roomItem.Prestige * 10f;
}
num2 = num3 + num4;
for (int i = 0; i < GameAlgorithms._config.RoomPrestigeLevels.Length; i++)
{
RoomPrestigeLevel roomPrestigeLevel2 = GameAlgorithms._config.RoomPrestigeLevels[i];
if (num2 >= (float)roomPrestigeLevel2.Points)
{
num = i;
roomPrestigeLevel = roomPrestigeLevel2;
}
}
if (num == GameAlgorithms._config.RoomPrestigeLevels.Length - 1)
{
progress = 0f;
}
else
{
float num7 = (float)GameAlgorithms._config.RoomPrestigeLevels[num + 1.Points;
int num5 = (roomPrestigeLevel == null) ? 0 : roomPrestigeLevel.Points;
float num6 = num7 - (float)num5;
progress = (num2 - (float)num5) / num6;
}
}
return new RoomPrestige
{
Level = num + 1,
Points = num2,
Progress = progress,
Data = roomPrestigeLevel
};
}
修改加红部分,*10f则十倍增长,随便放点就五级了
|
评分
-
1
查看全部评分
-
|