|
可以修改这个代码让NPCGAME可以读取厂商信息,把 public string GetRandomNpcIP(int publisher_, gameScript game_)的读取厂商代码复制过去就行,可是我不会写 public string GetRandomNpcGame(int genre_)
{
string text = "";
if (this.npcGameNameInUse.Length == 0)
{
this.npcGameNameInUse = new bool[this.npcGames.Length];
}
for (int i = 0; i < this.npcGames.Length; i++)
{
if (!this.npcGameNameInUse[i && this.npcGames[i.Contains("<" + genre_.ToString() + ">"))
{
text = this.npcGames[i];
this.npcGameNameInUse[i = true;
break;
}
}
if (text.Length <= 0)
{
return "";
}
if (text == null)
{
return "";
}
for (int j = 0; j < this.genres_.genres_LEVEL.Length; j++)
{
text = text.Replace("<" + j.ToString() + ">", "");
}
text = text.Replace("\n", string.Empty);
text = text.Replace("\r", string.Empty);
text = text.Replace("\t", string.Empty);
return text.Substring(0, text.Length - 1);
}
|
|