Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum spell
- {
- SPELL_DEVIMATE = 71123,
- SPELL_WOUND = 71127,
- SPELL_STRENCH = 71805,
- }
- /*
- struct MANGOS_DLL_DECL mob_stinkyAI : public ScriptedAI
- {
- mob_stinkyAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- }
- ScriptedInstance* m_pInstance;
- uint32 m_uiDecimate;
- uint32 m_uiWound;
- void Reset()
- {
- m_uiDecimate = 45000;
- m_uiWound = 14000;
- DoCastSpellIfCan(m_creature, SPELL_STRENCH);
- }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
- return;
- if(m_uiDecimate < uiDiff)
- {
- DoCastSpellIfCan(m_creature->getVictim(), SPELL_DECIMATE);
- m_uiDecimate = 45000;
- }else m_uiDecimate -= uiDiff;
- if( m_uiWound < uiDiff)
- {
- DoCastSpellIfCan(m_creature->getVictim(), SPELL_WOUND);
- m_uiWound = 14000;
- }else m_uiWound -= uiDiff;
- DoMeleeAttackIfReady();
- }
- };
Add Comment
Please, Sign In to add comment