Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/Spells/SpellInfo.h
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_priest.cpp
	src/server/scripts/Spells/spell_warlock.cpp
This commit is contained in:
Vincent-Michael committed 2013-07-26 02:04:32 +02:00
commit c57fa8f781
7 files changed
+251 -17

No files matched your search

+212 -10
View File
@@ -41,7 +41,13 @@ enum DeathKnightSpells
SPELL_DK_DEATH_COIL_HEAL = 47633,
SPELL_DK_DEATH_STRIKE_HEAL = 45470,
SPELL_DK_DEATH_STRIKE_ENABLER = 89832,
SPELL_DK_FROST_PRESENCE = 48263,
SPELL_DK_FROST_PRESENCE_TRIGGERED = 61261,
SPELL_DK_GHOUL_EXPLODE = 47496,
SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE = 58625,
SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1 = 50365,
SPELL_DK_IMPROVED_FROST_PRESENCE_R1 = 50384,
SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1 = 50391,
SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611,
SPELL_DK_IMPROVED_DEATH_STRIKE = 62905,
SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED = 63622,
@@ -51,8 +57,14 @@ enum DeathKnightSpells
SPELL_DK_RUNE_TAP = 48982,
SPELL_DK_SCENT_OF_BLOOD = 50422,
SPELL_DK_SCOURGE_STRIKE_TRIGGERED = 70890,
SPELL_DK_WILL_OF_THE_NECROPOLIS = 96171,
SPELL_DK_UNHOLY_PRESENCE = 48265
SPELL_DK_UNHOLY_PRESENCE = 48265,
SPELL_DK_UNHOLY_PRESENCE_TRIGGERED = 49772,
SPELL_DK_WILL_OF_THE_NECROPOLIS = 96171
};
enum DeathKnightSpellIcons
{
DK_ICON_ID_IMPROVED_DEATH_STRIKE = 2751
};
// 50462 - Anti-Magic Shell (on raid member)
@@ -750,7 +762,7 @@ class spell_dk_icebound_fortitude : public SpellScriptLoader
}
};
// 50365, 50371 - Improved Blood Presence
// -50365 - Improved Blood Presence
class spell_dk_improved_blood_presence : public SpellScriptLoader
{
public:
@@ -762,7 +774,10 @@ class spell_dk_improved_blood_presence : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE) || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
return false;
return true;
}
@@ -770,10 +785,10 @@ class spell_dk_improved_blood_presence : public SpellScriptLoader
void HandleEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
if (!target->HasAura(SPELL_DK_BLOOD_PRESENCE) && !target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
if ((target->HasAura(SPELL_DK_FROST_PRESENCE) || target->HasAura(SPELL_DK_UNHOLY_PRESENCE)) && !target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
{
int32 basePoints1 = aurEff->GetAmount();
target->CastCustomSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, NULL, &basePoints1, NULL, true, 0, aurEff);
target->CastCustomSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, NULL, &basePoints1, NULL, true, NULL, aurEff);
}
}
@@ -797,7 +812,54 @@ class spell_dk_improved_blood_presence : public SpellScriptLoader
}
};
// 50391, 50392 - Improved Unholy Presence
// -50384 - Improved Frost Presence
class spell_dk_improved_frost_presence : public SpellScriptLoader
{
public:
spell_dk_improved_frost_presence() : SpellScriptLoader("spell_dk_improved_frost_presence") { }
class spell_dk_improved_frost_presence_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dk_improved_frost_presence_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE_TRIGGERED))
return false;
return true;
}
void HandleEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
if ((target->HasAura(SPELL_DK_BLOOD_PRESENCE) || target->HasAura(SPELL_DK_UNHOLY_PRESENCE)) && !target->HasAura(SPELL_DK_FROST_PRESENCE_TRIGGERED))
target->CastCustomSpell(SPELL_DK_FROST_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true, NULL, aurEff);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
if (!target->HasAura(SPELL_DK_FROST_PRESENCE))
target->RemoveAura(SPELL_DK_FROST_PRESENCE_TRIGGERED);
}
void Register() OVERRIDE
{
AfterEffectApply += AuraEffectApplyFn(spell_dk_improved_frost_presence_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_dk_improved_frost_presence_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_dk_improved_frost_presence_AuraScript();
}
};
// -50391 - Improved Unholy Presence
class spell_dk_improved_unholy_presence : public SpellScriptLoader
{
public:
@@ -809,7 +871,11 @@ class spell_dk_improved_unholy_presence : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE) || !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED))
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED))
return false;
return true;
}
@@ -821,13 +887,21 @@ class spell_dk_improved_unholy_presence : public SpellScriptLoader
{
// Not listed as any effect, only base points set in dbc
int32 basePoints0 = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue();
target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints0, &basePoints0, &basePoints0, true, 0, aurEff);
target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints0, &basePoints0, &basePoints0, true, NULL, aurEff);
}
if ((target->HasAura(SPELL_DK_BLOOD_PRESENCE) || target->HasAura(SPELL_DK_FROST_PRESENCE)) && !target->HasAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED))
target->CastCustomSpell(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true, NULL, aurEff);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAura(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED);
Unit* target = GetTarget();
target->RemoveAura(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED);
if (!target->HasAura(SPELL_DK_UNHOLY_PRESENCE))
target->RemoveAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED);
}
void Register() OVERRIDE
@@ -843,6 +917,132 @@ class spell_dk_improved_unholy_presence : public SpellScriptLoader
}
};
// 48266 - Blood Presence
// 48263 - Frost Presence
// 48265 - Unholy Presence
class spell_dk_presence : public SpellScriptLoader
{
public:
spell_dk_presence() : SpellScriptLoader("spell_dk_presence") { }
class spell_dk_presence_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dk_presence_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_FROST_PRESENCE_R1)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_PRESENCE_TRIGGERED)
|| !sSpellMgr->GetSpellInfo(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED))
return false;
return true;
}
void CheckImprovedBloodPresence()
{
Unit* target = GetTarget();
if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1, EFFECT_0))
if (!target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
target->CastCustomSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT1, aurEff->GetAmount(), target, true, NULL, aurEff);
}
void CheckImprovedFrostPresence()
{
Unit* target = GetTarget();
if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_FROST_PRESENCE_R1, EFFECT_0))
if (!target->HasAura(SPELL_DK_FROST_PRESENCE_TRIGGERED))
target->CastCustomSpell(SPELL_DK_FROST_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true, NULL, aurEff);
}
void CheckImprovedUnholyPresence(bool inUnholy = false)
{
Unit* target = GetTarget();
if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1, EFFECT_0))
{
if (inUnholy)
{
// Not listed as any effect, only base points set
int32 bp = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue();
target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &bp, &bp, &bp, true, 0, aurEff);
}
else if (!target->HasAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED))
target->CastCustomSpell(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true, NULL, aurEff);
}
}
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
switch (GetSpellInfo()->Id)
{
case SPELL_DK_BLOOD_PRESENCE:
target->CastSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, true);
CheckImprovedFrostPresence();
CheckImprovedUnholyPresence();
break;
case SPELL_DK_FROST_PRESENCE:
target->CastSpell(target, SPELL_DK_FROST_PRESENCE_TRIGGERED, true);
CheckImprovedBloodPresence();
CheckImprovedUnholyPresence();
break;
case SPELL_DK_UNHOLY_PRESENCE:
target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, true);
CheckImprovedBloodPresence();
CheckImprovedFrostPresence();
CheckImprovedUnholyPresence(true);
break;
default:
return;
}
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
target->RemoveAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED);
target->RemoveAura(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED);
target->RemoveAura(SPELL_DK_FROST_PRESENCE_TRIGGERED);
target->RemoveAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED);
}
void Register() OVERRIDE
{
uint32 auraType = 0;
switch (m_scriptSpellId)
{
case SPELL_DK_BLOOD_PRESENCE:
auraType = SPELL_AURA_MOD_DAMAGE_PERCENT_DONE;
break;
case SPELL_DK_FROST_PRESENCE:
auraType = SPELL_AURA_MOD_BASE_RESISTANCE_PCT;
break;
case SPELL_DK_UNHOLY_PRESENCE:
auraType = SPELL_AURA_MOD_MELEE_HASTE;
break;
default:
return;
}
AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleEffectApply, EFFECT_0, auraType, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_dk_presence_AuraScript::HandleEffectRemove, EFFECT_0, auraType, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_dk_presence_AuraScript();
}
};
// 59754 Rune Tap - Party
class spell_dk_rune_tap_party : public SpellScriptLoader
{
@@ -1064,7 +1264,9 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_ghoul_explode();
new spell_dk_icebound_fortitude();
new spell_dk_improved_blood_presence();
new spell_dk_improved_frost_presence();
new spell_dk_improved_unholy_presence();
new spell_dk_presence();
new spell_dk_rune_tap_party();
new spell_dk_scent_of_blood();
new spell_dk_scourge_strike();