Ejemplo n.º 1
0
 public Player(String name, UInt32 id, GameData.CharacterClassType class_, UInt32 level, Int32 x, Int32 y)
     : base(id,x,y)
 {
     m_name = name;
     m_class = class_;
     m_level = level;
     m_directoryKnown = true;
 }
Ejemplo n.º 2
0
 public Player(String name, UInt32 id, GameData.CharacterClassType class_, UInt32 level)
     : base(id, 0, 0)
 {
     m_name = name;
     m_class = class_;
     m_level = level;
     m_directoryKnown = false;
 }
Ejemplo n.º 3
0
 public Player(String name, UInt32 id, GameData.CharacterClassType class_, UInt32 level, Int32 x, Int32 y)
     : base(id, x, y)
 {
     m_name           = name;
     m_class          = class_;
     m_level          = level;
     m_directoryKnown = true;
 }
Ejemplo n.º 4
0
 public Player(String name, UInt32 id, GameData.CharacterClassType class_, UInt32 level)
     : base(id, 0, 0)
 {
     m_name           = name;
     m_class          = class_;
     m_level          = level;
     m_directoryKnown = false;
 }
Ejemplo n.º 5
0
 protected void InitializePlayer(byte type, List <byte> data)
 {
     if (!m_owner.BotGameData.Me.Initialized)
     {
         byte[] packet = data.ToArray();
         UInt32 id     = BitConverter.ToUInt32(packet, 1);
         GameData.CharacterClassType charClass = (GameData.CharacterClassType)data[5];
         UInt32 x         = BitConverter.ToUInt16(packet, 22);
         UInt32 y         = BitConverter.ToUInt16(packet, 24);
         Player newPlayer = new Player(m_owner.Character, id, charClass, m_owner.CharacterLevel, (int)x, (int)y);
         m_owner.BotGameData.Me = newPlayer;
     }
 }
Ejemplo n.º 6
0
        protected void PlayerJoins(byte type, List <byte> data)
        {
            byte[] packet = data.ToArray();
            UInt32 id     = BitConverter.ToUInt32(packet, 3);

            if (id != m_owner.BotGameData.Me.Id)
            {
                String name = BitConverter.ToString(packet, 8, 15);
                GameData.CharacterClassType charClass = (GameData.CharacterClassType)data[7];
                UInt32 level     = BitConverter.ToUInt16(packet, 24);
                Player newPlayer = new Player(name, id, charClass, level);
                m_owner.BotGameData.Players.Add(id, newPlayer);
            }
        }