aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp8
-rw-r--r--src/game/Player.h1
-rw-r--r--src/game/Spell.cpp6
-rw-r--r--src/game/SpellEffects.cpp17
-rw-r--r--src/game/Unit.cpp16
-rw-r--r--src/game/Unit.h4
6 files changed, 40 insertions, 12 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 2bdae866aab..12d106ecd13 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3324,6 +3324,14 @@ void Player::RemoveSpellCooldown( uint32 spell_id, bool update /* = false */ )
}
}
+void Player::RemoveCategoryCooldown( uint32 cat )
+{
+ SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat);
+ if(i_scstore != sSpellCategoryStore.end())
+ for(SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
+ RemoveSpellCooldown(*i_scset, true);
+}
+
void Player::RemoveArenaSpellCooldowns()
{
// remove cooldowns on spells that has < 15 min CD
diff --git a/src/game/Player.h b/src/game/Player.h
index 54560f05f03..428981cdf34 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1386,6 +1386,7 @@ class TRINITY_DLL_SPEC Player : public Unit
void SendCooldownEvent(SpellEntry const *spellInfo, uint32 itemId = 0, Spell* spell = NULL);
void ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs );
void RemoveSpellCooldown(uint32 spell_id, bool update = false);
+ void RemoveCategoryCooldown(uint32 cat);
void RemoveArenaSpellCooldowns();
void RemoveAllSpellCooldown();
void _LoadSpellCooldowns(QueryResult *result);
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d23491f9d68..0a9bf4747f0 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1054,7 +1054,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
// Do triggers for unit (reflect triggers passed on hit phase for correct drop charge)
if (canEffectTrigger && missInfo != SPELL_MISS_REFLECT)
- caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, addhealth, m_attackType, m_spellInfo);
+ caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, addhealth, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
if (m_spellAura)
m_spellAura->SetProcDamage(addhealth);
@@ -1080,7 +1080,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
// Do triggers for unit (reflect triggers passed on hit phase for correct drop charge)
if (canEffectTrigger && missInfo != SPELL_MISS_REFLECT)
- caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo);
+ caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
if (m_spellAura)
m_spellAura->SetProcDamage(damageInfo.damage);
@@ -1102,7 +1102,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
procEx |= createProcExtendMask(&damageInfo, missInfo);
// Do triggers for unit (reflect triggers passed on hit phase for correct drop charge)
if (canEffectTrigger && missInfo != SPELL_MISS_REFLECT)
- caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo);
+ caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
}
if( !m_caster->IsFriendlyTo(unit) && !IsPositiveSpell(m_spellInfo->Id))
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index a3f1a637f9a..5ce8ec41f32 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -502,7 +502,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_PRIEST:
{
// Shadow Word: Death - deals damage equal to damage done to caster
- if ((m_spellInfo->SpellFamilyFlags[1] & 0x2 )&& m_damage < unitTarget->GetHealth())
+ if ((m_spellInfo->SpellFamilyFlags[1] & 0x2 ))
m_caster->CastCustomSpell(m_caster, 32409, &damage, 0, 0, true);
break;
}
@@ -4850,7 +4850,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, spellId, true);
break;
}
- //5,000 Gold
+ // 5,000 Gold
case 46642:
{
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
@@ -4860,6 +4860,17 @@ void Spell::EffectScriptEffect(uint32 effIndex)
break;
}
+ // Vigilance
+ case 50725:
+ {
+ if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ // Remove Taunt cooldown
+ ((Player*)unitTarget)->RemoveSpellCooldown(355, true);
+
+ return;
+ }
// Emblazon Runeblade
case 51770:
{
@@ -5194,7 +5205,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
switch (iter->first)
{
- // Seal of light, wisdom, justice
+ // Seal of light, Seal of wisdom, Seal of justice
case 20165:
case 20166:
case 20164:
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;
diff --git a/src/game/Unit.h b/src/game/Unit.h
index b22902ba40b..35f4ef1763b 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1080,8 +1080,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void Kill(Unit *pVictim, bool durabilityLoss = true);
int32 DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellProto, bool critical = false);
- void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL);
- void ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage );
+ void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL, SpellEntry const * procAura = NULL);
+ void ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage , SpellEntry const * procAura = NULL);
void HandleEmoteCommand(uint32 anim_id);
void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false );