Core: Fix a few compile warnings
This commit is contained in:
@@ -190,7 +190,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
|
||||
}
|
||||
case CONDITION_OBJECT_ENTRY:
|
||||
{
|
||||
if (object->GetTypeId() == ConditionValue1)
|
||||
if (uint32(object->GetTypeId()) == ConditionValue1)
|
||||
condMeets = (!ConditionValue2) || (object->GetEntry() == ConditionValue2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -12019,7 +12019,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
|
||||
Map const* map = lootedObject->GetMap();
|
||||
if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true))
|
||||
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
|
||||
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
|
||||
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
|
||||
lootedObjectInDungeon = true;
|
||||
|
||||
if (!lootedObjectInDungeon)
|
||||
@@ -17658,7 +17658,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
|
||||
}
|
||||
else
|
||||
if (IsBagPos(item->GetPos()))
|
||||
if (Bag* pBag = item->ToBag())
|
||||
if (item->IsBag())
|
||||
invalidBagMap[item->GetGUIDLow()] = item;
|
||||
}
|
||||
else
|
||||
@@ -17811,7 +17811,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
|
||||
GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr->GetActiveEventList();
|
||||
for (GameEventMgr::ActiveEvents::const_iterator itr = activeEventsList.begin(); itr != activeEventsList.end(); ++itr)
|
||||
{
|
||||
if (events[*itr].holiday_id == proto->HolidayId)
|
||||
if (uint32(events[*itr].holiday_id) == proto->HolidayId)
|
||||
{
|
||||
remove = false;
|
||||
break;
|
||||
|
||||
@@ -2470,7 +2470,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
|
||||
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
|
||||
if (LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
|
||||
if (uint32(dungeon->map) == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM)
|
||||
if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM))
|
||||
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1513,7 +1513,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
|
||||
if (group->isLFGGroup())
|
||||
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
|
||||
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
|
||||
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
|
||||
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
|
||||
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
|
||||
return; // in correct dungeon
|
||||
|
||||
|
||||
Reference in New Issue
Block a user