From 78786c7b541a13fc73dfbaefc06b9d5bc05c7450 Mon Sep 17 00:00:00 2001 From: Nay Date: Tue, 27 Aug 2013 21:30:33 +0100 Subject: Core&Scripts: Fix clang compiler warnings --- src/server/game/Entities/Unit/Unit.cpp | 4 +--- src/server/game/Entities/Unit/Unit.h | 13 ++++--------- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'src/server/game/Entities/Unit') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 39d9d4991fc..ef684fc2526 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3045,8 +3045,6 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell) void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool withInstant) { - ASSERT(spellType < CURRENT_MAX_SPELL); - //TC_LOG_DEBUG(LOG_FILTER_UNITS, "Interrupt spell for unit %u.", GetEntry()); Spell* spell = m_currentSpells[spellType]; if (spell @@ -13991,7 +13989,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u Unit* actionTarget = !isVictim ? target : this; DamageInfo damageInfo = DamageInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL, SPELL_DIRECT_DAMAGE); - HealInfo healInfo = HealInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL); + HealInfo healInfo = HealInfo(damage); ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, &healInfo); ProcTriggeredList procTriggered; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index c90357a9eb8..119a1dd1966 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -470,11 +470,10 @@ enum BaseModGroup enum BaseModType { FLAT_MOD, - PCT_MOD + PCT_MOD, + MOD_END }; -#define MOD_END (PCT_MOD+1) - enum DeathState { ALIVE = 0, @@ -871,15 +870,11 @@ public: class HealInfo { private: - Unit* const m_healer; - Unit* const m_target; uint32 m_heal; uint32 m_absorb; - SpellInfo const* const m_spellInfo; - SpellSchoolMask const m_schoolMask; public: - explicit HealInfo(Unit* _healer, Unit* _target, uint32 _heal, SpellInfo const* _spellInfo, SpellSchoolMask _schoolMask) - : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask) + explicit HealInfo(uint32 heal) + : m_heal(heal) { m_absorb = 0; } -- cgit v1.2.3