mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 13:37:13 +00:00
[11887] Fix spell targeting for pet spells with target-type (0,0)
Also some style improvements Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
d1a45fed71
commit
df9e0ebf6a
2 changed files with 9 additions and 6 deletions
|
|
@ -471,11 +471,14 @@ void Spell::FillTargetMap()
|
|||
// but need it support in some know cases
|
||||
switch(m_spellInfo->EffectImplicitTargetA[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
SetTargetMap(SpellEffectIndex(i), TARGET_EFFECT_SELECT, tmpUnitMap);
|
||||
case TARGET_NONE:
|
||||
if (m_caster->GetObjectGuid().IsPet())
|
||||
SetTargetMap(SpellEffectIndex(i), TARGET_SELF, tmpUnitMap);
|
||||
else
|
||||
SetTargetMap(SpellEffectIndex(i), TARGET_EFFECT_SELECT, tmpUnitMap);
|
||||
break;
|
||||
default:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitMap);
|
||||
|
|
@ -485,7 +488,7 @@ void Spell::FillTargetMap()
|
|||
case TARGET_SELF:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
case TARGET_EFFECT_SELECT:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitMap);
|
||||
break;
|
||||
|
|
@ -506,7 +509,7 @@ void Spell::FillTargetMap()
|
|||
case TARGET_EFFECT_SELECT:
|
||||
switch(m_spellInfo->EffectImplicitTargetB[i])
|
||||
{
|
||||
case 0:
|
||||
case TARGET_NONE:
|
||||
case TARGET_EFFECT_SELECT:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitMap);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11886"
|
||||
#define REVISION_NR "11887"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue