Core/Items: Fix signed/unsigned mismatch warnings

This commit is contained in:
Nayd
2014-12-25 19:44:36 +00:00
parent db2816cfba
commit 4b7c1d5e45
2 changed files with 14 additions and 14 deletions

View File

@@ -272,10 +272,10 @@ bool AuctionBotSeller::Initialize()
if (prototype->GetBaseItemLevel() > value)
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ITEM_MIN_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() < value)
if (prototype->GetBaseRequiredLevel() < static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ITEM_MAX_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() > value)
if (prototype->GetBaseRequiredLevel() > static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ITEM_MIN_SKILL_RANK))
if (prototype->GetRequiredSkillRank() < value)
@@ -290,10 +290,10 @@ bool AuctionBotSeller::Initialize()
case ITEM_CLASS_PROJECTILE:
{
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ITEM_MIN_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() < value)
if (prototype->GetBaseRequiredLevel() < static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ITEM_MAX_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() > value)
if (prototype->GetBaseRequiredLevel() > static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ITEM_MIN_SKILL_RANK))
if (prototype->GetRequiredSkillRank() < value)
@@ -307,10 +307,10 @@ bool AuctionBotSeller::Initialize()
if (prototype->GetSubClass() == ITEM_SUBCLASS_JUNK_MOUNT)
{
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() < value)
if (prototype->GetBaseRequiredLevel() < static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() > value)
if (prototype->GetBaseRequiredLevel() > static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_SKILL_RANK))
if (prototype->GetRequiredSkillRank() < value)
@@ -334,16 +334,16 @@ bool AuctionBotSeller::Initialize()
case ITEM_CLASS_GLYPH:
{
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_GLYPH_MIN_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() < value)
if (prototype->GetBaseRequiredLevel() < static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_GLYPH_MAX_REQ_LEVEL))
if (prototype->GetBaseRequiredLevel() > value)
if (prototype->GetBaseRequiredLevel() > static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_GLYPH_MIN_ITEM_LEVEL))
if (prototype->GetBaseRequiredLevel() < value)
if (prototype->GetBaseRequiredLevel() < static_cast<int32>(value))
continue;
if (uint32 value = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_CLASS_GLYPH_MAX_ITEM_LEVEL))
if (prototype->GetBaseRequiredLevel() > value)
if (prototype->GetBaseRequiredLevel() > static_cast<int32>(value))
continue;
break;
}

View File

@@ -1838,8 +1838,8 @@ void BonusData::AddBonus(uint32 type, int32 const (&values)[2])
break;
}
case ITEM_BONUS_QUALITY:
if (Quality < values[0])
Quality = values[0];
if (Quality < static_cast<uint32>(values[0]))
Quality = static_cast<uint32>(values[0]);
break;
case ITEM_BONUS_SOCKET:
{
@@ -1855,8 +1855,8 @@ void BonusData::AddBonus(uint32 type, int32 const (&values)[2])
break;
}
case ITEM_BONUS_APPEARANCE:
if (AppearanceModID < values[0])
AppearanceModID = values[0];
if (AppearanceModID < static_cast<uint32>(values[0]))
AppearanceModID = static_cast<uint32>(values[0]);
break;
case ITEM_BONUS_REQUIRED_LEVEL:
RequiredLevel += values[0];