[7051] Implement some mage dummy triggers (fix typo)

44546 and ranks
44449 and ranks
54747 and ranks

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-01-08 03:49:36 +03:00
parent 40d7fecb36
commit e573bd9ea8
8 changed files with 123 additions and 14 deletions

View file

@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`; DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` ( CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`required_7050_01_mangos_spell_proc_event` bit(1) default NULL `required_7051_01_mangos_spell_proc_event` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -16595,6 +16595,14 @@ INSERT INTO `spell_proc_event` VALUES
(44445, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (44445, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44446, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (44446, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44448, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (44448, 0x00000000, 3, 0x00000013, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44449, 0x00000000, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(44469, 0x00000000, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(44470, 0x00000000, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(44471, 0x00000000, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(44472, 0x00000000, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(44546, 0x00000000, 3, 0x020002A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44548, 0x00000000, 3, 0x020002A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44549, 0x00000000, 3, 0x020002A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(44835, 0x00000000, 7, 0x00000000, 0x00000080, 0x00000000, 0x00000010, 0x00000000, 0.000000, 0.000000, 0), (44835, 0x00000000, 7, 0x00000000, 0x00000080, 0x00000000, 0x00000010, 0x00000000, 0.000000, 0.000000, 0),
(45054, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 15), (45054, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 15),
(45057, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 30), (45057, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 30),
@ -16786,6 +16794,8 @@ INSERT INTO `spell_proc_event` VALUES
(54489, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (54489, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(54490, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (54490, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(54738, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (54738, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(54747, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0),
(54749, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0),
(54754, 0x00000000, 7, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (54754, 0x00000000, 7, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(54841, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (54841, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(54936, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (54936, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),

View file

@ -0,0 +1,41 @@
ALTER TABLE db_version CHANGE COLUMN required_7050_01_mangos_spell_proc_event required_7051_01_mangos_spell_proc_event bit;
-- (44546) Brain Freeze (Rank 1)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44546);
INSERT INTO `spell_proc_event` VALUES (44546, 0x00, 3, 0x020002A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (44548) Brain Freeze (Rank 2)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44548);
INSERT INTO `spell_proc_event` VALUES (44548, 0x00, 3, 0x020002A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (44549) Brain Freeze (Rank 3)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44549);
INSERT INTO `spell_proc_event` VALUES (44549, 0x00, 3, 0x020002A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (44449) Burnout (Rank 1)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44449);
INSERT INTO `spell_proc_event` VALUES (44449, 0x00, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
-- (44469) Burnout (Rank 2)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44469);
INSERT INTO `spell_proc_event` VALUES (44469, 0x00, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
-- (44470) Burnout (Rank 3)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44470);
INSERT INTO `spell_proc_event` VALUES (44470, 0x00, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
-- (44471) Burnout (Rank 4)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44471);
INSERT INTO `spell_proc_event` VALUES (44471, 0x00, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
-- (44472) Burnout (Rank 5)
DELETE FROM `spell_proc_event` WHERE `entry` IN (44472);
INSERT INTO `spell_proc_event` VALUES (44472, 0x00, 3, 0x20E21277, 0x00019048, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
-- (54747) Burning Determination (Rank 1)
DELETE FROM `spell_proc_event` WHERE `entry` IN (54747);
INSERT INTO `spell_proc_event` VALUES (54747, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0);
-- (54749) Burning Determination (Rank 2)
DELETE FROM `spell_proc_event` WHERE `entry` IN (54749);
INSERT INTO `spell_proc_event` VALUES (54749, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0);

View file

@ -120,6 +120,7 @@ pkgdata_DATA = \
7047_02_mangos_playercreateinfo_action.sql \ 7047_02_mangos_playercreateinfo_action.sql \
7047_03_mangos_playercreateinfo_spell.sql \ 7047_03_mangos_playercreateinfo_spell.sql \
7050_01_mangos_spell_proc_event.sql \ 7050_01_mangos_spell_proc_event.sql \
7051_01_mangos_spell_proc_event.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -220,4 +221,5 @@ EXTRA_DIST = \
7047_02_mangos_playercreateinfo_action.sql \ 7047_02_mangos_playercreateinfo_action.sql \
7047_03_mangos_playercreateinfo_spell.sql \ 7047_03_mangos_playercreateinfo_spell.sql \
7050_01_mangos_spell_proc_event.sql \ 7050_01_mangos_spell_proc_event.sql \
7051_01_mangos_spell_proc_event.sql \
README README

View file

@ -1239,6 +1239,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
case 34754: // Clearcasting case 34754: // Clearcasting
case 34936: // Backlash case 34936: // Backlash
case 48108: // Hot Streak case 48108: // Hot Streak
case 57761: // Fireball!
SetAuraCharges(1); SetAuraCharges(1);
break; break;
} }
@ -4224,10 +4225,11 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
return; return;
} }
// Deadly Poison
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000) if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
{ {
// 0.08*$AP / 4 * amount of stack // 0.08*$AP / 4 * amount of stack
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() * / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100);
return; return;
} }
break; break;

View file

@ -2247,7 +2247,8 @@ void Spell::EffectPowerDrain(uint32 i)
unitTarget->ModifyPower(drain_power,-new_damage); unitTarget->ModifyPower(drain_power,-new_damage);
if(drain_power == POWER_MANA) // Don`t restore from self drain
if(drain_power == POWER_MANA && m_caster != unitTarget)
{ {
float manaMultiplier = m_spellInfo->EffectMultipleValue[i]; float manaMultiplier = m_spellInfo->EffectMultipleValue[i];
if(manaMultiplier==0) if(manaMultiplier==0)

View file

@ -448,6 +448,17 @@ inline uint32 GetSpellMechanicMask(SpellEntry const* spellInfo, int32 effect)
return mask; return mask;
} }
inline uint32 GetAllSpellMechanicMask(SpellEntry const* spellInfo)
{
uint32 mask = 0;
if (spellInfo->Mechanic)
mask |= 1<<spellInfo->Mechanic;
for (int i=0; i< 3; ++i)
if (spellInfo->EffectMechanic[i])
mask |= 1<<spellInfo->EffectMechanic[i];
return mask;
}
inline Mechanics GetEffectMechanic(SpellEntry const* spellInfo, int32 effect) inline Mechanics GetEffectMechanic(SpellEntry const* spellInfo, int32 effect)
{ {
if (spellInfo->EffectMechanic[effect]) if (spellInfo->EffectMechanic[effect])

View file

@ -4595,7 +4595,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false; return false;
// mana cost save // mana cost save
basepoints0 = procSpell->manaCost * triggeredByAura->GetModifier()->m_amount/100; int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
basepoints0 = cost * triggeredByAura->GetModifier()->m_amount/100;
if( basepoints0 <=0 ) if( basepoints0 <=0 )
return false; return false;
@ -4626,6 +4627,20 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
mod->m_amount = 25; mod->m_amount = 25;
return true; return true;
} }
// Burnout
if (dummySpell->SpellIconID == 2998)
{
if(!procSpell)
return false;
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
basepoints0 = cost * triggeredByAura->GetModifier()->m_amount/100;
if( basepoints0 <=0 )
return false;
triggered_spell_id = 44450;
target = this;
break;
}
// Incanter's Regalia set (add trigger chance to Mana Shield) // Incanter's Regalia set (add trigger chance to Mana Shield)
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL) if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
{ {
@ -4694,15 +4709,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) || this == pVictim) if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) || this == pVictim)
return false; return false;
// Need stun or root mechanic // Need stun or root mechanic
if (procSpell->Mechanic != MECHANIC_ROOT && procSpell->Mechanic != MECHANIC_STUN) if (!(GetAllSpellMechanicMask(procSpell) & ((1<<MECHANIC_ROOT)|(1<<MECHANIC_STUN))))
{
int32 i;
for (i=0; i<3; i++)
if (procSpell->EffectMechanic[i] == MECHANIC_ROOT || procSpell->EffectMechanic[i] == MECHANIC_STUN)
break;
if (i == 3)
return false; return false;
}
switch (dummySpell->Id) switch (dummySpell->Id)
{ {
@ -6100,6 +6108,40 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
return false; return false;
break; break;
} }
// Brain Freeze
case 57761:
{
if(!procSpell)
return false;
// For trigger from Blizzard need exist Improved Blizzard
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && procSpell->SpellFamilyFlags & 0x0000000000000080)
{
bool found = false;
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
int32 script = (*i)->GetModifier()->m_miscvalue;
if(script==836 || script==988 || script==989)
{
found=true;
break;
}
}
if(!found)
return false;
}
break;
}
// Burning Determination
case 54748:
{
if(!procSpell)
return false;
// Need Interrupt or Silenced mechanic
if (!(GetAllSpellMechanicMask(procSpell) & ((1<<MECHANIC_INTERRUPT)|(1<<MECHANIC_SILENCE))))
return false;
break;
}
} }
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id)) if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id))

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7050" #define REVISION_NR "7051"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__