SQL: Characters db storage type cleanup No. 6

This commit is contained in:
leak
2011-01-20 01:02:24 +01:00
parent a486eb0c2f
commit c59ea4726e
15 changed files with 153 additions and 77 deletions
+2 -2
View File
@@ -420,12 +420,12 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entr
std::string enchants = fields[6].GetString();
_LoadIntoDataField(enchants.c_str(), ITEM_FIELD_ENCHANTMENT_1_1, MAX_ENCHANTMENT_SLOT * MAX_ENCHANTMENT_OFFSET);
SetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID, fields[7].GetInt32());
SetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID, fields[7].GetInt16());
// recalculate suffix factor
if (GetItemRandomPropertyId() < 0)
UpdateItemSuffixFactor();
uint32 durability = fields[8].GetUInt32();
uint32 durability = fields[8].GetUInt16();
SetUInt32Value(ITEM_FIELD_DURABILITY, durability);
// update max durability (and durability) if need
SetUInt32Value(ITEM_FIELD_MAXDURABILITY, proto->MaxDurability);
+1 -1
View File
@@ -17063,7 +17063,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
Field* fields2 = result2->Fetch();
item->SetRefundRecipient(fields2[0].GetUInt32());
item->SetPaidMoney(fields2[1].GetUInt32());
item->SetPaidExtendedCost(fields2[2].GetUInt32());
item->SetPaidExtendedCost(fields2[2].GetUInt16());
AddRefundReference(item->GetGUIDLow());
}
}