mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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 ***/
|
/*** 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)
|
void Player::_LoadDeclinedNames(QueryResult* result)
|
||||||
{
|
{
|
||||||
if(!result)
|
if(!result)
|
||||||
|
|
|
||||||
|
|
@ -1335,7 +1335,6 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
|
|
||||||
bool LoadFromDB(uint32 guid, SqlQueryHolder *holder);
|
bool LoadFromDB(uint32 guid, SqlQueryHolder *holder);
|
||||||
|
|
||||||
bool MinimalLoadFromDB(QueryResult *result, uint32 guid);
|
|
||||||
static bool LoadValuesArrayFromDB(Tokens& data,uint64 guid);
|
static bool LoadValuesArrayFromDB(Tokens& data,uint64 guid);
|
||||||
static uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index);
|
static uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index);
|
||||||
static float GetFloatValueFromArray(Tokens const& data, uint16 index);
|
static float GetFloatValueFromArray(Tokens const& data, uint16 index);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8301"
|
#define REVISION_NR "8302"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue