aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Unit
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-10-26 14:39:00 +0200
committerShauren <shauren.trinity@gmail.com>2013-10-26 14:39:00 +0200
commitb81bf7d0250939ee96b942f554c16d950f06c7b1 (patch)
tree2d161702e541dbba3acd420f8315801043c2bb03 /src/server/game/Entities/Unit
parentdaf5a4b5c33ee56abfbaf6bbd1a91dd27a45aeec (diff)
Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast
Diffstat (limited to 'src/server/game/Entities/Unit')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index c3a611c441f..ef6d9b9edef 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4838,7 +4838,7 @@ void Unit::AddGameObject(GameObject* gameObj)
{
SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(gameObj->GetSpellId());
// Need disable spell use for owner
- if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (createBySpell && createBySpell->IsCooldownStartedOnEvent())
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases)
ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, NULL, true);
}
@@ -4869,7 +4869,7 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
{
SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(spellid);
// Need activate spell use for owner
- if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (createBySpell && createBySpell->IsCooldownStartedOnEvent())
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases)
ToPlayer()->SendCooldownEvent(createBySpell);
}
@@ -9382,7 +9382,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
// Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL));
- if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE))
+ if (spellInfo && (spellInfo->IsCooldownStartedOnEvent()))
ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, NULL, true);
}
}
@@ -9424,7 +9424,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL));
// Remove infinity cooldown
- if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE))
+ if (spellInfo && (spellInfo->IsCooldownStartedOnEvent()))
ToPlayer()->SendCooldownEvent(spellInfo);
}
@@ -10546,7 +10546,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
break;
}
// Exorcism
- else if (spellProto->Category == 19)
+ else if (spellProto->GetCategory() == 19)
{
if (victim->GetCreatureTypeMask() & CREATURE_TYPEMASK_DEMON_OR_UNDEAD)
return true;