Wouldn't it be the easiest way simply revert 8302? Or re-apply the function? Just because mangos doesn't use it anymore mustn't mean ahbot shouldn't use it anymore.
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 044739e..087b6f7 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -13851,6 +13851,61 @@ 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)
diff --git a/src/game/Player.h b/src/game/Player.h
index d31a575..f951af9 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1335,6 +1335,7 @@ class MANGOS_DLL_SPEC Player : public Unit
bool LoadFromDB(uint32 guid, SqlQueryHolder *holder);
+ bool MinimalLoadFromDB(QueryResult *result, uint32 guid);
static bool LoadValuesArrayFromDB(Tokens& data,uint64 guid);
static uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index);
static float GetFloatValueFromArray(Tokens const& data, uint16 index);
And so far it seem to work
But I'm just a mangos "hobby-user" without big C++ knowledge so you better check twice or wait for Naicisum to come up with a better version.
Regards
Skirnir