From 2f20a832dc1481117e1db9f7d8c5d82886493f18 Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 5 Mar 2009 20:47:18 +0100 Subject: *Fix reward rep amount- by yad02 *Fix Haunt and Pain and Suffering- by Fog *Fix leader of the pack-original patch by Lightguard --HG-- branch : trunk --- src/game/Player.cpp | 4 ++-- src/game/SpellAuras.cpp | 8 +++++++- src/game/SpellEffects.cpp | 7 +++++++ src/game/Unit.cpp | 22 ++++++++++++++-------- 4 files changed, 30 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 36230e82950..7bda4f64ed9 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6073,8 +6073,8 @@ bool Player::SetOneFactionReputation(FactionEntry const* factionEntry, int32 sta //Calculate total reputation percent player gain with quest/creature level int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, bool for_quest) { - // for grey creature kill received 20%, in other case 100. - int32 percent = (!for_quest && (creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))) ? 20 : 100; + // always 100% (3.0.8) + int32 percent = 100; int32 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 7177c137dd2..a50b1e50498 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1969,6 +1969,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real) m_target->SetReducedThreatPercent(0, 0); return; } + // Haunt + if(caster && m_spellProto->SpellFamilyName=SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[1] & 0x40000) + { + caster->CastCustomSpell(caster, 48210, &m_currentBasePoints, 0, 0, true); + return; + } } // AT APPLY & REMOVE @@ -2064,7 +2070,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) mod->value = m_modifier.m_amount; mod->type = SPELLMOD_PCT; mod->spellId = GetId(); - mod->mask[1] = 0x00000002; + mod->mask[1] = 0x00002000; m_spellmod = mod; } ((Player*)m_target)->AddSpellMod(m_spellmod, apply); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index a2d48e02036..0f52b5b5cff 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -436,6 +436,13 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE)) damage += int32(damage*0.25f); } + // Haunt + else if (m_spellProto->SpellFamilyFlags[1] & 0x40000) + { + // Save damage for future healing + // TODO: Implement spell proc on aura expire + m_currentBasePoints[1] = int32(damage * m_currentBasePoints[1] / 100); + } // Conflagrate - consumes immolate if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 25c3aee65e4..eb1b3b90e61 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5539,6 +5539,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu { switch(dummySpell->Id) { + // Leader of the Pack + case 24932: + { + if (triggerAmount == 0) + return false; + basepoints0 = triggerAmount * GetMaxHealth() / 100; + trigger_spell_id = 34299; + } // Healing Touch (Dreamwalker Raiment set) case 28719: { @@ -5636,6 +5644,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu basepoints0 = triggerAmount * damage / 100; break; } + // Improved leader of the pack + else if (dummySpell->SpellIconID == 312 && !dummySpell->SpellFamilyFlags) + { + triggered_spell_id = 60889; + basepoints0 = triggerAmount * GetMaxPower(POWER_MANA) / 100; + } break; } case SPELLFAMILY_ROGUE: @@ -6705,14 +6719,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB } //else if (auraSpellInfo->Id==40363)// Entangling Roots () // trigger_spell_id = ????; - // Leader of the Pack - else if (auraSpellInfo->Id == 24932) - { - if (triggerAmount == 0) - return false; - basepoints0 = triggerAmount * GetMaxHealth() / 100; - trigger_spell_id = 34299; - } break; } case SPELLFAMILY_HUNTER: -- cgit v1.2.3