mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[9478] Reimplement Aura::IsNeedVisibleSlot
Rewrite base at area aura type check * For positive area aura types show at non-caster target or caster-totem or non-passive aura at caster * For negative area aura show at non-caster target * For other auars show at any target if non passive auras or totem-caster
This commit is contained in:
parent
9a51a65b47
commit
e05f4b1b03
2 changed files with 13 additions and 15 deletions
|
|
@ -945,26 +945,24 @@ bool Aura::IsNeedVisibleSlot(Unit const* caster) const
|
||||||
{
|
{
|
||||||
bool totemAura = caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem();
|
bool totemAura = caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem();
|
||||||
|
|
||||||
// passive auras (except totem auras) do not get placed in the slots
|
// special area auras cases
|
||||||
if (m_isPassive && !totemAura)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// generic not caster case
|
|
||||||
if (m_target != caster)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// special area auras case at caster
|
|
||||||
switch(m_spellProto->Effect[GetEffIndex()])
|
switch(m_spellProto->Effect[GetEffIndex()])
|
||||||
{
|
{
|
||||||
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
|
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
|
||||||
return false;
|
return m_target != caster;
|
||||||
|
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
|
||||||
|
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
|
||||||
|
case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
|
||||||
|
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
||||||
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
|
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
|
||||||
// not sure is totemAura need, just preserve old code results
|
// passive auras (except totem auras) do not get placed in caster slot
|
||||||
return totemAura || m_modifier.m_auraname != SPELL_AURA_NONE;
|
return (m_target != caster || totemAura || !m_isPassive) && m_modifier.m_auraname != SPELL_AURA_NONE;
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
// passive auras (except totem auras) do not get placed in the slots
|
||||||
|
return !m_isPassive || totemAura;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::_AddAura()
|
void Aura::_AddAura()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9477"
|
#define REVISION_NR "9478"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue