Jump to content

[one] pet aoe spells


Guest anti-freak

Recommended Posts

What bug does the patch fix? What features does the patch add?

I have a problem to cast a aoe spell from a possed pet. I usually recive the message "unvalid target", so I did some core research and find out, that aoe spells which are casted on caster itself, cannot be completed.

So I try to fix that problem and find a solution.

The spell I have problems with is this.

feel free to complete the if cases.

For which repository revision was the patch created?

s1327

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

no

Who has been writing this patch? Please include either forum user names or email addresses.

me

[== c++ ==]
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 3b21888..6738973 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5011,12 +5011,16 @@ SpellCastResult Spell::CheckPetCast(Unit* target) else { bool duelvsplayertar = false; + bool bIsAOESpell = false; for(int j = 0; j < MAX_EFFECT_INDEX; ++j) { //TARGET_DUELVSPLAYER is positive AND negative duelvsplayertar |= (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DUELVSPLAYER); + // ToDo: add here more ImplicitTargets + if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) + bIsAOESpell |= true; } - if(m_caster->IsFriendlyTo(target) && !duelvsplayertar) + if(m_caster->IsFriendlyTo(target) && !duelvsplayertar && !bIsAOESpell) { return SPELL_FAILED_BAD_TARGETS; }

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use