Jump to content

[question] Spell Trigger


Guest webomatic

Recommended Posts

I was wondering how can I make a spell use an object in the map as a trigger in order for the spell to be successful.

For example:

(in SpellEffects.cpp)

case 12345:
               {
                       if(m_caster->GetTypeId()!=TYPEID_PLAYER)
                               return;

                       uint32 spell_id = 12345;

                       m_caster->CastSpell(m_caster,spell_id,true,NULL);
                       return;
               }

This basically has no external checks....I would like to add a check (iterator maybe?) for a nearby object or creature from player's current XYZ position and if so then spell will be executed successfully.

Can anyone either point me out to a similar function or help me create this one please?

Thank you very much

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