aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-06 20:13:01 -0500
committermegamage <none@none>2009-06-06 20:13:01 -0500
commit54d3b86ffa2a650e08cc9dfda45895c97ba30b26 (patch)
tree52c59d9a6829039c3bbb85438674a8ca2e9837b7 /src/game/SpellAuras.cpp
parentd3d4c76976a40ca9a741efb0da338483ad82c726 (diff)
parentf505101d8f796c638f50635b522b44fb8c40ddce (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c87fc9b89fc..b6c44b8cc60 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4335,6 +4335,18 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_ROOT,apply);
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_DECREASE_SPEED,apply);
}
+ // Demonic Circle
+ else if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellIconID == 3221)
+ {
+ if (m_target->GetTypeId() != TYPEID_PLAYER)
+ return;
+ if (apply)
+ {
+ GameObject* obj = m_target->GetGameObject(48018);
+ if (obj)
+ ((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
+ }
+ }
}
//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect
@@ -4491,6 +4503,27 @@ void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real, bool changeAmoun
SpellEntry const*spell = GetSpellProto();
switch( spell->SpellFamilyName)
{
+ case SPELLFAMILY_WARLOCK:
+ {
+ switch (spell->Id)
+ {
+ // Demonic Circle
+ case 48018:
+ if (apply)
+ // set to false at initial cast to enable button at next enable in periodic handler
+ m_target->SendAuraVisualForSelf(false,62388);
+ else
+ {
+ // Do not remove GO when aura is removed by stack
+ // to prevent remove GO added by new spell
+ // old one is already removed
+ if (GetParentAura()->GetRemoveMode()!=AURA_REMOVE_BY_STACK)
+ m_target->RemoveGameObject(spell->Id,true);
+ m_target->SendAuraVisualForSelf(false,62388);
+ }
+ break;
+ }
+ }
case SPELLFAMILY_HUNTER:
{
// Explosive Shot
@@ -6614,6 +6647,21 @@ void AuraEffect::PeriodicDummyTick()
}
break;
}
+ case SPELLFAMILY_WARLOCK:
+ switch (spell->Id)
+ {
+ // Demonic Circle
+ case 48018:
+ GameObject* obj = m_target->GetGameObject(spell->Id);
+ if (!obj) return;
+ // We must take a range of teleport spell, not summon.
+ const SpellEntry* goToCircleSpell = sSpellStore.LookupEntry(48020);
+ if (m_target->IsWithinDist(obj,GetSpellMaxRangeForFriend(sSpellRangeStore.LookupEntry(goToCircleSpell->rangeIndex))))
+ m_target->SendAuraVisualForSelf(true,62388, 1);
+ else
+ m_target->SendAuraVisualForSelf(false,62388);
+ }
+ break;
case SPELLFAMILY_DRUID:
{
switch (spell->Id)
@@ -6656,6 +6704,7 @@ void AuraEffect::PeriodicDummyTick()
// Killing Spree
case 51690:
{
+ // TODO: this should use effect[1] of 51690
std::list<Unit*> targets;
{
// eff_radius ==0