mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Fixed warning
This commit is contained in:
@@ -207,7 +207,7 @@ uint32 DamageInfo::GetHitMask() const
|
||||
}
|
||||
|
||||
HealInfo::HealInfo(Unit* healer, Unit* target, uint32 heal, SpellInfo const* spellInfo, SpellSchoolMask schoolMask)
|
||||
: _healer(healer), _target(target), _heal(heal), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask), _hitMask(0)
|
||||
: _healer(healer), _target(target), _heal(heal), _effectiveHeal(0), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask), _hitMask(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -216,6 +216,8 @@ void HealInfo::AbsorbHeal(uint32 amount)
|
||||
amount = std::min(amount, GetHeal());
|
||||
_absorb += amount;
|
||||
_heal -= amount;
|
||||
amount = std::min(amount, GetEffectiveHeal());
|
||||
_effectiveHeal -= amount;
|
||||
_hitMask |= PROC_HIT_ABSORB;
|
||||
}
|
||||
|
||||
|
||||
@@ -992,6 +992,7 @@ private:
|
||||
Unit* const _healer;
|
||||
Unit* const _target;
|
||||
uint32 _heal;
|
||||
uint32 _effectiveHeal;
|
||||
uint32 _absorb;
|
||||
SpellInfo const* const _spellInfo;
|
||||
SpellSchoolMask const _schoolMask;
|
||||
@@ -1001,10 +1002,12 @@ public:
|
||||
explicit HealInfo(Unit* healer, Unit* target, uint32 heal, SpellInfo const* spellInfo, SpellSchoolMask schoolMask);
|
||||
|
||||
void AbsorbHeal(uint32 amount);
|
||||
void SetEffectiveHeal(uint32 amount) { _effectiveHeal = amount; }
|
||||
|
||||
Unit* GetHealer() const { return _healer; }
|
||||
Unit* GetTarget() const { return _target; }
|
||||
uint32 GetHeal() const { return _heal; }
|
||||
uint32 GetEffectiveHeal() const { return _effectiveHeal; }
|
||||
uint32 GetAbsorb() const { return _absorb; }
|
||||
SpellInfo const* GetSpellInfo() const { return _spellInfo; };
|
||||
SpellSchoolMask GetSchoolMask() const { return _schoolMask; };
|
||||
|
||||
@@ -1210,11 +1210,10 @@ class spell_item_crystal_spire_of_karabor : public SpellScriptLoader
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
//int32 pct = GetSpellInfo()->GetEffect(EFFECT_0)->CalcValue();
|
||||
int32 pct = GetSpellInfo()->GetEffect(EFFECT_0)->CalcValue();
|
||||
if (HealInfo* healInfo = eventInfo.GetHealInfo())
|
||||
if (Unit* healTarget = healInfo->GetTarget())
|
||||
// @todo: fix me
|
||||
//if (healTarget->GetHealth() - healInfo->GetEffectiveHeal() <= healTarget->CountPctFromMaxHealth(pct))
|
||||
if (healTarget->GetHealth() - healInfo->GetEffectiveHeal() <= healTarget->CountPctFromMaxHealth(pct))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -1170,7 +1170,7 @@ class spell_pri_t5_heal_2p_bonus : public SpellScriptLoader
|
||||
{
|
||||
if (HealInfo* healInfo = eventInfo.GetHealInfo())
|
||||
if (Unit* healTarget = healInfo->GetTarget())
|
||||
// @todo: fix me later if (healInfo->GetEffectiveHeal())
|
||||
if (healInfo->GetEffectiveHeal())
|
||||
if (healTarget->GetHealth() >= healTarget->GetMaxHealth())
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user