mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core: Fix multiple warnings
Travis should be building again now
This commit is contained in:
@@ -345,6 +345,8 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags
|
||||
return (disabledModes & RAID_STATUSFLAG_10MAN_HEROIC) != 0;
|
||||
case DIFFICULTY_25_HC:
|
||||
return (disabledModes & RAID_STATUSFLAG_25MAN_HEROIC) != 0;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (mapEntry->InstanceType == MAP_COMMON)
|
||||
|
||||
@@ -1410,7 +1410,7 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const
|
||||
// This set of checks is should be done only for creatures
|
||||
if ((HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC) && who->GetTypeId() != TYPEID_PLAYER) // flag is valid only for non player characters
|
||||
|| (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) && who->GetTypeId() == TYPEID_PLAYER) // immune to PC and target is a player, return false
|
||||
|| (who->GetOwner() && who->GetOwner()->GetTypeId() == TYPEID_PLAYER) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) // player pets are immune to pc as well
|
||||
|| (who->GetOwner() && who->GetOwner()->GetTypeId() == TYPEID_PLAYER && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))) // player pets are immune to pc as well
|
||||
return false;
|
||||
|
||||
// Do not attack non-combat pets
|
||||
|
||||
@@ -161,7 +161,7 @@ std::list<GarrAbilityEntry const*> GarrisonMgr::RollFollowerAbilities(GarrFollow
|
||||
|
||||
bool hasForcedExclusiveTrait = false;
|
||||
std::list<GarrAbilityEntry const*> result;
|
||||
int32 slots[2] = { AbilitiesForQuality[quality][0], AbilitiesForQuality[quality][1] };
|
||||
uint32 slots[2] = { AbilitiesForQuality[quality][0], AbilitiesForQuality[quality][1] };
|
||||
|
||||
GarrAbilities const* abilities = nullptr;
|
||||
auto itr = _garrisonFollowerAbilities[faction].find(follower->ID);
|
||||
@@ -270,7 +270,7 @@ std::list<GarrAbilityEntry const*> GarrisonMgr::RollFollowerAbilities(GarrFollow
|
||||
if ((*itr)->Flags & GARRISON_ABILITY_FLAG_EXCLUSIVE)
|
||||
break;
|
||||
|
||||
while (traitList.size() < std::max<int32>(0, slots[1] - forcedTraits.size()) && total)
|
||||
while (traitList.size() < size_t(std::max<int32>(0, slots[1] - forcedTraits.size())) && total)
|
||||
{
|
||||
auto itr = genericTraits.begin();
|
||||
std::advance(itr, urand(0, total-- - 1));
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "ConditionMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <map>
|
||||
#include <limits>
|
||||
#include <functional>
|
||||
@@ -67,8 +68,8 @@ struct TempSummonGroupKey
|
||||
|
||||
bool operator<(TempSummonGroupKey const& rhs) const
|
||||
{
|
||||
// memcmp is only reliable if struct doesn't have any padding (packed)
|
||||
return memcmp(this, &rhs, sizeof(TempSummonGroupKey)) < 0;
|
||||
return std::tie(_summonerEntry, _summonerType, _summonGroup) <
|
||||
std::tie(rhs._summonerEntry, rhs._summonerType, rhs._summonGroup);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -243,9 +243,7 @@ uint32 Quest::XPValue(uint32 playerLevel) const
|
||||
|
||||
uint32 Quest::MoneyValue(uint8 playerLevel) const
|
||||
{
|
||||
uint8 level;
|
||||
if (playerLevel)
|
||||
level = Level == -1 ? playerLevel : Level;
|
||||
uint8 level = Level == -1 ? playerLevel : Level;
|
||||
|
||||
if (QuestMoneyRewardEntry const* money = sQuestMoneyRewardStore.LookupEntry(level))
|
||||
return money->Money[GetRewMoneyDifficulty()] * GetMoneyMultiplier();
|
||||
|
||||
Reference in New Issue
Block a user