aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/1679_world.sql3
-rw-r--r--src/game/Player.cpp4
-rw-r--r--src/game/SpellAuras.cpp8
-rw-r--r--src/game/SpellEffects.cpp7
-rw-r--r--src/game/Unit.cpp22
5 files changed, 33 insertions, 11 deletions
diff --git a/sql/updates/1679_world.sql b/sql/updates/1679_world.sql
new file mode 100644
index 00000000000..ebaab832f63
--- /dev/null
+++ b/sql/updates/1679_world.sql
@@ -0,0 +1,3 @@
+--Imp leader of the pack
+INSERT INTO `spell_proc_event` VALUES (34300, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 6);
+INSERT INTO `spell_proc_event` VALUES (34297, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 6);
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 b95f7cdc793..e19f2fc42ed 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 e52f15250e8..3354eab3af8 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: