Example #1
0
        public CTFTeamInfo(int teamID, GenericReader ip)
        {
            m_TeamID  = teamID;
            m_Players = new Dictionary <Mobile, CTFPlayerInfo>();

            int version = ip.ReadEncodedInt();

            switch (version)
            {
            case 2:
            {
                m_Board = ip.ReadItem() as CTFBoard;

                goto case 1;
            }

            case 1:
            {
                m_Name = ip.ReadString();

                goto case 0;
            }

            case 0:
            {
                m_Color = ip.ReadEncodedInt();

                m_Flag   = ip.ReadItem() as ConCTFFlag;
                m_Origin = ip.ReadPoint3D();
                break;
            }
            }
        }
Example #2
0
        public CTFTeamInfo( int teamID, GenericReader ip )
        {
            m_TeamID = teamID;
            m_Players = new Dictionary<Mobile, CTFPlayerInfo>();

            int version = ip.ReadEncodedInt();

            switch ( version )
            {
                case 2:
                {
                    m_Board = ip.ReadItem() as CTFBoard;

                    goto case 1;
                }
                case 1:
                {
                    m_Name = ip.ReadString();

                    goto case 0;
                }
                case 0:
                {
                    m_Color = ip.ReadEncodedInt();

                    m_Flag = ip.ReadItem() as CTFFlag;
                    m_Origin = ip.ReadPoint3D();
                    break;
                }
            }
        }