*Spell_proc_event entries for Malestorm Weapon - by throneinc
*Fix bug that some spells can't proc *Add spell_proc_event entries for some items. --HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN
|
||||||
|
(27521, 55381, 62459, 60176, 60529, 60717, 62147, 57907, 51528, 51529, 51530, 51531, 51532);
|
||||||
|
INSERT INTO `spell_proc_event`
|
||||||
|
(`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`)
|
||||||
|
VALUES
|
||||||
|
-- malestorm weapon
|
||||||
|
(51528, 0, 0, 0, 0, 0, 0, 0, 2.5, 0, 0),
|
||||||
|
(51529, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0),
|
||||||
|
(51530, 0, 0, 0, 0, 0, 0, 0, 7.5, 0, 0),
|
||||||
|
(51531, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0),
|
||||||
|
(51532, 0, 0, 0, 0, 0, 0, 0, 12.5, 0, 0),
|
||||||
|
|
||||||
|
(27521, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 15),
|
||||||
|
(55381, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 15),
|
||||||
|
(62459, 0x00, 15, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||||
|
(60176, 0x00, 4, 0x00000020, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||||
|
(60529, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 45),
|
||||||
|
(60717, 0x00, 7, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 100.000000, 0),
|
||||||
|
(62147, 0x00, 15, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||||
|
(57907, 0x00, 7, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||||
@@ -304,7 +304,7 @@ enum SpellCategory
|
|||||||
#define SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT 0x00080000 // 19 does not necessarly need shapeshift
|
#define SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT 0x00080000 // 19 does not necessarly need shapeshift
|
||||||
#define SPELL_ATTR_EX2_UNK20 0x00100000 // 20
|
#define SPELL_ATTR_EX2_UNK20 0x00100000 // 20
|
||||||
#define SPELL_ATTR_EX2_DAMAGE_REDUCED_SHIELD 0x00200000 // 21 for ice blocks, pala immunity buffs, priest absorb shields, but used also for other spells -> not sure!
|
#define SPELL_ATTR_EX2_DAMAGE_REDUCED_SHIELD 0x00200000 // 21 for ice blocks, pala immunity buffs, priest absorb shields, but used also for other spells -> not sure!
|
||||||
#define SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER 0x00400000 // 22 spell can trigger even if triggered
|
#define SPELL_ATTR_EX2_UNK22 0x00400000 // 22 spell can trigger even if triggered
|
||||||
#define SPELL_ATTR_EX2_UNK23 0x00800000 // 23 Only mage Arcane Concentration have this flag
|
#define SPELL_ATTR_EX2_UNK23 0x00800000 // 23 Only mage Arcane Concentration have this flag
|
||||||
#define SPELL_ATTR_EX2_UNK24 0x01000000 // 24
|
#define SPELL_ATTR_EX2_UNK24 0x01000000 // 24
|
||||||
#define SPELL_ATTR_EX2_UNK25 0x02000000 // 25
|
#define SPELL_ATTR_EX2_UNK25 0x02000000 // 25
|
||||||
@@ -312,7 +312,7 @@ enum SpellCategory
|
|||||||
#define SPELL_ATTR_EX2_UNK27 0x08000000 // 27
|
#define SPELL_ATTR_EX2_UNK27 0x08000000 // 27
|
||||||
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28 no breaks stealth if it fails??
|
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28 no breaks stealth if it fails??
|
||||||
#define SPELL_ATTR_EX2_CANT_CRIT 0x20000000 // 29 Spell can't crit
|
#define SPELL_ATTR_EX2_CANT_CRIT 0x20000000 // 29 Spell can't crit
|
||||||
#define SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER_2 0x40000000 // 30 spell can trigger even if triggered
|
#define SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER 0x40000000 // 30 spell can trigger even if triggered
|
||||||
#define SPELL_ATTR_EX2_FOOD 0x80000000 // 31 food, well-fed, and a few others
|
#define SPELL_ATTR_EX2_FOOD 0x80000000 // 31 food, well-fed, and a few others
|
||||||
|
|
||||||
#define SPELL_ATTR_EX3_UNK0 0x00000001 // 0
|
#define SPELL_ATTR_EX3_UNK0 0x00000001 // 0
|
||||||
@@ -324,7 +324,7 @@ enum SpellCategory
|
|||||||
#define SPELL_ATTR_EX3_UNK6 0x00000040 // 6
|
#define SPELL_ATTR_EX3_UNK6 0x00000040 // 6
|
||||||
#define SPELL_ATTR_EX3_UNK7 0x00000080 // 7
|
#define SPELL_ATTR_EX3_UNK7 0x00000080 // 7
|
||||||
#define SPELL_ATTR_EX3_PLAYERS_ONLY 0x00000100 // 8 Player only?
|
#define SPELL_ATTR_EX3_PLAYERS_ONLY 0x00000100 // 8 Player only?
|
||||||
#define SPELL_ATTR_EX3_UNK9 0x00000200 // 9
|
#define SPELL_ATTR_EX3_TRIGGERED_CAN_TRIGGER_2 0x00000200 // 9 triggered from effect?
|
||||||
#define SPELL_ATTR_EX3_MAIN_HAND 0x00000400 // 10 Main hand weapon required
|
#define SPELL_ATTR_EX3_MAIN_HAND 0x00000400 // 10 Main hand weapon required
|
||||||
#define SPELL_ATTR_EX3_BATTLEGROUND 0x00000800 // 11 Can casted only on battleground
|
#define SPELL_ATTR_EX3_BATTLEGROUND 0x00000800 // 11 Can casted only on battleground
|
||||||
#define SPELL_ATTR_EX3_UNK12 0x00001000 // 12
|
#define SPELL_ATTR_EX3_UNK12 0x00001000 // 12
|
||||||
|
|||||||
+4
-2
@@ -745,10 +745,12 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
|
|||||||
|
|
||||||
m_procEx = (m_IsTriggeredSpell)
|
m_procEx = (m_IsTriggeredSpell)
|
||||||
&& !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER)
|
&& !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER)
|
||||||
&& !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER_2)
|
&& !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_TRIGGERED_CAN_TRIGGER_2)
|
||||||
? PROC_EX_INTERNAL_TRIGGERED : PROC_EX_NONE;
|
? PROC_EX_INTERNAL_TRIGGERED : PROC_EX_NONE;
|
||||||
|
|
||||||
if (m_IsTriggeredSpell && (m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER_2 | SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER))
|
if (m_IsTriggeredSpell &&
|
||||||
|
(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER ||
|
||||||
|
m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_TRIGGERED_CAN_TRIGGER_2))
|
||||||
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
|
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
|
||||||
|
|
||||||
// Totem casts require spellfamilymask defined in spell_proc_event to proc
|
// Totem casts require spellfamilymask defined in spell_proc_event to proc
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
|||||||
Aura::Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem, Unit * formalCaster) :
|
Aura::Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem, Unit * formalCaster) :
|
||||||
m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), m_target(target),
|
m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), m_target(target),
|
||||||
m_timeCla(1000), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE),
|
m_timeCla(1000), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE),
|
||||||
m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_auraStateMask(0), m_updated(false), m_isRemoved(false), m_canProc(true)
|
m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_auraStateMask(0), m_updated(false), m_isRemoved(false), m_procDeep(0)
|
||||||
{
|
{
|
||||||
assert(target);
|
assert(target);
|
||||||
|
|
||||||
@@ -613,8 +613,6 @@ Unit* AreaAuraEffect::GetFormalCaster() const
|
|||||||
|
|
||||||
void Aura::Update(uint32 diff)
|
void Aura::Update(uint32 diff)
|
||||||
{
|
{
|
||||||
// Reset can proc requirement-prevent use of outdated value
|
|
||||||
m_canProc = true;
|
|
||||||
if (m_duration > 0)
|
if (m_duration > 0)
|
||||||
{
|
{
|
||||||
m_duration -= diff;
|
m_duration -= diff;
|
||||||
|
|||||||
@@ -107,8 +107,8 @@ class TRINITY_DLL_SPEC Aura
|
|||||||
bool IsRemoved() const { return m_isRemoved; }
|
bool IsRemoved() const { return m_isRemoved; }
|
||||||
void SetUpdated(bool val) { m_updated = val; }
|
void SetUpdated(bool val) { m_updated = val; }
|
||||||
|
|
||||||
bool CanProc(){return m_canProc;}
|
bool CanProc(){return !m_procDeep;}
|
||||||
void SetCanProc(bool val){ m_canProc = val; }
|
void SetCantProc( bool apply) {if (apply) --m_procDeep; else ++m_procDeep; assert(m_procDeep>=0);}
|
||||||
bool IsPersistent() const;
|
bool IsPersistent() const;
|
||||||
bool IsAreaAura() const;
|
bool IsAreaAura() const;
|
||||||
bool IsAuraType(AuraType type) const;
|
bool IsAuraType(AuraType type) const;
|
||||||
@@ -159,7 +159,7 @@ class TRINITY_DLL_SPEC Aura
|
|||||||
AuraEffect * m_partAuras[3];
|
AuraEffect * m_partAuras[3];
|
||||||
|
|
||||||
uint32 m_procDamage; // used in aura proc code
|
uint32 m_procDamage; // used in aura proc code
|
||||||
bool m_canProc:1;
|
int32 m_procDeep;
|
||||||
|
|
||||||
bool m_isDeathPersist:1;
|
bool m_isDeathPersist:1;
|
||||||
bool m_isRemovedOnShapeLost:1;
|
bool m_isRemovedOnShapeLost:1;
|
||||||
|
|||||||
+9
-4
@@ -12012,14 +12012,14 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
if (!isTriggerAura[aurEff->GetAuraName()] && triggerData.spellProcEvent==NULL)
|
if (!isTriggerAura[aurEff->GetAuraName()] && triggerData.spellProcEvent==NULL)
|
||||||
continue;
|
continue;
|
||||||
triggerData.effMask |= 1<<i;
|
triggerData.effMask |= 1<<i;
|
||||||
if (procExtra & (PROC_EX_INTERNAL_TRIGGERED | PROC_EX_INTERNAL_CANT_PROC))
|
|
||||||
itr->second->SetCanProc(false);
|
|
||||||
else
|
|
||||||
itr->second->SetCanProc(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (triggerData.effMask)
|
if (triggerData.effMask)
|
||||||
|
{
|
||||||
procTriggered.push_front(triggerData);
|
procTriggered.push_front(triggerData);
|
||||||
|
if (procExtra & (PROC_EX_INTERNAL_TRIGGERED | PROC_EX_INTERNAL_CANT_PROC))
|
||||||
|
itr->second->SetCantProc(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nothing found
|
// Nothing found
|
||||||
@@ -12189,6 +12189,11 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
i->aura->DropAuraCharge();
|
i->aura->DropAuraCharge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleanup proc requirements
|
||||||
|
if (procExtra & (PROC_EX_INTERNAL_TRIGGERED | PROC_EX_INTERNAL_CANT_PROC))
|
||||||
|
for(ProcTriggeredList::iterator i = procTriggered.begin(); i != procTriggered.end(); ++i)
|
||||||
|
i->aura->SetCantProc(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellSchoolMask Unit::GetMeleeDamageSchoolMask() const
|
SpellSchoolMask Unit::GetMeleeDamageSchoolMask() const
|
||||||
|
|||||||
Reference in New Issue
Block a user