*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:
QAston
2009-05-18 19:00:20 +02:00
parent e45c57f298
commit 6c7f2d2b24
6 changed files with 40 additions and 15 deletions
+3 -3
View File
@@ -304,7 +304,7 @@ enum SpellCategory
#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_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_UNK24 0x01000000 // 24
#define SPELL_ATTR_EX2_UNK25 0x02000000 // 25
@@ -312,7 +312,7 @@ enum SpellCategory
#define SPELL_ATTR_EX2_UNK27 0x08000000 // 27
#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_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_EX3_UNK0 0x00000001 // 0
@@ -324,7 +324,7 @@ enum SpellCategory
#define SPELL_ATTR_EX3_UNK6 0x00000040 // 6
#define SPELL_ATTR_EX3_UNK7 0x00000080 // 7
#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_BATTLEGROUND 0x00000800 // 11 Can casted only on battleground
#define SPELL_ATTR_EX3_UNK12 0x00001000 // 12
+4 -2
View File
@@ -745,10 +745,12 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
m_procEx = (m_IsTriggeredSpell)
&& !(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;
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;
// Totem casts require spellfamilymask defined in spell_proc_event to proc
+1 -3
View File
@@ -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) :
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_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);
@@ -613,8 +613,6 @@ Unit* AreaAuraEffect::GetFormalCaster() const
void Aura::Update(uint32 diff)
{
// Reset can proc requirement-prevent use of outdated value
m_canProc = true;
if (m_duration > 0)
{
m_duration -= diff;
+3 -3
View File
@@ -107,8 +107,8 @@ class TRINITY_DLL_SPEC Aura
bool IsRemoved() const { return m_isRemoved; }
void SetUpdated(bool val) { m_updated = val; }
bool CanProc(){return m_canProc;}
void SetCanProc(bool val){ m_canProc = val; }
bool CanProc(){return !m_procDeep;}
void SetCantProc( bool apply) {if (apply) --m_procDeep; else ++m_procDeep; assert(m_procDeep>=0);}
bool IsPersistent() const;
bool IsAreaAura() const;
bool IsAuraType(AuraType type) const;
@@ -159,7 +159,7 @@ class TRINITY_DLL_SPEC Aura
AuraEffect * m_partAuras[3];
uint32 m_procDamage; // used in aura proc code
bool m_canProc:1;
int32 m_procDeep;
bool m_isDeathPersist:1;
bool m_isRemovedOnShapeLost:1;
+9 -4
View File
@@ -12012,14 +12012,14 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
if (!isTriggerAura[aurEff->GetAuraName()] && triggerData.spellProcEvent==NULL)
continue;
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)
{
procTriggered.push_front(triggerData);
if (procExtra & (PROC_EX_INTERNAL_TRIGGERED | PROC_EX_INTERNAL_CANT_PROC))
itr->second->SetCantProc(true);
}
}
// Nothing found
@@ -12189,6 +12189,11 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
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