What bug does the patch fix? What features does the patch add?
warlock's Demonic Circle
For which repository revision was the patch created?
works on 8360
Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.
--
Who has been writing this patch? Please include either forum user names or email addresses.
dont really remember the guys name, it might be TortoiseUDiff, not sure
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index da6f652..5b66b7e 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -571,6 +571,9 @@ void Spell::FillTargetMap()
break;
}
break;
+ case TARGET_AREAEFFECT_CUSTOM:
+ // We MUST select custom target. May be some SetCustomTargetMap(i, tmpUnitMap)
+ break;
default:
switch(m_spellInfo->EffectImplicitTargetB[i])
{
@@ -1447,6 +1450,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
case TARGET_AREAEFFECT_CUSTOM:
case TARGET_AREAEFFECT_CUSTOM_2:
case TARGET_SUMMON:
+ case TARGET_EFFECT_SELECT:
TagUnitMap.push_back(m_caster);
break;
case TARGET_RANDOM_ENEMY_CHAIN_IN_AREA:
@@ -3731,7 +3735,9 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_CASTER_AURASTATE;
// Caster aura req check if need
- if(m_spellInfo->casterAuraSpell && !m_caster->HasAura(m_spellInfo->casterAuraSpell))
+ if(m_spellInfo->casterAuraSpell &&
+ sSpellStore.LookupEntry(m_spellInfo->casterAuraSpell) &&
+ !m_caster->HasAura(m_spellInfo->casterAuraSpell))
return SPELL_FAILED_CASTER_AURASTATE;
if(m_spellInfo->excludeCasterAuraSpell)
{
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 2dd62f9..51253d6 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1147,6 +1147,38 @@ void Aura::_RemoveAura()
return true;
}
+void Aura::SendFakeAuraUpdate(uint32 auraId, bool remove)
+{
+ WorldPacket data(SMSG_AURA_UPDATE);
+ data.append(m_target->GetPackGUID());
+ data << uint8(64);
+ data << uint32(remove ? 0 : auraId);
+
+ if(remove)
+ {
+ m_target->SendMessageToSet(&data, true);
+ return;
+ }
+
+ uint8 auraFlags = GetAuraFlags();
+ data << uint8(auraFlags);
+ data << uint8(GetAuraLevel());
+ data << uint8(m_procCharges ? m_procCharges : m_stackAmount);
+
+ if(!(auraFlags & AFLAG_NOT_CASTER))
+ {
+ data << uint8(0); // pguid
+ }
+
+ if(auraFlags & AFLAG_DURATION)
+ {
+ data << uint32(GetAuraMaxDuration());
+ data << uint32(GetAuraDuration());
+ }
+
+ m_target->SendMessageToSet(&data, true);
+}
+
void Aura::SendAuraUpdate(bool remove)
{
WorldPacket data(SMSG_AURA_UPDATE);
@@ -4062,6 +4094,18 @@ void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,misc,apply);
+ // Demonic Circle
+ if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && GetSpellProto()->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());
+ }
+ }
// Bestial Wrath
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_HUNTER && GetSpellProto()->SpellIconID == 1680)
{
@@ -4282,6 +4326,21 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
}
break;
}
+ case SPELLFAMILY_WARLOCK:
+ {
+ switch (spell->Id)
+ {
+ case 48018:
+ if (apply)
+ SendFakeAuraUpdate(62388,false);
+ else
+ {
+ m_target->RemoveGameObject(spell->Id,true);
+ SendFakeAuraUpdate(62388,true);
+ }
+ break;
+ }
+ }
case SPELLFAMILY_HUNTER:
{
// Explosive Shot
@@ -6747,6 +6806,20 @@ void Aura::PeriodicDummyTick()
}
break;
}
+ case SPELLFAMILY_WARLOCK:
+ switch (spell->Id)
+ {
+ 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,GetSpellMaxRange(sSpellRangeStore.LookupEntry(goToCircleSpell->rangeIndex))))
+ SendFakeAuraUpdate(62388,false);
+ else
+ SendFakeAuraUpdate(62388,true);
+ }
+ break;
case SPELLFAMILY_ROGUE:
{
switch (spell->Id)
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index a691c75..536cf2e 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -274,6 +274,7 @@ class MANGOS_DLL_SPEC Aura
void SetAura(bool remove) { m_target->SetVisibleAura(m_auraSlot, remove ? 0 : GetId()); }
void SendAuraUpdate(bool remove);
+ void SendFakeAuraUpdate(uint32 auraId, bool remove);
int8 GetStackAmount() {return m_stackAmount;}
void SetStackAmount(uint8 num);
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index c1cfd68..f606453 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5814,7 +5814,7 @@ void Spell::EffectSummonObject(uint32 i)
if(uint64 guid = m_caster->m_ObjectSlot[slot])
{
if(GameObject* obj = m_caster ? m_caster->GetMap()->GetGameObject(guid) : NULL)
- obj->SetLootState(GO_JUST_DEACTIVATED);
+ if(obj) m_caster->RemoveGameObject(obj,true);
m_caster->m_ObjectSlot[slot] = 0;
}