mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 11:03:47 +00:00
Fixed gcc warnings
This commit is contained in:
@@ -2183,7 +2183,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
|
||||
//! Since no common attributes were found, (not even in titleRewardFlags field)
|
||||
//! we explicitly check by ID. Maybe in the future we could move the achievement_reward
|
||||
//! condition fields to the condition system.
|
||||
if (uint32 titleId = reward->titleId[achievement->ID == 1793 ? GetPlayer()->getGender() : GetPlayer()->GetTeamId()])
|
||||
if (uint32 titleId = reward->titleId[achievement->ID == 1793 ? GetPlayer()->getGender() : uint8(GetPlayer()->GetTeamId())])
|
||||
if (CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
|
||||
GetPlayer()->SetTitle(titleEntry);
|
||||
|
||||
|
||||
@@ -12077,7 +12077,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
|
||||
// ..taken
|
||||
AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN);
|
||||
for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
|
||||
if ((*i)->GetMiscValue() & (spellProto ? spellProto->SchoolMask : attacker->GetMeleeDamageSchoolMask()))
|
||||
if ((*i)->GetMiscValue() & (spellProto ? spellProto->GetSchoolMask() : attacker->GetMeleeDamageSchoolMask()))
|
||||
TakenFlatBenefit += (*i)->GetAmount();
|
||||
|
||||
if (attType != RANGED_ATTACK)
|
||||
@@ -12088,7 +12088,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
|
||||
// Taken total percent damage auras
|
||||
float TakenTotalMod = 1.0f;
|
||||
|
||||
TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto ? spellProto->SchoolMask : attacker->GetMeleeDamageSchoolMask());
|
||||
TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto ? spellProto->GetSchoolMask() : attacker->GetMeleeDamageSchoolMask());
|
||||
|
||||
// .. taken pct (special attacks)
|
||||
if (spellProto)
|
||||
@@ -12172,7 +12172,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
|
||||
bool addModifier = false;
|
||||
AuraEffectList const& ResIgnoreAuras = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
|
||||
for (AuraEffectList::const_iterator j = ResIgnoreAuras.begin(); j != ResIgnoreAuras.end(); ++j)
|
||||
if ((*j)->GetMiscValue() & (spellProto ? spellProto->SchoolMask : SPELL_SCHOOL_MASK_NORMAL))
|
||||
if ((*j)->GetMiscValue() & (spellProto ? spellProto->GetSchoolMask() : SPELL_SCHOOL_MASK_NORMAL))
|
||||
{
|
||||
ApplyPct(ignoreModifier, (*j)->GetAmount());
|
||||
addModifier = true;
|
||||
|
||||
@@ -2411,7 +2411,9 @@ class Unit : public WorldObject
|
||||
virtual bool HasSpellCooldown(uint32 /*spell_id*/) const { return false; }
|
||||
virtual bool HasSpellItemCooldown(uint32 /*spell_id*/, uint32 /*itemid*/) const { return false; }
|
||||
virtual void AddSpellCooldown(uint32 /*spell_id*/, uint32 /*itemid*/, uint32 /*end_time*/, bool needSendToClient = false, bool forceSendToSpectator = false) {
|
||||
needSendToClient = forceSendToSpectator = false; // workaround for unused parameters
|
||||
// workaround for unused parameters
|
||||
(void)needSendToClient;
|
||||
(void)forceSendToSpectator;
|
||||
}
|
||||
|
||||
bool CanApplyResilience() const { return m_applyResilience; }
|
||||
|
||||
@@ -1009,12 +1009,7 @@ namespace Trinity
|
||||
public:
|
||||
AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range)
|
||||
: i_obj(obj), i_funit(funit), i_range(range)
|
||||
{
|
||||
Unit const* check = i_funit;
|
||||
Unit const* owner = i_funit->GetOwner();
|
||||
if (owner)
|
||||
check = owner;
|
||||
}
|
||||
{}
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (!u->IsAlive() || u->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE) || (u->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) && !u->IsInCombat()))
|
||||
|
||||
@@ -1643,7 +1643,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsSharedDifficultyMap(groupGuy->GetMap()->GetId()) && mode%2 == _player->GetRaidDifficulty()%2 && group->isRaidGroup())
|
||||
if (IsSharedDifficultyMap(groupGuy->GetMap()->GetId()) && (_player->GetRaidDifficulty() >= 0 && uint32(mode%2) == uint32(_player->GetRaidDifficulty()%2)) && group->isRaidGroup())
|
||||
{
|
||||
if (!currMap)
|
||||
currMap = groupGuy->GetMap();
|
||||
|
||||
Reference in New Issue
Block a user