Advertisement
siewdass

Wow Autoattack

May 27th, 2025 (edited)
674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.47 KB | None | 0 0
  1. // in "void Unit::_UpdateAutoRepeatSpell("
  2.  
  3. // replace "if ((GetTypeId() == TYPEID_PLAYER && ToPlayer()->isMoving()) || IsNonMeleeSpellCast(false, false, true, autoRepeatSpellInfo->Id == 75))"
  4. if ((GetTypeId() == TYPEID_PLAYER && ToPlayer()->isMoving()) || IsNonMeleeSpellCast(false, false, true, (autoRepeatSpellInfo->Id == 75 || autoRepeatSpellInfo->Id == 5019 || autoRepeatSpellInfo->Id == 2764)))
  5.  
  6. // replace "if (autoRepeatSpellInfo->Id != 75)"
  7. if (autoRepeatSpellInfo->Id != 75 && autoRepeatSpellInfo->Id != 5019 && autoRepeatSpellInfo->Id != 2764)
  8.  
  9. // replace "if (m_AutoRepeatFirstCast && getAttackTimer(RANGED_ATTACK) < 500 && autoRepeatSpellInfo->Id != 75)"
  10. if (m_AutoRepeatFirstCast && getAttackTimer(RANGED_ATTACK) < 1000)
  11.  
  12. // replace "setAttackTimer(RANGED_ATTACK, 500);"
  13. setAttackTimer(RANGED_ATTACK, 1000);
  14.    
  15. // replace "if (autoRepeatSpellInfo->Id != 75)"
  16. if (autoRepeatSpellInfo->Id != 75 && autoRepeatSpellInfo->Id != 5019 && autoRepeatSpellInfo->Id != 2764)
  17.  
  18. // replace "if (!IsNonMeleeSpellCast(false, false, true, autoRepeatSpellInfo->Id == 75))"
  19. if (!IsNonMeleeSpellCast(false, false, true, (autoRepeatSpellInfo->Id == 75 || autoRepeatSpellInfo->Id == 5019 || autoRepeatSpellInfo->Id == 2764)))
  20.  
  21. /* ------------------------------------------------------- */
  22.  
  23. // in "void Unit::SetCurrentCastSpell("
  24.  
  25. // replace "if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 75)"
  26. if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 75 && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 5019 && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 2764)
  27.  
  28. // replace "if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 75)"
  29. if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 75 && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 5019 && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->GetSpellInfo()->Id != 2764)
  30.  
  31. // replace "if (pSpell->GetSpellInfo()->Id != 75)"
  32. if (pSpell->GetSpellInfo()->Id != 75 && pSpell->GetSpellInfo()->Id != 5019 && pSpell->GetSpellInfo()->Id != 2764)
  33.  
  34. /* ------------------------------------------------------- */
  35.  
  36. // in "void Unit::InterruptSpell("
  37.  
  38. // after "if (!spell->IsInterruptable())"
  39. if ((spell->m_spellInfo->Id == 5019 || spell->m_spellInfo->Id == 2764) && result == SPELL_FAILED_SPELL_IN_PROGRESS)
  40. {
  41.     spell->cancel(SPELL_FAILED_DONT_REPORT);
  42.     return;
  43. }
  44.  
  45. /* ------------------------------------------------------- */
  46.  
  47. // in "SpellCastResult Spell::prepare("
  48.  
  49. // replace "if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->ToUnit() && m_caster->ToUnit()->IsNonMeleeSpellCast(false, true, true, m_spellInfo->Id == 75) && m_cast_count)"
  50. if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->ToUnit() && m_caster->ToUnit()->IsNonMeleeSpellCast(false, true, true, m_spellInfo->Id == 75 || m_spellInfo->Id == 5019) && m_cast_count && m_spellInfo->Id != 5019)
  51.  
  52. /* ------------------------------------------------------- */
  53.  
  54. // in "SpellCastResult Spell::CheckCast("
  55.  
  56. // replace "if (strict && !(_triggeredCastFlags & TRIGGERED_IGNORE_GCD) && HasGlobalCooldown())"
  57. if (strict && !(_triggeredCastFlags & TRIGGERED_IGNORE_GCD) && HasGlobalCooldown() && m_spellInfo->Id != 5019)
  58.  
  59. /* ------------------------------------------------------- */
  60.  
  61. // in "void Spell::SendCastResult("
  62.  
  63. // after "if (result == SPELL_CAST_OK)"
  64. if (spellInfo->Id == 5019) return;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement