mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Fixed wrong db field accessor functions use
This commit is contained in:
@@ -81,7 +81,7 @@ void CharacterCache::LoadCharacterCacheStorage()
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
AddCharacterCacheEntry(ObjectGuid::Create<HighGuid::Player>(fields[0].GetUInt32()) /*guid*/, fields[2].GetUInt32() /*account*/, fields[1].GetString() /*name*/,
|
||||
AddCharacterCacheEntry(ObjectGuid::Create<HighGuid::Player>(fields[0].GetUInt64()) /*guid*/, fields[2].GetUInt32() /*account*/, fields[1].GetString() /*name*/,
|
||||
fields[4].GetUInt8() /*gender*/, fields[3].GetUInt8() /*race*/, fields[5].GetUInt8() /*class*/, fields[6].GetUInt8() /*level*/, fields[7].GetUInt32() != 0);
|
||||
} while (result->NextRow());
|
||||
|
||||
|
||||
@@ -780,8 +780,8 @@ void Item::SaveToDB(CharacterDatabaseTransaction& trans)
|
||||
|
||||
bool Item::LoadFromDB(ObjectGuid::LowType guid, ObjectGuid ownerGuid, Field* fields, uint32 entry)
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
// SELECT guid, itemEntry, creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text,
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
// SELECT guid, itemEntry, creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomBonusListId, durability, playedTime, text,
|
||||
// 13 14 15 16 17 18
|
||||
// battlePetSpeciesId, battlePetBreedData, battlePetLevel, battlePetDisplayId, context, bonusListIDs,
|
||||
// 19 20 21 22 23
|
||||
@@ -913,7 +913,7 @@ bool Item::LoadFromDB(ObjectGuid::LowType guid, ObjectGuid ownerGuid, Field* fie
|
||||
SetUpdateFieldValue(enchantmentField.ModifyValue(&UF::ItemEnchantment::Charges), atoi(enchantmentTokens[i * MAX_ENCHANTMENT_OFFSET + 2]));
|
||||
}
|
||||
}
|
||||
m_randomBonusListId = fields[10].GetUInt32();
|
||||
m_randomBonusListId = fields[9].GetUInt32();
|
||||
|
||||
// Remove bind flag for items vs BIND_NONE set
|
||||
if (IsSoulBound() && GetBonding() == BIND_NONE)
|
||||
|
||||
Reference in New Issue
Block a user