Пример #1
0
bool GmTicket::LoadFromDB(Field* fields)
{
    //     0       1     2      3          4        5      6     7     8           9            10         11         12       13        14         15        16        17
    // ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, response, completed, escalated, viewed, haveTicket
    uint8 index = 0;
    _id                 = fields[  index].GetUInt32();
    _playerGuid         = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER);
    _playerName         = fields[++index].GetString();
    _message            = fields[++index].GetString();
    _createTime         = fields[++index].GetUInt32();
    _mapId              = fields[++index].GetUInt16();
    _posX               = fields[++index].GetFloat();
    _posY               = fields[++index].GetFloat();
    _posZ               = fields[++index].GetFloat();
    _lastModifiedTime   = fields[++index].GetUInt32();
    _closedBy           = fields[++index].GetInt32();
    _assignedTo         = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER);
    _comment            = fields[++index].GetString();
    _response           = fields[++index].GetString();
    _completed          = fields[++index].GetBool();
    _escalatedStatus    = GMTicketEscalationStatus(fields[++index].GetUInt8());
    _viewed             = fields[++index].GetBool();
    _haveTicket         = fields[++index].GetBool();
    return true;
}
Пример #2
0
void GmTicket::LoadFromDB(Field* fields)
{
    uint8 index = 0;
    _ticketId = fields[index].GetUInt32();
    _playerGuid = MAKE_NEW_GUID(fields[++index].GetUInt64(), 0, HIGHGUID_PLAYER);
    _playerName = fields[++index].GetString();
    _message = fields[++index].GetString();
    _ticketCreateTime = fields[++index].GetUInt32();
    _mapId = fields[++index].GetUInt16();
    _pos.x = fields[++index].GetFloat();
    _pos.y = fields[++index].GetFloat();
    _pos.z = fields[++index].GetFloat();
    _lastModifiedTime = fields[++index].GetUInt32();

    int64 closedBy = fields[++index].GetInt64();
    int64 assignedTo = fields[++index].GetUInt64();

    _closedBy = closedBy < 0 ? 0 : MAKE_NEW_GUID(uint64(closedBy), 0, HIGHGUID_PLAYER);
    _assignedTo = assignedTo < 0 ? 0 : MAKE_NEW_GUID(assignedTo, 0, HIGHGUID_PLAYER);

    _comment = fields[++index].GetString();
    _response = fields[++index].GetString();
    _completed = fields[++index].GetBool();
    _escalatedStatus = GMTicketEscalationStatus(fields[++index].GetUInt8());
    _viewed = GMTicketOpenedByGMStatus(fields[++index].GetUInt8());
    _haveTicket = fields[++index].GetBool();
}
Пример #3
0
bool GmTicket::LoadFromDB(Field* fields)
{
    uint8 index = 0;
    _id                 = fields[  index].GetUInt32();
    _playerGuid         = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER);
    _playerName         = fields[++index].GetString();
    _message            = fields[++index].GetString();
    _createTime         = fields[++index].GetUInt32();
    _mapId              = fields[++index].GetUInt16();
    _posX               = fields[++index].GetFloat();
    _posY               = fields[++index].GetFloat();
    _posZ               = fields[++index].GetFloat();
    _lastModifiedTime   = fields[++index].GetUInt32();
    _closedBy           = fields[++index].GetInt32();
    _assignedTo         = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER);
    _comment            = fields[++index].GetString();
    _completed          = fields[++index].GetBool();
    _escalatedStatus    = GMTicketEscalationStatus(fields[++index].GetUInt8());
    _viewed             = fields[++index].GetBool();
    return true;
}