*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
This commit is contained in:
QAston
2009-03-05 20:47:18 +01:00
parent ae55745f2a
commit 2f20a832dc
5 changed files with 33 additions and 11 deletions
+3
View File
@@ -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);
+2 -2
View File
@@ -6073,8 +6073,8 @@ bool Player::SetOneFactionReputation(FactionEntry const* factionEntry, int32 sta
//Calculate total reputation percent player gain with quest/creature level //Calculate total reputation percent player gain with quest/creature level
int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, bool for_quest) int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, bool for_quest)
{ {
// for grey creature kill received 20%, in other case 100. // always 100% (3.0.8)
int32 percent = (!for_quest && (creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))) ? 20 : 100; int32 percent = 100;
int32 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN); int32 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
+7 -1
View File
@@ -1969,6 +1969,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
m_target->SetReducedThreatPercent(0, 0); m_target->SetReducedThreatPercent(0, 0);
return; 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 // AT APPLY & REMOVE
@@ -2064,7 +2070,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount; mod->value = m_modifier.m_amount;
mod->type = SPELLMOD_PCT; mod->type = SPELLMOD_PCT;
mod->spellId = GetId(); mod->spellId = GetId();
mod->mask[1] = 0x00000002; mod->mask[1] = 0x00002000;
m_spellmod = mod; m_spellmod = mod;
} }
((Player*)m_target)->AddSpellMod(m_spellmod, apply); ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
+7
View File
@@ -436,6 +436,13 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE)) if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE))
damage += int32(damage*0.25f); 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 // Conflagrate - consumes immolate
if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE) if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE)
+14 -8
View File
@@ -5539,6 +5539,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{ {
switch(dummySpell->Id) 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) // Healing Touch (Dreamwalker Raiment set)
case 28719: case 28719:
{ {
@@ -5636,6 +5644,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
basepoints0 = triggerAmount * damage / 100; basepoints0 = triggerAmount * damage / 100;
break; break;
} }
// Improved leader of the pack
else if (dummySpell->SpellIconID == 312 && !dummySpell->SpellFamilyFlags)
{
triggered_spell_id = 60889;
basepoints0 = triggerAmount * GetMaxPower(POWER_MANA) / 100;
}
break; break;
} }
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
@@ -6705,14 +6719,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
} }
//else if (auraSpellInfo->Id==40363)// Entangling Roots () //else if (auraSpellInfo->Id==40363)// Entangling Roots ()
// trigger_spell_id = ????; // 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; break;
} }
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER: