aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-01-22 23:55:33 -0300
committerariel- <ariel-@users.noreply.github.com>2018-01-22 23:55:33 -0300
commitc099174ff777d1bf5061f5cdc197ff17bd83fbb7 (patch)
treec48689319a23398682db06558e3633759d79614f /src/server/game/Spells
parent7c9722a4ae08b5f283f6a085a411e37604a7da9f (diff)
Core/Misc: fix some /W4 warnings and some reported by GCC 6.3
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Spell.cpp8
-rw-r--r--src/server/game/Spells/SpellDefines.h6
-rw-r--r--src/server/game/Spells/SpellMgr.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 2173d681f51..8e295028d34 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3151,11 +3151,11 @@ void Spell::_cast(bool skipCheck)
// Let any pets know we've attacked something. Check DmgClass for harmful spells only
// This prevents spells such as Hunter's Mark from triggering pet attack
if (GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE)
- if (Unit* unitTarget = m_targets.GetUnitTarget())
+ if (Unit* target = m_targets.GetUnitTarget())
for (Unit* controlled : playerCaster->m_Controlled)
if (Creature* cControlled = controlled->ToCreature())
if (cControlled->IsAIEnabled)
- cControlled->AI()->OwnerAttacked(unitTarget);
+ cControlled->AI()->OwnerAttacked(target);
}
SetExecutedCurrently(true);
@@ -3228,7 +3228,7 @@ void Spell::_cast(bool skipCheck)
if (aura_effmask)
{
bool const triggered = m_triggeredByAuraSpell != nullptr;
- if (DiminishingGroup diminishGroup = m_spellInfo->GetDiminishingReturnsGroupForSpell(triggered))
+ if (m_spellInfo->GetDiminishingReturnsGroupForSpell(triggered))
{
DiminishingReturnsType type = m_spellInfo->GetDiminishingReturnsGroupType(triggered);
if (type == DRTYPE_ALL || (type == DRTYPE_PLAYER && target->IsAffectedByDiminishingReturns()))
@@ -5576,7 +5576,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
if (!m_targets.GetUnitTarget() || m_targets.GetUnitTarget() == m_caster)
return SPELL_FAILED_BAD_TARGETS;
- uint32 dispelMask = SpellInfo::GetDispelMask(DispelType(m_spellInfo->Effects[i].MiscValue));
+ dispelMask = SpellInfo::GetDispelMask(DispelType(m_spellInfo->Effects[i].MiscValue));
bool hasStealableAura = false;
Unit::VisibleAuraMap const* visibleAuras = m_targets.GetUnitTarget()->GetVisibleAuras();
for (Unit::VisibleAuraMap::const_iterator itr = visibleAuras->begin(); itr != visibleAuras->end(); ++itr)
diff --git a/src/server/game/Spells/SpellDefines.h b/src/server/game/Spells/SpellDefines.h
index 2a38f1627e7..6261fc0594b 100644
--- a/src/server/game/Spells/SpellDefines.h
+++ b/src/server/game/Spells/SpellDefines.h
@@ -24,7 +24,7 @@
class Item;
class AuraEffect;
-enum SpellInterruptFlags
+enum SpellInterruptFlags : uint32
{
SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant?
SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back
@@ -35,13 +35,13 @@ enum SpellInterruptFlags
};
// See SpellAuraInterruptFlags for other values definitions
-enum SpellChannelInterruptFlags
+enum SpellChannelInterruptFlags : uint32
{
CHANNEL_INTERRUPT_FLAG_INTERRUPT = 0x0008, // interrupt
CHANNEL_FLAG_DELAY = 0x4000
};
-enum SpellAuraInterruptFlags
+enum SpellAuraInterruptFlags : uint32
{
AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell?
AURA_INTERRUPT_FLAG_TAKE_DAMAGE = 0x00000002, // 1 removed by any damage
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 54d0ded9049..88af62ac0cb 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1446,7 +1446,7 @@ void SpellMgr::LoadSpellGroupStackRules()
if (!spellInfo->Effects[i].IsAura())
continue;
- int32 auraName = static_cast<int32>(spellInfo->Effects[i].ApplyAuraName);
+ uint32 auraName = spellInfo->Effects[i].ApplyAuraName;
for (std::vector<uint32> const& subGroup : SubGroups)
{
if (std::find(subGroup.begin(), subGroup.end(), auraName) != subGroup.end())