Core/Spells: fixed The Quick and the Dead guild perk

This commit is contained in:
Ovahlord
2020-04-23 17:04:32 +02:00
parent 5905ed2606
commit bc68ecdbcc
4 changed files with 60 additions and 1 deletions

View File

@@ -287,6 +287,11 @@ void Spell::EffectResurrectNew(SpellEffIndex effIndex)
uint32 health = damage;
uint32 mana = m_spellInfo->Effects[effIndex].MiscValue;
// SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER bonus
if (m_caster->IsPlayer() && m_caster->ToPlayer()->GetGuildId() == player->GetGuildId() && !m_caster->IsInCombat())
AddPct(health, m_caster->GetTotalAuraModifier(SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER));
ExecuteLogEffectResurrect(effIndex, player);
player->SetResurrectRequestData(m_caster, health, mana, 0);
SendResurrectRequest(player);
@@ -4068,6 +4073,10 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
uint32 health = player->CountPctFromMaxHealth(damage);
uint32 mana = CalculatePct(player->GetMaxPower(POWER_MANA), damage);
// SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER bonus
if (m_caster->IsPlayer() && m_caster->ToPlayer()->GetGuildId() == player->GetGuildId() && !m_caster->IsInCombat())
AddPct(health, m_caster->GetTotalAuraModifier(SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER));
ExecuteLogEffectResurrect(effIndex, player);
player->SetResurrectRequestData(m_caster, health, mana, 0);
@@ -5547,6 +5556,10 @@ void Spell::EffectResurrectWithAura(SpellEffIndex effIndex)
if (resurrectAura && player->HasAura(resurrectAura))
return;
// SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER bonus
if (m_caster->IsPlayer() && m_caster->ToPlayer()->GetGuildId() == player->GetGuildId() && !m_caster->IsInCombat())
AddPct(health, m_caster->GetTotalAuraModifier(SPELL_AURA_MOD_RESURRECTED_HEALTH_BY_GUILD_MEMBER));
ExecuteLogEffectResurrect(effIndex, player);
player->SetResurrectRequestData(m_caster, health, mana, resurrectAura);
SendResurrectRequest(player);