internal static Kill_Player_Requirements Read(int version, BinaryReader br)
        {
            Kill_Player_Requirements Kill_Player_Requirements = new Kill_Player_Requirements();

            Kill_Player_Requirements.m_ulOccupations = br.ReadInt32();
            Kill_Player_Requirements.m_iMinLevel     = br.ReadInt32();
            Kill_Player_Requirements.m_iMaxLevel     = br.ReadInt32();
            Kill_Player_Requirements.m_iGender       = br.ReadInt32();
            Kill_Player_Requirements.m_iForce        = br.ReadInt32();
            if (version >= 130)
            {
                Kill_Player_Requirements.ModelCheck = br.ReadBoolean();
                Kill_Player_Requirements.ModelType  = new byte[3];
                for (int i = 0; i < 3; i++)
                {
                    Kill_Player_Requirements.ModelType[i] = br.ReadByte();
                }
            }
            else
            {
                Kill_Player_Requirements.ModelCheck = false;
                Kill_Player_Requirements.ModelType  = new byte[3];
            }
            return(Kill_Player_Requirements);
        }
Esempio n. 2
0
 internal static void Write(int version, BinaryWriter bw, PLAYER_WANTED m_PlayerWanted)
 {
     bw.Write(m_PlayerWanted.m_ulPlayerNum);
     bw.Write(m_PlayerWanted.m_ulDropItemId);
     bw.Write(m_PlayerWanted.m_ulDropItemCount);
     bw.Write(m_PlayerWanted.m_bDropCmnItem);
     bw.Write(m_PlayerWanted.m_fDropProb);
     Kill_Player_Requirements.Write(version, bw, m_PlayerWanted.m_Requirements);
 }
Esempio n. 3
0
 internal static PLAYER_WANTED Read(int version, BinaryReader br)
 {
     return(new PLAYER_WANTED
     {
         m_ulPlayerNum = br.ReadInt32(),
         m_ulDropItemId = br.ReadInt32(),
         m_ulDropItemCount = br.ReadInt32(),
         m_bDropCmnItem = br.ReadBoolean(),
         m_fDropProb = br.ReadSingle(),
         m_Requirements = Kill_Player_Requirements.Read(version, br)
     });
 }
 internal static void Write(int version, BinaryWriter bw, Kill_Player_Requirements m_Requirements)
 {
     bw.Write(m_Requirements.m_ulOccupations);
     bw.Write(m_Requirements.m_iMinLevel);
     bw.Write(m_Requirements.m_iMaxLevel);
     bw.Write(m_Requirements.m_iGender);
     bw.Write(m_Requirements.m_iForce);
     if (version >= 130)
     {
         bw.Write(m_Requirements.ModelCheck);
         for (byte i = 0; i < 3; i++)
         {
             bw.Write(m_Requirements.ModelType[i]);
         }
     }
 }