Core/DBLayer: More types fixes

This commit is contained in:
leak
2012-03-29 17:43:23 +02:00
parent 411699b94d
commit 5e58905aa0
+4 -4
View File
@@ -16645,7 +16645,7 @@ void Player::_LoadEquipmentSets(PreparedQueryResult result)
EquipmentSet eqSet;
eqSet.Guid = fields[0].GetUInt64();
uint32 index = fields[1].GetUInt32();
uint8 index = fields[1].GetUInt8();
eqSet.Name = fields[2].GetString();
eqSet.IconName = fields[3].GetString();
eqSet.state = EQUIPMENT_SET_UNCHANGED;
@@ -16875,7 +16875,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
uint32 transGUID = fields[30].GetUInt32();
Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat());
uint32 mapId = fields[15].GetUInt16();
uint32 instanceId = fields[58].GetUInt8();
uint32 instanceId = fields[58].GetUInt32();
uint32 dungeonDiff = fields[38].GetUInt8() & 0x0F;
if (dungeonDiff >= MAX_DUNGEON_DIFFICULTY)
@@ -17222,7 +17222,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
float bubble0 = 0.031f;
//speed collect rest bonus in offline, in logout, in tavern, city (section/in hour)
float bubble1 = 0.125f;
float bubble = fields[23].GetUInt32() > 0
float bubble = fields[23].GetUInt8() > 0
? bubble1*sWorld->getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY)
: bubble0*sWorld->getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
@@ -17870,7 +17870,7 @@ void Player::_LoadMailInit(PreparedQueryResult resultUnread, PreparedQueryResult
//set a count of unread mails
//QueryResult* resultMails = CharacterDatabase.PQuery("SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" UI64FMTD "'", GUID_LOPART(playerGuid), (uint64)cTime);
if (resultUnread)
unReadMails = (*resultUnread)[0].GetUInt8();
unReadMails = uint8((*resultUnread)[0].GetUInt64());
// store nearest delivery time (it > 0 and if it < current then at next player update SendNewMaill will be called)
//resultMails = CharacterDatabase.PQuery("SELECT MIN(deliver_time) FROM mail WHERE receiver = '%u' AND (checked & 1)=0", GUID_LOPART(playerGuid));