mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core: Fix warnings with other way
This commit is contained in:
@@ -682,11 +682,10 @@ void BattlefieldWG::PromotePlayer(Player* killer)
|
||||
{
|
||||
if (!m_isActive)
|
||||
return;
|
||||
Aura* aur = NULL;
|
||||
// Updating rank of player
|
||||
if (aur = killer->GetAura(SPELL_RECRUIT))
|
||||
if (Aura* auraRecruit = killer->GetAura(SPELL_RECRUIT))
|
||||
{
|
||||
if (aur->GetStackAmount() >= 5)
|
||||
if (auraRecruit->GetStackAmount() >= 5)
|
||||
{
|
||||
killer->RemoveAura(SPELL_RECRUIT);
|
||||
killer->CastSpell(killer, SPELL_CORPORAL, true);
|
||||
@@ -695,9 +694,9 @@ void BattlefieldWG::PromotePlayer(Player* killer)
|
||||
else
|
||||
killer->CastSpell(killer, SPELL_RECRUIT, true);
|
||||
}
|
||||
else if (aur = killer->GetAura(SPELL_CORPORAL))
|
||||
else if (Aura* auraCorporal = killer->GetAura(SPELL_CORPORAL))
|
||||
{
|
||||
if (aur->GetStackAmount() >= 5)
|
||||
if (auraCorporal->GetStackAmount() >= 5)
|
||||
{
|
||||
killer->RemoveAura(SPELL_CORPORAL);
|
||||
killer->CastSpell(killer, SPELL_LIEUTENANT, true);
|
||||
|
||||
@@ -400,7 +400,6 @@ bool Group::AddMember(Player* player)
|
||||
stmt->setUInt8(4, member.roles);
|
||||
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
}
|
||||
|
||||
SendUpdate();
|
||||
|
||||
@@ -574,16 +574,15 @@ class spell_dru_rip : public SpellScriptLoader
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
AuraEffect const* idol = NULL;
|
||||
// 0.01 * $AP * cp
|
||||
uint8 cp = caster->ToPlayer()->GetComboPoints();
|
||||
|
||||
// Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
|
||||
if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
|
||||
amount += cp * idol->GetAmount();
|
||||
if (AuraEffect const* auraEffIdolOfFeralShadows = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
|
||||
amount += cp * auraEffIdolOfFeralShadows->GetAmount();
|
||||
// Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
|
||||
else if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
|
||||
amount += cp * idol->GetAmount();
|
||||
else if (AuraEffect const* auraEffIdolOfWorship = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
|
||||
amount += cp * auraEffIdolOfWorship->GetAmount();
|
||||
|
||||
amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
|
||||
}
|
||||
|
||||
@@ -1201,7 +1201,6 @@ class spell_pal_sacred_shield : public SpellScriptLoader
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
AuraEffect const* dampening = NULL;
|
||||
// +75.00% from sp bonus
|
||||
float bonus = CalculatePct(caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()), 75.0f);
|
||||
|
||||
@@ -1212,11 +1211,11 @@ class spell_pal_sacred_shield : public SpellScriptLoader
|
||||
amount += int32(bonus);
|
||||
|
||||
// Arena - Dampening
|
||||
if (dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
|
||||
AddPct(amount, dampening->GetAmount());
|
||||
if (AuraEffect const* auraEffArenaDampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
|
||||
AddPct(amount, auraEffArenaDampening->GetAmount());
|
||||
// Battleground - Dampening
|
||||
else if (dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
|
||||
AddPct(amount, dampening->GetAmount());
|
||||
else if (AuraEffect const* auraEffBattlegroudDampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
|
||||
AddPct(amount, auraEffBattlegroudDampening->GetAmount());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user