private void AddUserAddedMessage(NotSelfUserNode userNode, TeamColor userTeamColor, CombatEventLogNode combatEventLogNode) { Color teamColor = CombatEventLogUtil.GetTeamColor(userTeamColor, combatEventLogNode.combatEventLog); string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLogNode.combatLogCommonMessages.UserJoinBattleMessage, "{user}", userNode.userRank.Rank, userNode.userUid.Uid, teamColor); combatEventLogNode.uiLog.UILog.AddMessage(messageText); }
public void ShowMessageOnUserSuicides(SelfDestructionBattleUserEvent e, BattleUserNode user, [JoinByUser] UserNode suicidedUser, BattleUserNode user2Team, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { Color color = this.GetTeamColor(team, user, combatEventLog); string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.SuicideMessage, "{user}", suicidedUser.userRank.Rank, suicidedUser.userUid.Uid, color); combatEventLog.uiLog.UILog.AddMessage(messageText); }
public void AddKillMessage(int score, string nickname, int rank) { this.IncreaseTotalScore(score); string messageText = CombatEventLogUtil.ApplyPlaceholder(this.killMessage.Value.Replace("{scoreValule}", score.ToString()), "{killer}", rank, this.ParseNickname(nickname), Color.white); this.combatEventLog.AddMessage(messageText); }
public void AddMessageLog(FlagEvent e, FlagNode flag, [JoinByTank] TankNode tank2Team, [JoinByTeam] TeamNode tankTeam, FlagNode flag2User, [JoinByTank] TankNode tank2User, [JoinByUser] UserNode user, FlagNode flag2Team, [JoinByTeam] TeamNode flagTeam, [JoinAll] SingleNode <SelfBattleUserComponent> selfUser, [JoinByTeam] Optional <TeamNode> selfTeam, [JoinAll] CombatLogNode combatLog) { CombatLogCTFMessagesComponent combatLogCTFMessages = combatLog.combatLogCTFMessages; string newValue = GetOwnFlag(selfTeam, flagTeam, combatLogCTFMessages); Color teamColor = CombatEventLogUtil.GetTeamColor(tankTeam.colorInBattle.TeamColor, combatLog.combatEventLog); string messageText = CombatEventLogUtil.ApplyPlaceholder(GetMessage(e, flag.Entity, combatLogCTFMessages).Replace(CombatLogCTFMessagesComponent.OWN, newValue), "{user}", user.userRank.Rank, user.userUid.Uid, teamColor); combatLog.uiLog.UILog.AddMessage(messageText); }
public void KillStreakBattleLog(KillStreakEvent e, SingleNode <TankIncarnationKillStatisticsComponent> node, [JoinByUser] UserNode userNode, [JoinByUser] BattleUserNode battleUser, [JoinByUser] RoundUserNode roundUser, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { int kills = node.component.Kills; if ((kills >= 5) && ((kills % 5) == 0)) { string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.KillStreakMessage.Replace("{killNum}", kills.ToString()), "{user}", userNode.userRank.Rank, userNode.userUid.Uid, this.GetTeamColor(team, battleUser, combatEventLog)); combatEventLog.uiLog.UILog.AddMessage(messageText); } }
public void NotifyAboutUserExit(NodeRemoveEvent e, BattleUserNode battleUser, [JoinByUser, Context] UserNode user, [JoinByUser] BattleUserNode battleUser2Team, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.UserLeaveBattleMessage, "{user}", user.userRank.Rank, user.userUid.Uid, this.GetTeamColor(team, battleUser, combatEventLog)); combatEventLog.uiLog.UILog.AddMessage(messageText); }
public void NotifyAboutTakenGold(GoldTakenNotificationEvent e, BattleUserNode battleUser, [JoinByUser] UserNode user, [JoinByUser] RoundUserNode roundUser, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.GoldTakenMessage, "{user}", user.userRank.Rank, user.userUid.Uid, this.GetTeamColor(team, battleUser, combatEventLog)); combatEventLog.uiLog.UILog.AddMessage(messageText); }
public void ShowKilledMessage(ShowMessageAfterKilledEvent e, TankNode victimTank, [JoinByUser] UserNode victimUser, [JoinByUser] BattleUserNode user, TankNode victimTank2Team, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { string messageText = CombatEventLogUtil.ApplyPlaceholder(CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.KillMessage, "{victim}", victimUser.userRank.Rank, victimUser.userUid.Uid, this.GetTeamColor(team, user, combatEventLog)), "{killer}", e.killerRank, e.KillerUserUid, CombatEventLogUtil.GetTeamColor(e.killerTeam, combatEventLog.combatEventLog)).Replace("{killItem}", e.killerItem.ToString()); combatEventLog.uiLog.UILog.AddMessage(messageText); }