mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8302] Drop now not used Player::MinimalLoadFromDB
This commit is contained in:
parent
19ccf59cd4
commit
8f08d03a14
3 changed files with 1 additions and 57 deletions
|
|
@ -13851,61 +13851,6 @@ void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, uint64 guid, u
|
|||
/*** LOAD SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
bool Player::MinimalLoadFromDB( QueryResult *result, uint32 guid )
|
||||
{
|
||||
bool delete_result = true;
|
||||
if (!result)
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11
|
||||
result = CharacterDatabase.PQuery("SELECT guid, data, name, position_x, position_y, position_z, map, totaltime, leveltime, at_login, zone, level FROM characters WHERE guid = '%u'",guid);
|
||||
if (!result)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
delete_result = false;
|
||||
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
if (!LoadValues( fields[1].GetString()))
|
||||
{
|
||||
sLog.outError("Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid));
|
||||
if (delete_result)
|
||||
delete result;
|
||||
return false;
|
||||
}
|
||||
|
||||
// overwrite possible wrong/corrupted guid
|
||||
SetUInt64Value(OBJECT_FIELD_GUID, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
|
||||
|
||||
m_name = fields[2].GetCppString();
|
||||
|
||||
Relocate(fields[3].GetFloat(),fields[4].GetFloat(),fields[5].GetFloat());
|
||||
SetLocationMapId(fields[6].GetUInt32());
|
||||
|
||||
// the instance id is not needed at character enum
|
||||
|
||||
m_Played_time[PLAYED_TIME_TOTAL] = fields[7].GetUInt32();
|
||||
m_Played_time[PLAYED_TIME_LEVEL] = fields[8].GetUInt32();
|
||||
|
||||
m_atLoginFlags = fields[9].GetUInt32();
|
||||
|
||||
// I don't see these used anywhere ..
|
||||
/*_LoadGroup();
|
||||
|
||||
_LoadBoundInstances();*/
|
||||
|
||||
if (delete_result)
|
||||
delete result;
|
||||
|
||||
for (int i = 0; i < PLAYER_SLOTS_COUNT; ++i)
|
||||
m_items[i] = NULL;
|
||||
|
||||
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
|
||||
m_deathState = DEAD;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Player::_LoadDeclinedNames(QueryResult* result)
|
||||
{
|
||||
if(!result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue