public void EndWar() { GuildA.WarringGuilds.Remove(GuildB); GuildB.WarringGuilds.Remove(GuildA); GuildA.SendMessage(string.Format("与{0}的战争结束了。", GuildB.Name, ChatType.Guild)); GuildB.SendMessage(string.Format("与{0}的战争结束了。", GuildA.Name, ChatType.Guild)); GuildA.UpdatePlayersColours(); GuildB.UpdatePlayersColours(); }
public void EndWar() { GuildA.WarringGuilds.Remove(GuildB); GuildB.WarringGuilds.Remove(GuildA); GuildA.SendMessage(string.Format("War ended with {0}.", GuildB.Name), ChatType.Guild); GuildB.SendMessage(string.Format("War ended with {0}.", GuildA.Name), ChatType.Guild); GuildA.UpdatePlayersColours(); GuildB.UpdatePlayersColours(); }
public void EndWar() { GuildA.WarringGuilds.Remove(GuildB); GuildB.WarringGuilds.Remove(GuildA); CheckWinner(); GuildA.UpdatePlayersColours(); GuildB.UpdatePlayersColours(); }
public void EndWar() { GuildA.WarringGuilds.Remove(GuildB); GuildB.WarringGuilds.Remove(GuildA); //发送行会战结束的通知 GuildA.SendMessage(string.Format("War ended with {0}.", GuildB.Name, ChatType.Guild)); GuildB.SendMessage(string.Format("War ended with {0}.", GuildA.Name, ChatType.Guild)); //改变行会玩家名字的颜色 GuildA.UpdatePlayersColours(); GuildB.UpdatePlayersColours(); }
public bool GoToWar(GuildObject enemyGuild) { if (enemyGuild == null) { return(false); } if (Envir.GuildsAtWar.Where(e => e.GuildA == this && e.GuildB == enemyGuild).Any() || Envir.GuildsAtWar.Where(e => e.GuildA == enemyGuild && e.GuildB == this).Any()) { return(false); } Envir.GuildsAtWar.Add(new GuildAtWar(this, enemyGuild)); UpdatePlayersColours(); enemyGuild.UpdatePlayersColours(); return(true); }
public bool GoToWar(GuildObject enemyGuild) { if(enemyGuild == null) { return false; } if (Envir.GuildsAtWar.Where(e => e.GuildA == this && e.GuildB == enemyGuild).Any() || Envir.GuildsAtWar.Where(e => e.GuildA == enemyGuild || e.GuildB == this).Any()) { return false; } Envir.GuildsAtWar.Add(new GuildAtWar(this, enemyGuild)); UpdatePlayersColours(); enemyGuild.UpdatePlayersColours(); return true; }