示例#1
0
        public static TooltipVars ReadTooltipValues(this PacketReader reader)
        {
            var data = new TooltipVars();

            data.OwnerNetID = reader.ReadNetID();
            data.SlotIndex  = reader.ReadByte();
            for (int i = 0; i < data.Values.Length; i++)
            {
                data.Values[i] = reader.ReadFloat();
            }
            for (int i = 0; i < data.HideFromEnemy.Length; i++)
            {
                data.HideFromEnemy[i] = reader.ReadBool();
            }
            return(data);
        }
示例#2
0
 public static void WriteTooltipValues(this PacketWriter writer, TooltipVars data)
 {
     if (data == null)
     {
         data = new TooltipVars();
     }
     writer.WriteNetID(data.OwnerNetID);
     writer.WriteByte(data.SlotIndex);
     for (int i = 0; i < data.Values.Length; i++)
     {
         writer.WriteFloat(data.Values[i]);
     }
     for (int i = 0; i < data.HideFromEnemy.Length; i++)
     {
         writer.WriteBool(data.HideFromEnemy[i]);
     }
 }