diff --git a/zone/MobAI.cpp b/zone/MobAI.cpp index db62d8953..d13c55ccd 100644 --- a/zone/MobAI.cpp +++ b/zone/MobAI.cpp @@ -2578,7 +2578,7 @@ DBnpcspells_Struct* ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) { mysql_free_result(result); if (RunQuery(query, MakeAnyLenString(&query, "SELECT spellid, type, minlevel, maxlevel, manacost, recast_delay, priority, resist_adjust from npc_spells_entries where npc_spells_id=%d ORDER BY minlevel", iDBSpellsID), errbuf, &result)) { safe_delete_array(query); - uint32 tmpSize = sizeof(DBnpcspells_Struct) + (sizeof(DBnpcspells_entries_Struct) * mysql_num_rows(result)); + uint32 tmpSize = sizeof(DBnpcspells_Struct) + (sizeof(DBnpcspells_entries_Struct) * (uint32)mysql_num_rows(result)); npc_spells_cache[iDBSpellsID] = (DBnpcspells_Struct*) new uchar[tmpSize]; memset(npc_spells_cache[iDBSpellsID], 0, tmpSize); npc_spells_cache[iDBSpellsID]->parent_list = tmpparent_list; @@ -2694,7 +2694,7 @@ DBnpcspellseffects_Struct* ZoneDatabase::GetNPCSpellsEffects(uint32 iDBSpellsEff mysql_free_result(result); if (RunQuery(query, MakeAnyLenString(&query, "SELECT spell_effect_id, minlevel, maxlevel,se_base, se_limit, se_max from npc_spells_effects_entries where npc_spells_effects_id=%d ORDER BY minlevel", iDBSpellsEffectsID), errbuf, &result)) { safe_delete_array(query); - uint32 tmpSize = sizeof(DBnpcspellseffects_Struct) + (sizeof(DBnpcspellseffects_entries_Struct) * mysql_num_rows(result)); + uint32 tmpSize = sizeof(DBnpcspellseffects_Struct) + (sizeof(DBnpcspellseffects_entries_Struct) * (uint32)mysql_num_rows(result)); npc_spellseffects_cache[iDBSpellsEffectsID] = (DBnpcspellseffects_Struct*) new uchar[tmpSize]; memset(npc_spellseffects_cache[iDBSpellsEffectsID], 0, tmpSize); npc_spellseffects_cache[iDBSpellsEffectsID]->parent_list = tmpparent_list; diff --git a/zone/client.cpp b/zone/client.cpp index 048d51d29..6824216c7 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2100,7 +2100,7 @@ bool Client::TakeMoneyFromPP(uint64 copper, bool updateclient) { } else { - m_pp.copper = copperpp; + m_pp.copper = (int32)copperpp; if(updateclient) SendMoneyUpdate(); Save(); @@ -2114,8 +2114,8 @@ bool Client::TakeMoneyFromPP(uint64 copper, bool updateclient) { } else { - m_pp.silver = silver/10; - m_pp.copper += (silver-(m_pp.silver*10)); + m_pp.silver = (int32)(silver/10); + m_pp.copper = (int32)(m_pp.copper + silver-(m_pp.silver*10)); if(updateclient) SendMoneyUpdate(); Save(); @@ -2131,7 +2131,7 @@ bool Client::TakeMoneyFromPP(uint64 copper, bool updateclient) { } else { - m_pp.gold = gold/100; + m_pp.gold = (int32)(gold/100); uint64 silvertest = (gold-(static_cast(m_pp.gold)*100))/10; m_pp.silver =(int32)(m_pp.silver + silvertest); uint64 coppertest = (gold-(static_cast(m_pp.gold)*100+silvertest*10)); @@ -2146,11 +2146,11 @@ bool Client::TakeMoneyFromPP(uint64 copper, bool updateclient) { //Impossible for plat to be negative, already checked above - m_pp.platinum = platinum/1000; + m_pp.platinum = (int32)(platinum/1000); uint64 goldtest = (platinum-(static_cast(m_pp.platinum)*1000))/100; m_pp.gold = (int32)(m_pp.gold +goldtest); uint64 silvertest = (platinum-(static_cast(m_pp.platinum)*1000+goldtest*100))/10; - m_pp.silver += silvertest; + m_pp.silver = (int32)(m_pp.silver+ silvertest); uint64 coppertest = (platinum-(static_cast(m_pp.platinum)*1000+goldtest*100+silvertest*10)); m_pp.copper = (int32)coppertest; if(updateclient) diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index a5f901833..77d880dad 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -1308,7 +1308,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3 } safe_delete_array(query); - uint32 resultRowTotal = mysql_num_rows(result); + uint32 resultRowTotal = (uint32)mysql_num_rows(result); if(resultRowTotal == 0) { //Recipe contents matched more than 1 recipe, but not in this container LogFile->write(EQEMuLog::Error, "Combine error: Incorrect container is being used!");