gerripeach

Plebs
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About gerripeach

  • Rank
    Newbie
  1. Adding this to Unit.h/Unit.cpp will do the Job... void CastWithDelay(uint32 delay, Unit* victim, uint32 spellId, bool triggered, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, ObjectGuid originalCaster = ObjectGuid::Empty); void Unit::CastWithDelay(uint32 delay, Unit* victim, uint32 spellId, bool triggered, Item* castItem, AuraEffect const* triggeredByAura, ObjectGuid originalCaster) { class DelayCastEvent : public BasicEvent { public: DelayCastEvent(Unit *caster, Unit* victim, uint32 spellId, bool triggered, Item* castItem, AuraEffect const* triggeredByAura, ObjectGuid originalCaster) : BasicEvent(), _caster(caster), _victim(victim), _spellId(spellId), _triggered(triggered), _castItem(castItem), _triggeredByAura(triggeredByAura), _originalCaster(originalCaster) { ; } bool Execute(uint64, uint32) { _caster->CastSpell(_victim, _spellId, _triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE, _castItem, _triggeredByAura, _originalCaster); return true; } private: Unit *_caster; Unit *_victim; uint32 _spellId; bool _triggered; Item *_castItem; AuraEffect const* _triggeredByAura; ObjectGuid _originalCaster; }; m_Events.AddEvent(new DelayCastEvent(this, victim, spellId, triggered, castItem, triggeredByAura, originalCaster), m_Events.CalculateTime(delay)); }