Advertisement
Guest User

Untitled

a guest
May 24th, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. case SPELLFAMILY_WARLOCK:
  2. {
  3. switch (m_spellInfo->Id)
  4. {
  5. // Spell Lock
  6. case 19647:
  7. {
  8. if (!unitTarget)
  9. return;
  10.  
  11. // Copia de SpellEffects::EffectInterruptCast
  12. for ( uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
  13. {
  14. if (Spell* spell = unitTarget->GetCurrentSpell(CurrentSpellTypes(i)))
  15. {
  16. SpellInfo const* curSpellInfo = spell->m_spellInfo;
  17.  
  18. if ((Spell->getState() == SPELL_STATE_CASTING
  19. || (spell->getState() == SPELL_STATE_PREPARING && spell->CalcCastTime() > 0.0f))
  20. && curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
  21. {
  22. if (m_originalCaster)
  23. {
  24. // Agregamos un cd de 6 segundos a esa escuela de magia
  25. unitTarget->ProhibitSpellSchool(curSpellInfo->GetSchoolMask(), 6000);
  26. }
  27. }
  28. }
  29. }
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement