View Full Version : [SOLVED] c++ boss script restart hp at changing phase

01-21-2015, 10:33 AM
Well i would like to know if there is a way to restore boss HP when he is changing phase based on a variable something like

if (events.IsInPhase(1) && HealthBelowPct(50))
if (reset_hp !=10)
me->SetHealth(me->GetMaxHealth()); <- obviously this don't work ....
events.ScheduleEvent(EVENT_AQUA_BLAST, 10000, 0, 2);
events.ScheduleEvent(EVENT_SPAWN_NAGA, 25000, 0, 2);

reset_hp -> uint32 reset_hp=0; <-on boss script
on justdied -> reset_hp=0;

it lool like that SetHealth and SetMaxHealth just change boss health value in Database or something
i was also thinking to keep the buff Ubber Heal Over Time for few minutes until boss will spawn few adds so players will have to fight a bit then come back .... but i would like to use the healthpct annyway to avoid bugging it with buffs

EDIT: NVM i forgot about SetFullHealth :)