mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Warning fixes
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include "Errors.h"
|
||||
|
||||
DB2Meta::DB2Meta(int32 indexField, uint32 fieldCount, uint32 layoutHash, char const* types, uint8 const* arraySizes, int32 parentIndexField)
|
||||
: IndexField(indexField), FieldCount(fieldCount), LayoutHash(layoutHash), Types(types), ArraySizes(arraySizes), ParentIndexField(parentIndexField)
|
||||
: IndexField(indexField), ParentIndexField(parentIndexField), FieldCount(fieldCount), LayoutHash(layoutHash), Types(types), ArraySizes(arraySizes)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2533,7 +2533,7 @@ bool ConditionMgr::IsPlayerMeetingCondition(Player const* player, PlayerConditio
|
||||
{
|
||||
if (LanguageDesc const* lang = GetLanguageDescByID(condition->LanguageID))
|
||||
{
|
||||
uint32 languageSkill = player->GetSkillValue(lang->skill_id);
|
||||
int32 languageSkill = player->GetSkillValue(lang->skill_id);
|
||||
if (!languageSkill && player->HasAuraTypeWithMiscvalue(SPELL_AURA_COMPREHEND_LANGUAGE, condition->LanguageID))
|
||||
languageSkill = 300;
|
||||
|
||||
@@ -2839,10 +2839,10 @@ bool ConditionMgr::IsPlayerMeetingCondition(Player const* player, PlayerConditio
|
||||
}
|
||||
}
|
||||
|
||||
if (condition->MinAvgItemLevel && uint32(std::floor(player->GetFloatValue(PLAYER_FIELD_AVG_ITEM_LEVEL))) < condition->MinAvgItemLevel)
|
||||
if (condition->MinAvgItemLevel && int32(std::floor(player->GetFloatValue(PLAYER_FIELD_AVG_ITEM_LEVEL))) < condition->MinAvgItemLevel)
|
||||
return false;
|
||||
|
||||
if (condition->MaxAvgItemLevel && uint32(std::floor(player->GetFloatValue(PLAYER_FIELD_AVG_ITEM_LEVEL))) > condition->MaxAvgItemLevel)
|
||||
if (condition->MaxAvgItemLevel && int32(std::floor(player->GetFloatValue(PLAYER_FIELD_AVG_ITEM_LEVEL))) > condition->MaxAvgItemLevel)
|
||||
return false;
|
||||
|
||||
if (condition->MinAvgEquippedItemLevel && uint32(std::floor(player->GetFloatValue(PLAYER_FIELD_AVG_ITEM_LEVEL + 1))) < condition->MinAvgEquippedItemLevel)
|
||||
|
||||
@@ -1343,7 +1343,6 @@ void Group::CountTheRoll(Rolls::iterator rollI)
|
||||
item->is_looted = true;
|
||||
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
|
||||
roll->getLoot()->unlootedCount--;
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(roll->itemid);
|
||||
player->UpdateCriteria(CRITERIA_TYPE_CAST_SPELL, 13262); // Disenchant
|
||||
|
||||
ItemDisenchantLootEntry const* disenchant = ASSERT_NOTNULL(roll->GetItemDisenchantLoot(player));
|
||||
@@ -1906,6 +1905,8 @@ ItemDisenchantLootEntry const* Roll::GetItemDisenchantLoot(Player const* player)
|
||||
uint32 itemLevel = Item::GetItemLevel(itemTemplate, bonusData, player->getLevel(), 0, lootItemInSlot->upgradeId);
|
||||
return Item::GetDisenchantLoot(itemTemplate, bonusData.Quality, itemLevel);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Group::SetDungeonDifficultyID(Difficulty difficulty)
|
||||
|
||||
@@ -86,7 +86,7 @@ void WorldSession::HandleWhoOpcode(WorldPackets::Who::WhoRequestPkt& whoRequest)
|
||||
{
|
||||
WorldPackets::Who::WhoRequest& request = whoRequest.Request;
|
||||
|
||||
TC_LOG_DEBUG("network", "WorldSession::HandleWhoOpcode: MinLevel: %u, MaxLevel: %u, Name: %s (VirtualRealmName: %s), Guild: %s (GuildVirtualRealmName: %s), RaceFilter: %d, ClassFilter: %d, Areas: " SZFMTD ", Words: " SZFMTD ".",
|
||||
TC_LOG_DEBUG("network", "WorldSession::HandleWhoOpcode: MinLevel: %u, MaxLevel: %u, Name: %s (VirtualRealmName: %s), Guild: %s (GuildVirtualRealmName: %s), RaceFilter: " UI64FMTD ", ClassFilter: %d, Areas: " SZFMTD ", Words: " SZFMTD ".",
|
||||
request.MinLevel, request.MaxLevel, request.Name.c_str(), request.VirtualRealmName.c_str(), request.Guild.c_str(), request.GuildVirtualRealmName.c_str(),
|
||||
request.RaceFilter, request.ClassFilter, whoRequest.Areas.size(), request.Words.size());
|
||||
|
||||
@@ -172,7 +172,7 @@ void WorldSession::HandleWhoOpcode(WorldPackets::Who::WhoRequestPkt& whoRequest)
|
||||
continue;
|
||||
|
||||
// check if race matches racemask
|
||||
if (request.RaceFilter >= 0 && !(request.RaceFilter & (UI64LIT(1) << target->getRace())))
|
||||
if (request.RaceFilter >= 0 && !(request.RaceFilter & (SI64LIT(1) << target->getRace())))
|
||||
continue;
|
||||
|
||||
if (!whoRequest.Areas.empty())
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace WorldPackets
|
||||
std::string VirtualRealmName;
|
||||
std::string Guild;
|
||||
std::string GuildVirtualRealmName;
|
||||
uint64 RaceFilter = UI64LIT(0);
|
||||
int64 RaceFilter = SI64LIT(0);
|
||||
int32 ClassFilter = -1;
|
||||
std::vector<WhoWord> Words;
|
||||
bool ShowEnemies = false;
|
||||
|
||||
Reference in New Issue
Block a user