public override void LoadFromDB(SQLFields fields) { byte idx = 0; _id = fields.Read <uint>(idx); _playerGuid = ObjectGuid.Create(HighGuid.Player, fields.Read <ulong>(++idx)); _note = fields.Read <string>(++idx); _createTime = fields.Read <ulong>(++idx); _mapId = fields.Read <ushort>(++idx); _pos = new Vector3(fields.Read <float>(++idx), fields.Read <float>(++idx), fields.Read <float>(++idx)); _facing = fields.Read <float>(++idx); _targetCharacterGuid = ObjectGuid.Create(HighGuid.Player, fields.Read <ulong>(++idx)); _complaintType = (GMSupportComplaintType)fields.Read <byte>(++idx); int reportLineIndex = fields.Read <int>(++idx); if (reportLineIndex != -1) { _chatLog.ReportLineIndex.Set((uint)reportLineIndex); } long closedBy = fields.Read <long>(++idx); if (closedBy == 0) { _closedBy = ObjectGuid.Empty; } else if (closedBy < 0) { _closedBy.SetRawValue(0, (ulong)closedBy); } else { _closedBy = ObjectGuid.Create(HighGuid.Player, (ulong)closedBy); } ulong assignedTo = fields.Read <ulong>(++idx); if (assignedTo == 0) { _assignedTo = ObjectGuid.Empty; } else { _assignedTo = ObjectGuid.Create(HighGuid.Player, assignedTo); } _comment = fields.Read <string>(++idx); }
public void SetComplaintType(GMSupportComplaintType type) { _complaintType = type; }