TrinityCore/TrinityCore — Issue #5225: [NPC // FIX] Uvuros
Author: IveticBG
Created: 2012-02-13 20:04:18+00:00
State: open

As you know Uvuros havent use any of his abilities this should fix it.

//########################
// Made by ##
// Accessorize ##
// NPC: Uvuros ##
// ##
//########################

#include "StdAfx.h"
#include "../Setup.h"
#include "../Base.h"

//Boss
#define Uvuros 21102

//Spells
#define TerrifyingRoar 37939
#define Rabid 53401
#define DoubleBreath 38361
#define Dash 61684

//Phase 1
#define Cleave 37476

class UvurosAI : public ArcScriptBossAI
{
ARCSCRIPT_FACTORY_FUNCTION(UvurosAI, ArcScriptBossAI);
UvurosAI(Creature* pCreature) : ArcScriptBossAI(pCreature)
{
AddSpell(TerrifyingRoar, Target_Current, 15, 0, 40);
AddSpell(Rabid, Target_RandomPlayer, 15, 1.5, 20);
AddSpell(DoubleBreath, Target_RandomPlayer, 15, 0, 20);
AddSpell(Dash, Target_ClosestPlayer, 20, 0, 16, 0, 0, false, "Getting warm isnt it?", Text_Yell, 10290);
AddSpell(TerrifyingRoar, Target_Current, 10, 0, 2);

AddEmote(Event_OnCombatStart, "Welcome, and prepare to die!", Text_Yell, 10289);
AddEmote(Event_OnTargetDied, "ASH! That's your friend now!", Text_Yell, 11250);
AddEmote(Event_OnTargetDied, "Another one bites the dust!", Text_Yell, 11252);
AddEmote(Event_OnDied, "You did it...I will be back...Gaah..", Text_Yell, 10291);
}

void AIUpdate()
{
if(GetHealthPercent()<=60)//phase 1
{
AddSpell(Cleave, Target_SecondMostHated, 90, 0, 20);
}

if(GetHealthPercent()<=20)//phase 2
{
AddSpell(Cleave, Target_RandomPlayer, 90, 0, 20);
}
ParentClass::AIUpdate();
ParentClass::AIUpdate();
}
};

void SetupWorldBoss(ScriptMgr* pScriptMgr)
{
pScriptMgr->register_creature_script(Uvuros, &UvurosAI::Create);
}

Let me know if anything is wrong.