aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-21 20:02:22 +0200
committerQAston <none@none>2009-05-21 20:02:22 +0200
commit1403419164d2ba39165059dd5b5fec55638f94b8 (patch)
treecf2628129183cb5e10ac1325822f863ff627640d /src/game/Unit.cpp
parentd846ae72aecebe5a17685119b02fab4e0a6eece4 (diff)
*Fix reckonging
*fix Sword and Board *Fix Vigilance *Rollback sw:death fix. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 12b588e53a7..f6fb9d73f2d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4567,15 +4567,15 @@ void Unit::SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage,
SendSpellNonMeleeDamageLog(&log);
}
-void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procExtra, uint32 amount, WeaponAttackType attType, SpellEntry const *procSpell)
+void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procExtra, uint32 amount, WeaponAttackType attType, SpellEntry const *procSpell, SpellEntry const * procAura)
{
// Not much to do if no flags are set.
if (procAttacker)
- ProcDamageAndSpellFor(false,pVictim,procAttacker, procExtra,attType, procSpell, amount);
+ ProcDamageAndSpellFor(false,pVictim,procAttacker, procExtra,attType, procSpell, amount, procAura);
// Now go on with a victim's events'n'auras
// Not much to do if no flags are set or there is no victim
if(pVictim && pVictim->isAlive() && procVictim)
- pVictim->ProcDamageAndSpellFor(true,this,procVictim, procExtra, attType, procSpell, amount);
+ pVictim->ProcDamageAndSpellFor(true,this,procVictim, procExtra, attType, procSpell, amount, procAura);
}
void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
@@ -7013,6 +7013,11 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
case SPELLFAMILY_WARRIOR:
if (auraSpellInfo->Id == 50421) // Scent of Blood
trigger_spell_id = 50422;
+ // Sword and Board
+ else if (trigger_spell_id == 50227)
+ // remove cooldown of Shield Slam
+ if (GetTypeId()==TYPEID_PLAYER)
+ ((Player*)this)->RemoveCategoryCooldown(1209);
break;
case SPELLFAMILY_WARLOCK:
{
@@ -11926,7 +11931,7 @@ uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missC
return procEx;
}
-void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage )
+void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage , SpellEntry const * procAura)
{
// For melee/ranged based attack need update skills and set some Aura states
if (procFlag & MELEE_BASED_TRIGGER_MASK)
@@ -11998,6 +12003,9 @@ 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
+ if (procAura && procAura->Id == itr->first)
+ continue;
ProcTriggeredData triggerData(itr->second);
if(!IsTriggeredAtSpellProcEvent(pTarget, triggerData.aura, procSpell, procFlag, procExtra, attType, isVictim, (damage > 0), triggerData.spellProcEvent))
continue;