diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Item/Item.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Guilds/Guild.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Instances/InstanceSaveMgr.cpp | 18 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 969461d0bc3..f1366a43b86 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -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); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 2f1ea4321b8..d945539cc36 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -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()); } } diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index e9fc6c4ec47..c80f6c28bf0 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1894,7 +1894,7 @@ bool Guild::LoadEventLogFromDB(Field* fields) m_eventLog->LoadEvent(new EventLogEntry( m_id, // guild id fields[1].GetUInt32(), // guid - fields[6].GetUInt64(), // timestamp + time_t(fields[6].GetUInt32()), // timestamp GuildEventLogTypes(fields[2].GetUInt8()), // event type fields[3].GetUInt32(), // player guid 1 fields[4].GetUInt32(), // player guid 2 diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 5ad50e05084..b6f9981d0df 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -178,7 +178,7 @@ void InstanceSave::SaveToDB() } } - CharacterDatabase.PExecute("INSERT INTO instance VALUES ('%u', '%u', '"UI64FMTD"', '%u', '%s')", m_instanceid, GetMapId(), (uint64)GetResetTimeForDB(), GetDifficulty(), data.c_str()); + CharacterDatabase.PExecute("INSERT INTO instance VALUES ('%u', '%u', '%u', '%u', '%s')", m_instanceid, GetMapId(), (uint32)GetResetTimeForDB(), GetDifficulty(), data.c_str()); } time_t InstanceSave::GetResetTimeForDB() @@ -321,11 +321,11 @@ void InstanceSaveManager::LoadResetTimes() { Field* fields = result->Fetch(); - if (time_t resettime = time_t(fields[3].GetUInt64())) + if (time_t resettime = time_t(fields[3].GetUInt32())) { uint32 id = fields[0].GetUInt32(); - uint32 mapid = fields[1].GetUInt32(); - uint32 difficulty = fields[2].GetUInt32(); + uint32 mapid = fields[1].GetUInt16(); + uint32 difficulty = fields[2].GetUInt8(); instResetTime[id] = ResetTimeMapDiffType(MAKE_PAIR32(mapid, difficulty), resettime); mapDiffResetInstances.insert(ResetTimeMapDiffInstances::value_type(MAKE_PAIR32(mapid, difficulty), id)); } @@ -365,9 +365,9 @@ void InstanceSaveManager::LoadResetTimes() do { Field *fields = result->Fetch(); - uint32 mapid = fields[0].GetUInt32(); + uint32 mapid = fields[0].GetUInt16(); Difficulty difficulty = Difficulty(fields[1].GetUInt32()); - uint64 oldresettime = fields[2].GetUInt64(); + uint64 oldresettime = fields[2].GetUInt32(); MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); if (!mapDiff) @@ -380,7 +380,7 @@ void InstanceSaveManager::LoadResetTimes() // update the reset time if the hour in the configs changes uint64 newresettime = (oldresettime / DAY) * DAY + diff; if (oldresettime != newresettime) - CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", newresettime, mapid, difficulty); + CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '%u' WHERE mapid = '%u' AND difficulty = '%u'", uint32(newresettime), mapid, difficulty); SetResetTimeFor(mapid, difficulty, newresettime); } while (result->NextRow()); @@ -413,7 +413,7 @@ void InstanceSaveManager::LoadResetTimes() { // initialize the reset time t = today + period + diff; - CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','%u','"UI64FMTD"')", mapid, difficulty, (uint64)t); + CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','%u','%u')", mapid, difficulty, (uint32)t); } if (t < now) @@ -605,7 +605,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, 0)); // update it in the DB - CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty); + CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '%u' WHERE mapid = '%d' AND difficulty = '%d'", uint32(next_reset), mapid, difficulty); } // note: this isn't fast but it's meant to be executed very rarely |