コード例 #1
0
        public override string ToString()
        {
            var ss  = TimeVideo / 1000L;
            var m   = ss / 60L;
            var s   = ss % 60L;
            var mss = (TimeVideo % 1000L) / 100;
            var tv  = String.Format("{0}:{1}.{2}", m.ToString("00"), s.ToString("00"), mss.ToString("0"));

            ss  = TimeActual / 1000L;
            m   = ss / 60L;
            s   = ss % 60L;
            mss = (TimeActual % 1000L) / 100;
            var ta = String.Format("{0}:{1}.{2}", m.ToString("00"), s.ToString("00"), mss.ToString("0"));

            try
            {
                return(String.Format("{10}[ID={0}] {1}-{2}-{12} {3} T={4}/{5} P1={6} {7} P2={8} {9} U={11}",
                                     Id,
                                     ActionId,
                                     ActionType,
                                     Half != null ? Half.ToString() : "HALF NOT DEF",
                                     tv,
                                     ta,
                                     Player1 != null ? Player1.ToString() : String.Empty,
                                     Team1 != null ? Team1.ToString() : String.Empty,
                                     Player2 != null ? Player2.ToString() : String.Empty,
                                     Team2 != null ? Team2.ToString() : String.Empty,
                                     FlagDel ? "[DEL] " : "",
                                     user_id,
                                     Win));
            }
            catch
            { }

            return("");
        }
コード例 #2
0
        private void AddPlayers()
        {
            int team, Team1, Team2, Team3, Team4;

            Team1 = Team2 = Team3 = Team4 = 0;
            int team1hue, team2hue, team3hue, team4hue;

            team1hue = team2hue = team3hue = team4hue = 0;

            team1hue = m_PBGI.m_Team1Hue;
            team2hue = m_PBGI.m_Team2Hue;
            team3hue = m_PBGI.m_Team3Hue;
            team4hue = m_PBGI.m_Team4Hue;

            ArrayList PlayerTotal;

            PlayerTotal = new ArrayList();

            Item cloak;

            if (m_PBGI.Players != null)
            {
                foreach (Mobile mob in m_PBGI.Players)
                {
                    PlayerTotal.Add(mob);
                }
            }
            if (m_PBGI.NpcPlayers != null)
            {
                foreach (Mobile npc in m_PBGI.NpcPlayers)
                {
                    PlayerTotal.Add(npc);
                }
            }
            if (PlayerTotal != null)
            {
                foreach (Mobile pm in PlayerTotal)
                {
                    cloak = pm.FindItemOnLayer(Layer.Cloak);
                    if (cloak != null)
                    {
                        team = cloak.Hue;

                        if (team == team1hue)
                        {
                            AddLabel(25, 95 + Team1 * 20, team1hue, pm.Name);
                            Team1 += 1;
                        }

                        else if (team == team2hue)
                        {
                            AddLabel(172, 95 + Team2 * 20, team2hue, pm.Name);
                            Team2 += 1;
                        }

                        else if (team == team3hue)
                        {
                            AddLabel(318, 95 + Team3 * 20, team3hue, pm.Name);
                            Team3 += 1;
                        }

                        else if (team == team4hue)
                        {
                            AddLabel(463, 95 + Team4 * 20, team4hue, pm.Name);
                            Team4 += 1;
                        }
                        else
                        {
                        }
                    }
                }
            }

            AddLabel(44, 70, m_PBGI.m_Team1Hue, m_PBGI.Team1Name + " - " + Team1.ToString());
            AddLabel(188, 70, m_PBGI.m_Team2Hue, m_PBGI.Team2Name + " - " + Team2.ToString());
            if (m_PBGI.Teams > 2)
            {
                AddLabel(334, 70, m_PBGI.m_Team3Hue, m_PBGI.Team3Name + " - " + Team3.ToString());
            }
            if (m_PBGI.Teams > 3)
            {
                AddLabel(478, 70, m_PBGI.m_Team4Hue, m_PBGI.Team4Name + " - " + Team4.ToString());
            }
        }
コード例 #3
0
        private void AddPlayers()
        {
            int Team1, Team2, Team3, Team4;

            Team1 = Team2 = Team3 = Team4 = 0;
            int team;

            foreach (PlayerMobile pm in m_PBGI.Players)
            {
                team = pm.FindItemOnLayer(Layer.TwoHanded).Hue;
                switch (team)
                {
                case 3:
                {
                    if (pm.ChestArmor != null && pm.ChestArmor.Hue == team)
                    {
                        AddLabel(25, 95 + Team1 * 20, 3, pm.Name);
                    }
                    else
                    {
                        AddLabel(25, 95 + Team1 * 20, 1153, pm.Name);
                    }

                    Team1 += 1;
                    break;
                }

                case 38:
                {
                    if (pm.ChestArmor != null && pm.ChestArmor.Hue == team)
                    {
                        AddLabel(172, 95 + Team2 * 20, 38, pm.Name);
                    }
                    else
                    {
                        AddLabel(172, 95 + Team2 * 20, 1153, pm.Name);
                    }

                    Team2 += 1;
                    break;
                }

                case 68:
                {
                    if (m_PBGI.Teams > 2)
                    {
                        if (pm.ChestArmor != null && pm.ChestArmor.Hue == team)
                        {
                            AddLabel(318, 95 + Team3 * 20, 68, pm.Name);
                        }
                        else
                        {
                            AddLabel(318, 95 + Team3 * 20, 1153, pm.Name);
                        }

                        Team3 += 1;
                    }
                    break;
                }

                case 53:
                {
                    if (m_PBGI.Teams > 3)
                    {
                        if (pm.ChestArmor != null && pm.ChestArmor.Hue == team)
                        {
                            AddLabel(463, 95 + Team4 * 20, 53, pm.Name);
                        }
                        else
                        {
                            AddLabel(463, 95 + Team4 * 20, 1153, pm.Name);
                        }

                        Team4 += 1;
                    }
                    break;
                }

                default:                                break;
                }
            }

            AddLabel(44, 70, 3, "Team 1 - " + Team1.ToString());
            AddLabel(188, 70, 38, "Team 2 - " + Team2.ToString());
            if (m_PBGI.Teams > 2)
            {
                AddLabel(334, 70, 68, "Team 3 - " + Team3.ToString());
            }
            if (m_PBGI.Teams > 3)
            {
                AddLabel(478, 70, 53, "Team 4 - " + Team4.ToString());
            }
        }
コード例 #4
0
 public override string ToString()
 {
     return(string.Format("{0} vs {1}", Team1.ToString(), Team2.ToString()));
 }