lots of my_ulongulong explicit conversions

This commit is contained in:
Arthur Dene Ice 2014-05-09 19:33:02 -07:00
parent 33cec926db
commit bc95a8a7ef
5 changed files with 12 additions and 12 deletions

View File

@ -1025,7 +1025,7 @@ bool Database::LoadVariables_result(MYSQL_RES* result) {
varcache_array[i] = 0; varcache_array[i] = 0;
} }
else { else {
uint32 tmpnewmax = varcache_max + mysql_num_rows(result); uint32 tmpnewmax = (uint32)varcache_max + mysql_num_rows(result);
VarCache_Struct** tmp = new VarCache_Struct*[tmpnewmax]; VarCache_Struct** tmp = new VarCache_Struct*[tmpnewmax];
for (i=0; i<tmpnewmax; i++) for (i=0; i<tmpnewmax; i++)
tmp[i] = 0; tmp[i] = 0;
@ -1588,7 +1588,7 @@ bool Database::CheckUsedName(const char* name)
} }
else { // It was a valid Query, so lets do our counts! else { // It was a valid Query, so lets do our counts!
safe_delete_array(query); safe_delete_array(query);
uint32 tmp = mysql_num_rows(result); uint32 tmp = (uint32)mysql_num_rows(result);
mysql_free_result(result); mysql_free_result(result);
if (tmp > 0) // There is a Name! No change (Return False) if (tmp > 0) // There is a Name! No change (Return False)
return false; return false;

View File

@ -1331,7 +1331,7 @@ uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID)
} }
safe_delete_array(query); safe_delete_array(query);
uint32 Rows = mysql_num_rows(result); uint32 Rows = (uint32)mysql_num_rows(result);
mysql_free_result(result); mysql_free_result(result);
return Rows; return Rows;

View File

@ -4886,7 +4886,7 @@ std::list<SpawnedBotsList> Bot::ListSpawnedBots(uint32 characterID, std::string*
*errorMessage = std::string(ErrBuf); *errorMessage = std::string(ErrBuf);
} }
else { else {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {
@ -4986,7 +4986,7 @@ std::list<BotGroup> Bot::LoadBotGroup(std::string botGroupName, std::string* err
*errorMessage = std::string(ErrBuf); *errorMessage = std::string(ErrBuf);
} }
else { else {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {
@ -5025,7 +5025,7 @@ std::list<BotGroupList> Bot::GetBotGroupListByBotOwnerCharacterId(uint32 botOwne
*errorMessage = std::string(ErrBuf); *errorMessage = std::string(ErrBuf);
} }
else { else {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {
@ -5059,7 +5059,7 @@ bool Bot::DoesBotGroupNameExist(std::string botGroupName) {
MYSQL_ROW DataRow; MYSQL_ROW DataRow;
if(database.RunQuery(Query, MakeAnyLenString(&Query, "select BotGroupId from vwBotGroups where BotGroupName = '%s'", botGroupName.c_str()), 0, &DatasetResult)) { if(database.RunQuery(Query, MakeAnyLenString(&Query, "select BotGroupId from vwBotGroups where BotGroupName = '%s'", botGroupName.c_str()), 0, &DatasetResult)) {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {
@ -5099,7 +5099,7 @@ uint32 Bot::CanLoadBotGroup(uint32 botOwnerCharacterId, std::string botGroupName
*errorMessage = std::string(ErrBuf); *errorMessage = std::string(ErrBuf);
} }
else { else {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {
@ -5139,7 +5139,7 @@ uint32 Bot::GetBotGroupIdByBotGroupName(std::string botGroupName, std::string* e
*errorMessage = std::string(ErrBuf); *errorMessage = std::string(ErrBuf);
} }
else { else {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {
@ -5170,7 +5170,7 @@ uint32 Bot::GetBotGroupLeaderIdByBotGroupName(std::string botGroupName) {
MYSQL_ROW DataRow; MYSQL_ROW DataRow;
if(database.RunQuery(Query, MakeAnyLenString(&Query, "select BotGroupLeaderBotId from vwBotGroups where BotGroupName = '%s'", botGroupName.c_str()), 0, &DatasetResult)) { if(database.RunQuery(Query, MakeAnyLenString(&Query, "select BotGroupLeaderBotId from vwBotGroups where BotGroupName = '%s'", botGroupName.c_str()), 0, &DatasetResult)) {
uint32 RowCount = mysql_num_rows(DatasetResult); uint32 RowCount = (uint32)mysql_num_rows(DatasetResult);
if(RowCount > 0) { if(RowCount > 0) {
for(int iCounter = 0; iCounter < RowCount; iCounter++) { for(int iCounter = 0; iCounter < RowCount; iCounter++) {

View File

@ -11649,7 +11649,7 @@ void Client::Handle_OP_GMSearchCorpse(const EQApplicationPacket *app)
EscSearchString, MaxResults), errbuf, &Result)) EscSearchString, MaxResults), errbuf, &Result))
{ {
int NumberOfRows = mysql_num_rows(Result); int NumberOfRows = (int)mysql_num_rows(Result);
if(NumberOfRows == MaxResults) if(NumberOfRows == MaxResults)
Message(clientMessageError, "Your search found too many results; some are not displayed."); Message(clientMessageError, "Your search found too many results; some are not displayed.");

View File

@ -2018,7 +2018,7 @@ void Client::SendBuyerResults(char* SearchString, uint32 SearchID) {
if (database.RunQuery(Query,MakeAnyLenString(&Query, "select * from buyer where itemname like '%%%s%%' order by charid limit %i", if (database.RunQuery(Query,MakeAnyLenString(&Query, "select * from buyer where itemname like '%%%s%%' order by charid limit %i",
EscSearchString, RuleI(Bazaar, MaxBarterSearchResults)), errbuf, &Result)) { EscSearchString, RuleI(Bazaar, MaxBarterSearchResults)), errbuf, &Result)) {
int NumberOfRows = mysql_num_rows(Result); int NumberOfRows = (int)mysql_num_rows(Result);
if(NumberOfRows == RuleI(Bazaar, MaxBarterSearchResults)) if(NumberOfRows == RuleI(Bazaar, MaxBarterSearchResults))
Message(15, "Your search found too many results; some are not displayed."); Message(15, "Your search found too many results; some are not displayed.");