*Fix demonic circle - original patch by Astellar
--HG-- branch : trunk
This commit is contained in:
@@ -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_ROOT,apply);
|
||||||
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_DECREASE_SPEED,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
|
//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();
|
SpellEntry const*spell = GetSpellProto();
|
||||||
switch( spell->SpellFamilyName)
|
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:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
// Explosive Shot
|
// Explosive Shot
|
||||||
@@ -6614,6 +6647,20 @@ void AuraEffect::PeriodicDummyTick()
|
|||||||
}
|
}
|
||||||
break;
|
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,GetSpellMaxRangeForFriend(sSpellRangeStore.LookupEntry(goToCircleSpell->rangeIndex))))
|
||||||
|
m_target->SendAuraVisualForSelf(true,62388, 1);
|
||||||
|
else
|
||||||
|
m_target->SendAuraVisualForSelf(false,62388);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
{
|
{
|
||||||
switch (spell->Id)
|
switch (spell->Id)
|
||||||
@@ -6656,6 +6703,7 @@ void AuraEffect::PeriodicDummyTick()
|
|||||||
// Killing Spree
|
// Killing Spree
|
||||||
case 51690:
|
case 51690:
|
||||||
{
|
{
|
||||||
|
// TODO: this should use effect[1] of 51690
|
||||||
std::list<Unit*> targets;
|
std::list<Unit*> targets;
|
||||||
{
|
{
|
||||||
// eff_radius ==0
|
// eff_radius ==0
|
||||||
|
|||||||
@@ -5669,7 +5669,13 @@ void Spell::EffectSummonObject(uint32 i)
|
|||||||
if( m_caster )
|
if( m_caster )
|
||||||
obj = m_caster->GetMap()->GetGameObject(guid);
|
obj = m_caster->GetMap()->GetGameObject(guid);
|
||||||
|
|
||||||
if(obj) obj->Delete();
|
if(obj)
|
||||||
|
{
|
||||||
|
// Recast case - null spell id to make auras not be removed on object remove from world
|
||||||
|
if (m_spellInfo->Id == obj->GetSpellId())
|
||||||
|
obj->SetSpellId(0);
|
||||||
|
obj->Delete();
|
||||||
|
}
|
||||||
m_caster->m_ObjectSlot[slot] = 0;
|
m_caster->m_ObjectSlot[slot] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-1
@@ -3769,6 +3769,25 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_
|
|||||||
return modifier;
|
return modifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Unit::SendAuraVisualForSelf(bool apply, uint32 id, uint8 effmask)
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_AURA_UPDATE);
|
||||||
|
data.append(GetPackGUID());
|
||||||
|
// use always free 64+ slots
|
||||||
|
data << uint8(MAX_AURAS);
|
||||||
|
if (!apply)
|
||||||
|
{
|
||||||
|
data << uint32(0);
|
||||||
|
SendMessageToSet(&data, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
data << uint32(id);
|
||||||
|
data << uint8(AFLAG_CASTER | AFLAG_POSITIVE | effmask);
|
||||||
|
data << uint8(getLevel());
|
||||||
|
data << uint8(1);
|
||||||
|
SendMessageToSet(&data, true);
|
||||||
|
}
|
||||||
|
|
||||||
bool Unit::AddAura(Aura *Aur, bool handleEffects)
|
bool Unit::AddAura(Aura *Aur, bool handleEffects)
|
||||||
{
|
{
|
||||||
// aura doesn't apply effects-return
|
// aura doesn't apply effects-return
|
||||||
@@ -4285,6 +4304,9 @@ bool Unit::HasAura(uint32 spellId, uint64 caster) const
|
|||||||
//Special case for non existing spell
|
//Special case for non existing spell
|
||||||
if (spellId==61988)
|
if (spellId==61988)
|
||||||
return HasAura(61987, caster) || HasAura(25771, caster);
|
return HasAura(61987, caster) || HasAura(25771, caster);
|
||||||
|
// Demonic Circle - special aura for client
|
||||||
|
else if (spellId==62388)
|
||||||
|
return HasAura(48018, caster);
|
||||||
|
|
||||||
if (Aura * aur = GetAura(spellId, caster))
|
if (Aura * aur = GetAura(spellId, caster))
|
||||||
return true;
|
return true;
|
||||||
@@ -6088,7 +6110,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
{
|
{
|
||||||
if (pVictim->getPowerType() == POWER_MANA)
|
if (pVictim->getPowerType() == POWER_MANA)
|
||||||
{
|
{
|
||||||
// 2% of maximum mana
|
// 2% of base mana
|
||||||
basepoints0 = int32(pVictim->GetCreateMana() * 2 / 100);
|
basepoints0 = int32(pVictim->GetCreateMana() * 2 / 100);
|
||||||
pVictim->CastCustomSpell(pVictim, 20268, &basepoints0, NULL, NULL, true, 0, triggeredByAura);
|
pVictim->CastCustomSpell(pVictim, 20268, &basepoints0, NULL, NULL, true, 0, triggeredByAura);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1536,6 +1536,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
}
|
}
|
||||||
void SetVisibleAura(uint8 slot, Aura * aur){ m_visibleAuras[slot]=aur; }
|
void SetVisibleAura(uint8 slot, Aura * aur){ m_visibleAuras[slot]=aur; }
|
||||||
void RemoveVisibleAura(uint8 slot){ m_visibleAuras.erase(slot); }
|
void RemoveVisibleAura(uint8 slot){ m_visibleAuras.erase(slot); }
|
||||||
|
void SendAuraVisualForSelf(bool apply, uint32 id, uint8 effmask = 0);
|
||||||
|
|
||||||
AuraMap & GetAuras() { return m_Auras; }
|
AuraMap & GetAuras() { return m_Auras; }
|
||||||
AuraMap const& GetAuras() const { return m_Auras; }
|
AuraMap const& GetAuras() const { return m_Auras; }
|
||||||
|
|||||||
Reference in New Issue
Block a user