Jump to content

How to check if player has a talent ?


Guest Siegels

Recommended Posts

Hi,

I want to work on some talents but, i don't know how to check if player has talent or not.

For example :

//if has talent 54037 (or rank 2 54038) : dummy aura: 54425
if (/* What here ? */)
m_caster->SetPower(POWER_MANA,m_caster->GetPower(POWER_MANA)+m_caster->GetMaxPower(POWER_MANA)*4/100);
else if(/* What here to check rank 2?*/)
m_caster->SetPower(POWER_MANA,m_caster->GetPower(POWER_MANA)+m_caster->GetMaxPower(POWER_MANA)*8/100);

I tried too with dummy aura :

if (Aura* talent = owner->GetDummyAura(54425))
                       m_caster->SetPower(POWER_MANA,m_caster->GetPower(POWER_MANA)+m_caster->GetMaxPower(POWER_MANA)*talent->GetModifier()->m_amount/100);

Those examples are for talent http://fr.wowhead.com/spell=54037 and http://fr.wowhead.com/spell=54038. It must modify spell Shadow bite.

Any Idea ?

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