aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SharedDefines.h2
-rw-r--r--src/game/SpellMgr.h2
-rw-r--r--src/game/Unit.cpp12
-rw-r--r--src/game/Unit.h4
4 files changed, 11 insertions, 9 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index e1440d45454..b6ac8054ce2 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -344,7 +344,7 @@ enum SpellCategory
#define SPELL_ATTR_EX3_REQ_OFFHAND 0x01000000 // 24 Req offhand weapon
#define SPELL_ATTR_EX3_UNK25 0x02000000 // 25 no cause spell pushback ?
#define SPELL_ATTR_EX3_CAN_PROC_TRIGGERED 0x04000000 // 26
-#define SPELL_ATTR_EX3_UNK27 0x08000000 // 27
+#define SPELL_ATTR_EX3_DRAIN_SOUL 0x08000000 // 27 only drain soul has this flag
#define SPELL_ATTR_EX3_UNK28 0x10000000 // 28
#define SPELL_ATTR_EX3_UNK29 0x20000000 // 29
#define SPELL_ATTR_EX3_UNK30 0x40000000 // 30
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 330dfd56eee..f217a64f298 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -424,7 +424,7 @@ enum ProcFlags
PROC_FLAG_ON_TRAP_ACTIVATION = 0x00200000, // 21 On trap activation
PROC_FLAG_TAKEN_OFFHAND_HIT = 0x00400000, // 22 Taken off-hand melee attacks(not used)
- PROC_FLAG_SUCCESSFUL_OFFHAND_HIT = 0x00800000, // 23 Successful off-hand melee attacks
+ PROC_FLAG_SUCCESSFUL_OFFHAND_HIT = 0x00800000, // 23 Successful off-hand melee attacks ( this is probably wrong )
PROC_FLAG_DEATH = 0x01000000 // 24 Died in any way
};
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e1120e90d12..408bf62f224 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7275,15 +7275,16 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
trigger_spell_id = 18093;
}
- // Drain Soul
+ // Improved Drain Soul
else if (auraSpellInfo->SpellFamilyFlags[0] & 0x4000)
{
- Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
+ Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraEffectList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
{
if ((*i)->GetMiscValue() == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113)
{
int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this);
+ basepoints0 = value2 * GetMaxPower(POWER_MANA) / 100;
// Drain Soul
CastCustomSpell(this, 18371, &basepoints0, NULL, NULL, true, castItem, triggeredByAura);
break;
@@ -12478,7 +12479,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
// Fill procTriggered list
for(AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr)
{
- // Do not allow auras to proc from effect of itself
+ // Do not allow auras to proc from effect triggered by itself
if (procAura && procAura->Id == itr->first)
continue;
ProcTriggeredData triggerData(itr->second);
@@ -13365,8 +13366,9 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
return false;
}
// Aura added by spell can`t trogger from self (prevent drop charges/do triggers)
- // But except periodic triggers (can triggered from self)
- if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags&PROC_FLAG_ON_TAKE_PERIODIC))
+ // But except periodic and kill triggers (can triggered from self)
+ if(procSpell && procSpell->Id == spellProto->Id
+ && !(spellProto->procFlags&PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_KILL))
return false;
// Check if current equipment allows aura to proc
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 976e5aceadf..b7868c6c83b 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -354,8 +354,8 @@ enum DamageTypeToSchool
enum AuraRemoveMode
{
- AURA_REMOVE_BY_DEFAULT=0,
- AURA_REMOVE_BY_STACK, // change stack, single aura remove,
+ AURA_REMOVE_BY_DEFAULT=0, // scripted remove, remove by stack with aura with different ids and sc aura remove
+ AURA_REMOVE_BY_STACK, // replace by aura with same id
AURA_REMOVE_BY_CANCEL,
AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy
AURA_REMOVE_BY_EXPIRE, // dispel and absorb aura destroy