Core/DBLayer: More type fixes
Thanks to Vasago for the help in spotting the errors Thanks to Subv as well (so he doesn't feel lonely)
This commit is contained in:
@@ -145,7 +145,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
|
||||
|
||||
uint32 matchMakerRating;
|
||||
if (result)
|
||||
matchMakerRating = (*result)[0].GetUInt32();
|
||||
matchMakerRating = (*result)[0].GetUInt16();
|
||||
else
|
||||
matchMakerRating = sWorld->getIntConfig(CONFIG_ARENA_START_MATCHMAKER_RATING);
|
||||
|
||||
|
||||
@@ -343,8 +343,8 @@ void Item::SaveToDB(SQLTransaction& trans)
|
||||
}
|
||||
stmt->setString(++index, ssEnchants.str());
|
||||
|
||||
stmt->setInt32 (++index, GetItemRandomPropertyId());
|
||||
stmt->setUInt32(++index, GetUInt32Value(ITEM_FIELD_DURABILITY));
|
||||
stmt->setInt16 (++index, GetItemRandomPropertyId());
|
||||
stmt->setUInt16(++index, GetUInt32Value(ITEM_FIELD_DURABILITY));
|
||||
stmt->setUInt32(++index, GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME));
|
||||
stmt->setString(++index, m_text);
|
||||
stmt->setUInt32(++index, guid);
|
||||
@@ -486,7 +486,7 @@ void Item::DeleteFromDB(SQLTransaction& trans)
|
||||
/*static*/
|
||||
void Item::DeleteFromInventoryDB(SQLTransaction& trans, uint32 itemGuid)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVENTORY_ITEM);
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INVENTORY_BY_ITEM);
|
||||
stmt->setUInt32(0, itemGuid);
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
@@ -18984,7 +18984,7 @@ void Player::_SaveActions(SQLTransaction& trans)
|
||||
|
||||
void Player::_SaveAuras(SQLTransaction& trans)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_AURA);
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_AURA);
|
||||
stmt->setUInt32(0, GetGUIDLow());
|
||||
trans->Append(stmt);
|
||||
|
||||
@@ -19147,7 +19147,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
|
||||
trans->Append(stmt);
|
||||
break;
|
||||
case ITEM_REMOVED:
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVENTORY_ITEM);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INVENTORY_BY_ITEM);
|
||||
stmt->setUInt32(0, item->GetGUIDLow());
|
||||
trans->Append(stmt);
|
||||
case ITEM_UNCHANGED:
|
||||
|
||||
@@ -7203,7 +7203,7 @@ void ObjectMgr::SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CREATURE_RESPAWN);
|
||||
stmt->setUInt32(0, loguid);
|
||||
stmt->setUInt64(1, uint64(t));
|
||||
stmt->setUInt32(1, uint32(t));
|
||||
stmt->setUInt32(2, instance);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
@@ -7217,7 +7217,7 @@ void ObjectMgr::RemoveCreatureRespawnTime(uint32 loguid, uint32 instance)
|
||||
_creatureRespawnTimesMutex.release();
|
||||
}
|
||||
|
||||
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN);
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN);
|
||||
stmt->setUInt32(0, loguid);
|
||||
stmt->setUInt32(1, instance);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
@@ -461,7 +461,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
createInfo->CharCount = fields[0].GetUInt8();
|
||||
createInfo->CharCount = fields[0].GetUInt64();
|
||||
|
||||
if (createInfo->CharCount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_REALM))
|
||||
{
|
||||
|
||||
@@ -300,9 +300,9 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recv_data)
|
||||
for (uint8 i = 1; i <= signs; ++i)
|
||||
{
|
||||
Field* fields2 = result->Fetch();
|
||||
uint64 plguid = fields2[0].GetUInt64();
|
||||
uint32 lowGuid = fields2[0].GetUInt32();
|
||||
|
||||
data << uint64(plguid); // Player GUID
|
||||
data << uint64(MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER)); // Player GUID
|
||||
data << uint32(0); // there 0 ...
|
||||
|
||||
result->NextRow();
|
||||
@@ -485,7 +485,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
|
||||
fields = result->Fetch();
|
||||
uint64 ownerGuid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
uint8 signs = fields[1].GetUInt8();
|
||||
uint64 signs = fields[1].GetUInt64();
|
||||
uint8 type = fields[2].GetUInt8();
|
||||
|
||||
uint32 playerGuid = _player->GetGUIDLow();
|
||||
|
||||
Reference in New Issue
Block a user