[9482] Implement 48266, and 50365, 50384, 50391 and ranks.

Original patch provided by laise.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
VladimirMangos 2010-02-28 12:02:47 +03:00
parent ae7f6de936
commit 4dc85260c7
8 changed files with 172 additions and 28 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0',
`required_9477_01_mangos_spell_proc_event` bit(1) default NULL
`required_9482_01_mangos_spell_proc_event` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@ -18667,6 +18667,7 @@ INSERT INTO `spell_proc_event` VALUES
(63320, 0x00000000, 5, 0x00040000, 0x00000000, 0x00008000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0),
(63373, 0x00000000, 11, 0x80000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0.000000, 0.000000, 0),
(63534, 0x00000000, 6, 0x00000040, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0),
(63611, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00050014, 0x00000000, 0.000000, 0.000000, 0),
(63625, 0x00000000, 6, 0x02000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0.000000, 0.000000, 0),
(63730, 0x00000000, 6, 0x00000800, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(64928, 0x00000000, 11, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),

View file

@ -0,0 +1,9 @@
ALTER TABLE db_version CHANGE COLUMN required_9477_01_mangos_spell_proc_event required_9482_01_mangos_spell_proc_event bit;
-- (48266) Blood Presence ()
DELETE FROM `spell_proc_event` WHERE `entry` IN (50689);
-- (63611) Improved Blood Presence ()
DELETE FROM `spell_proc_event` WHERE `entry` IN (63611);
INSERT INTO `spell_proc_event` VALUES
(63611, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00050014, 0x00000000, 0.000000, 0.000000, 0);

View file

@ -81,6 +81,7 @@ pkgdata_DATA = \
9464_01_mangos_spell_proc_event.sql \
9466_01_mangos_mangos_string.sql \
9477_01_mangos_spell_proc_event.sql \
9482_01_mangos_spell_proc_event.sql \
README
## Additional files to include when running 'make dist'
@ -142,4 +143,5 @@ EXTRA_DIST = \
9464_01_mangos_spell_proc_event.sql \
9466_01_mangos_mangos_string.sql \
9477_01_mangos_spell_proc_event.sql \
9482_01_mangos_spell_proc_event.sql \
README

View file

@ -6295,9 +6295,148 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
switch (GetId())
{
case 49039: spellId1 = 50397; break; // Lichborne
case 48263: spellId1 = 61261; break; // Frost Presence
case 48265: spellId1 = 49772; break; // Unholy Presence move speed
default: return;
case 48263: // Frost Presence
case 48265: // Unholy Presence
case 48266: // Blood Presence
{
// else part one per 3 pair
if (GetId()==48263 || GetId()==48265) // Frost Presence or Unholy Presence
{
// Improved Blood Presence
int32 heal_pct = 0;
if (apply)
{
Unit::AuraList const& bloodAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = bloodAuras.begin(); itr != bloodAuras.end(); ++itr)
{
// skip same icon
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT &&
(*itr)->GetSpellProto()->SpellIconID == 2636)
{
heal_pct = (*itr)->GetModifier()->m_amount;
break;
}
}
}
if (heal_pct)
m_target->CastCustomSpell(m_target, 63611, &heal_pct, NULL, NULL, true, NULL, this);
else
m_target->RemoveAurasDueToSpell(63611);
}
else
spellId1 = 63611; // Improved Blood Presence, trigger for heal
if (GetId()==48263 || GetId()==48266) // Frost Presence or Blood Presence
{
// Improved Unholy Presence
int32 power_pct = 0;
if (apply)
{
Unit::AuraList const& unholyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = unholyAuras.begin(); itr != unholyAuras.end(); ++itr)
{
// skip same icon
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT &&
(*itr)->GetSpellProto()->SpellIconID == 2633)
{
power_pct = (*itr)->GetModifier()->m_amount;
break;
}
}
}
if (power_pct)
m_target->CastCustomSpell(m_target, 65095, &power_pct, NULL, NULL, true, NULL, this);
else
m_target->RemoveAurasDueToSpell(65095);
if (power_pct || !apply)
spellId2 = 49772; // Unholy Presence, speed part
}
else
spellId1 = 49772; // Unholy Presence move speed
if (GetId()==48265 || GetId()==48266) // Unholy Presence or Blood Presence
{
// Improved Frost Presence
int32 stamina_pct = 0;
if (apply)
{
Unit::AuraList const& frostAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = frostAuras.begin(); itr != frostAuras.end(); ++itr)
{
// skip same icon
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT &&
(*itr)->GetSpellProto()->SpellIconID == 2632)
{
stamina_pct = (*itr)->GetModifier()->m_amount;
break;
}
}
}
if (stamina_pct)
m_target->CastCustomSpell(m_target, 61261, &stamina_pct, NULL, NULL, true, NULL, this);
else
m_target->RemoveAurasDueToSpell(61261);
}
else
spellId1 = 61261; // Frost Presence, stamina
break;
}
}
// Improved Blood Presence
if (GetSpellProto()->SpellIconID == 2632 && GetModifier()->m_auraname==SPELL_AURA_DUMMY)
{
// if presence active: Frost Presence or Unholy Presence
if (apply && (m_target->HasAura(48263) || m_target->HasAura(48265)))
{
int32 bp = GetModifier()->m_amount;
m_target->CastCustomSpell(m_target, 63611, &bp, NULL, NULL, true, NULL, this);
}
else
m_target->RemoveAurasDueToSpell(63611);
return;
}
// Improved Frost Presence
if (GetSpellProto()->SpellIconID == 2636 && GetModifier()->m_auraname==SPELL_AURA_DUMMY)
{
// if presence active: Unholy Presence or Blood Presence
if (apply && (m_target->HasAura(48265) || m_target->HasAura(48266)))
{
int32 bp = GetModifier()->m_amount;
m_target->CastCustomSpell(m_target, 61261, &bp, NULL, NULL, true, NULL, this);
}
else
m_target->RemoveAurasDueToSpell(61261);
return;
}
// Improved Unholy Presence
if (GetSpellProto()->SpellIconID == 2633 && GetModifier()->m_auraname==SPELL_AURA_DUMMY)
{
// if presence active: Frost Presence or Blood Presence
if (apply && (m_target->HasAura(48263) || m_target->HasAura(48266)))
{
int32 bp = GetModifier()->m_amount;
m_target->CastCustomSpell(m_target, 61261, &bp, NULL, NULL, true, NULL, this);
spellId1 = 49772;
}
else
{
m_target->RemoveAurasDueToSpell(61261);
if (!apply)
spellId1 = 49772;
else
return;
}
break;
}
break;
}

View file

@ -1753,6 +1753,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
// Unholy Presence and Unholy Presence (triggered)
if (spellInfo_1->SpellIconID == 2633 && spellInfo_2->SpellIconID == 2633)
return false;
// Unholy Presence and Unholy Presence (triggered)
if (spellInfo_1->SpellIconID == 2636 && spellInfo_2->SpellIconID == 2636)
return false;
}
break;
default:

View file

@ -6886,15 +6886,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
}
case SPELLFAMILY_DEATHKNIGHT:
{
// Blood Aura
if (dummySpell->SpellIconID == 2636)
{
if (GetTypeId() != TYPEID_PLAYER || !((Player*)this)->isHonorOrXPTarget(pVictim))
return false;
basepoints[0] = triggerAmount * damage / 100;
triggered_spell_id = 53168;
break;
}
// Butchery
if (dummySpell->SpellIconID == 2664)
{
@ -7670,16 +7661,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
return false;
}
}
// Blood Presence
else if (auraSpellInfo->Id == 48266)
{
if (GetTypeId() != TYPEID_PLAYER)
return false;
if (!((Player*)this)->isHonorOrXPTarget(pVictim))
return false;
trigger_spell_id = 50475;
basepoints[0] = damage * triggerAmount / 100;
}
// Blade Barrier
else if (auraSpellInfo->SpellIconID == 85)
{
@ -7687,6 +7668,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
!((Player*)this)->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
return false;
}
// Improved Blood Presence
else if (auraSpellInfo->Id == 63611)
{
if (GetTypeId() != TYPEID_PLAYER || !((Player*)this)->isHonorOrXPTarget(pVictim) || !damage)
return false;
basepoints[0] = triggerAmount * damage / 100;
trigger_spell_id = 50475;
}
break;
}
default:

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9481"
#define REVISION_NR "9482"
#endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_9375_01_characters_character_glyphs"
#define REVISION_DB_MANGOS "required_9477_01_mangos_spell_proc_event"
#define REVISION_DB_MANGOS "required_9482_01_mangos_spell_proc_event"
#define REVISION_DB_REALMD "required_9010_01_realmd_realmlist"
#endif // __REVISION_SQL_H__