View Full Version : [SOLVED] [Spell Fix] [Camouflage] Logic Problem

01-16-2015, 11:39 AM
Hey there !

So i'm having a problem with my logic. the spell http://www.wowhead.com/spell=51753/camouflage#comments
i'm trying to fix this part : You and your pet blend into your surroundings, becoming untargetable by ranged attacks.
the problem is you can still attack the guy / target
So what i'm trying todo it's aborting the fact that player is casting a spell on the hunter when he got this aura
this is my how i handle it

if (range_type == SPELL_RANGE_RANGED && !target->IsFriendlyTo(m_caster))
if (m_caster)
if (target->HasAura(51755))

it's working but atm the problem is : it's not doing it the good way
Hunter can't attack opponent & opponent can attack the hunter.
and i can't find a way to do the opposite.
any idea how i could do it ?

01-16-2015, 12:00 PM
forgot to say i'm adding this to SpellCastResult Spell::CheckRange(bool strict) in spell.cpp

01-16-2015, 01:26 PM
Nevermind got fixed. someone can close the issue.