Guest User

Untitled

a guest
Jun 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. enum spell
  2. {
  3. SPELL_DEVIMATE = 71123,
  4. SPELL_WOUND = 71127,
  5. SPELL_STRENCH = 71805,
  6. }
  7.  
  8. /*
  9. struct MANGOS_DLL_DECL mob_stinkyAI : public ScriptedAI
  10. {
  11. mob_stinkyAI(Creature* pCreature) : ScriptedAI(pCreature)
  12. {
  13. Reset();
  14. }
  15.  
  16. ScriptedInstance* m_pInstance;
  17.  
  18. uint32 m_uiDecimate;
  19. uint32 m_uiWound;
  20.  
  21. void Reset()
  22. {
  23. m_uiDecimate = 45000;
  24. m_uiWound = 14000;
  25.  
  26. DoCastSpellIfCan(m_creature, SPELL_STRENCH);
  27. }
  28.  
  29. void UpdateAI(const uint32 uiDiff)
  30. {
  31. if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
  32. return;
  33.  
  34. if(m_uiDecimate < uiDiff)
  35. {
  36. DoCastSpellIfCan(m_creature->getVictim(), SPELL_DECIMATE);
  37. m_uiDecimate = 45000;
  38. }else m_uiDecimate -= uiDiff;
  39.  
  40. if( m_uiWound < uiDiff)
  41. {
  42. DoCastSpellIfCan(m_creature->getVictim(), SPELL_WOUND);
  43. m_uiWound = 14000;
  44. }else m_uiWound -= uiDiff;
  45.  
  46. DoMeleeAttackIfReady();
  47. }
  48. };
Add Comment
Please, Sign In to add comment