[7031] Implement some mage, paladin dummy trigers

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-01-05 06:01:46 +03:00
parent 63c9f1ba72
commit 8ac2150b88
5 changed files with 82 additions and 6 deletions

View file

@ -16532,6 +16532,9 @@ INSERT INTO `spell_proc_event` VALUES
(43750, 0x00000000, 11, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0),
(43819, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00010000, 0, 0, 0),
(44404, 0x00000000, 3, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0),
(44445, 0x00000000, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0, 0, 0),
(44446, 0x00000000, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0, 0, 0),
(44448, 0x00000000, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0, 0, 0),
(44835, 0x00000000, 7, 0x0000008000000000, 0x00000010, 0x00000000, 0, 0, 0),
(45054, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 15),
(45057, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000000, 0, 0, 30),
@ -16651,6 +16654,9 @@ INSERT INTO `spell_proc_event` VALUES
(54490, 0x00000000, 0, 0x0000900020000021, 0x00000000, 0x00000000, 0, 0, 0),
(54738, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0),
(54841, 0x00000000, 0, 0x0000000000000000, 0x00000000, 0x00000002, 0, 0, 0),
(54936, 0x00000000, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0, 0, 0),
(54937, 0x00000000, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0, 0, 0),
(54939, 0x00000000, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0, 0, 0),
(55620, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0),
(55623, 0x00000000, 15, 0x0800000000000001, 0x00000000, 0x00000000, 0, 0, 0),
(55666, 0x00000000, 15, 0x0000000000000001, 0x00000000, 0x00000000, 0, 0, 0),

View file

@ -0,0 +1,23 @@
-- (44445) Hot Streak (Rank 1)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44445);
INSERT INTO `spell_proc_event` VALUES (44445, 0x00, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (44446) Hot Streak (Rank 2)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44446);
INSERT INTO `spell_proc_event` VALUES (44446, 0x00, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (44448) Hot Streak (Rank 3)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44448);
INSERT INTO `spell_proc_event` VALUES (44448, 0x00, 3, 0x0000100000000013, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (54939) Glyph of Divinity ()
DELETE FROM `spell_proc_event` WHERE `entry` IN (54939);
INSERT INTO `spell_proc_event` VALUES (54939, 0x00, 10, 0x0000000000008000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (54936) Glyph of Flash of Light ()
DELETE FROM `spell_proc_event` WHERE `entry` IN (54936);
INSERT INTO `spell_proc_event` VALUES (54936, 0x00, 10, 0x0000000040000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (54937) Glyph of Holy Light ()
DELETE FROM `spell_proc_event` WHERE `entry` IN (54937);
INSERT INTO `spell_proc_event` VALUES (54937, 0x00, 10, 0x0000000080000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);

View file

@ -111,6 +111,7 @@ pkgdata_DATA = \
7015_01_mangos_item_template.sql \
7024_01_mangos_spell_chain.sql \
7026_01_mangos_battleground_template.sql \
7031_01_mangos_spell_proc_event.sql \
README
## Additional files to include when running 'make dist'
@ -202,4 +203,5 @@ EXTRA_DIST = \
7015_01_mangos_item_template.sql \
7024_01_mangos_spell_chain.sql \
7026_01_mangos_battleground_template.sql \
7031_01_mangos_spell_proc_event.sql \
README

View file

@ -4586,6 +4586,29 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 29077;
break;
}
// Hot Streak
if (dummySpell->SpellIconID == 2999)
{
if (triggeredByAura->GetEffIndex()!=0)
return true;
Aura *counter = GetAura(triggeredByAura->GetId(), 1);
if (!counter)
return true;
// Count spell criticals in a row in second aura
Modifier *mod = counter->GetModifier();
if (procEx & PROC_EX_CRITICAL_HIT)
{
mod->m_amount *=2;
if (mod->m_amount < 100) // not enough
return true;
// Crititcal counted -> roll chance
if (roll_chance_i(triggeredByAura->GetModifier()->m_amount))
CastSpell(this, 48108, true, castItem, triggeredByAura);
}
mod->m_amount = 25;
return true;
}
// Incanter's Regalia set (add trigger chance to Mana Shield)
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
{
@ -4941,11 +4964,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if(!procSpell)
return false;
// only rogue's finishing moves (maybe need additional checks)
if( procSpell->SpellFamilyName!=SPELLFAMILY_ROGUE ||
(procSpell->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE) == 0)
return false;
// energy cost save
basepoints0 = procSpell->manaCost * triggeredByAura->GetModifier()->m_amount/100;
if(basepoints0 <= 0)
@ -5127,6 +5145,33 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Glyph of Divinity
case 54939:
{
// Lookup base amount mana restore
for (int i=0; i<3;i++)
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
{
int32 mana = procSpell->EffectBasePoints[i];
CastCustomSpell(this, 54986, 0, &mana, 0, true, castItem, triggeredByAura);
break;
}
return true;
}
// Glyph of Flash of Light
case 54936:
{
triggered_spell_id = 54957;
basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100;
break;
}
// Glyph of Holy Light
case 54937:
{
triggered_spell_id = 54968;
basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100;
break;
}
}
break;
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7030"
#define REVISION_NR "7031"
#endif // __REVISION_NR_H__