• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

World bosses HP bug

q8rakan

Emulation Addict
Hello guys , i am having a problem with my fun server i get a world boss with 2000m when i attack him than i die the mob regenerate his hp than he dies and repsawn the same time any idea how to fix that?

here is a simple pictures

orginal hp
kSJuRsv.png


when i die

vpimtqw.png
 
Last edited:

Tommy

Founder
I'm not understanding the issue here. You are showing two screenshots, one with full HP and the other below half HP. Are you the only one attacking him? When you die and he isn't in combat with another player then he will leave combat and regenerate his health. What do you mean by "he dies"? Can you elaborate?
 

q8rakan

Emulation Addict
I'm not understanding the issue here. You are showing two screenshots, one with full HP and the other below half HP. Are you the only one attacking him? When you die and he isn't in combat with another player then he will leave combat and regenerate his health. What do you mean by "he dies"? Can you elaborate?
Well i mean when i attack the boss and i leave the combat or die the boss will reset but when he reset he will die and respawn at the same time without attacking him like a loop
 

Vitrex

Moderator
Well i mean when i attack the boss and i leave the combat or die the boss will reset but when he reset he will die and respawn at the same time without attacking him like a loop
wait what? if i only could understand your issue man... i would like to help.
Do you mean when you die or getting out of combat of that boss he dies
then he re spawns with only half hp like you showed in screenshot?
 

q8rakan

Emulation Addict
wait what? if i only could understand your issue man... i would like to help.
Do you mean when you die or getting out of combat of that boss he dies
then he re spawns with only half hp like you showed in screenshot?

Yup xD
 

Vitrex

Moderator
it uses any smart script or custom script you create/downloaded ?

You can check it in creature_template table under ScriptName column
 

Vitrex

Moderator
so show us that script. you wanna get support, but you don't provide enough information for us... how we can say what is wrong if you don't tell us that boss using custom script and you hiding that script...
No offence, but people now-days don't even know how to ask for support...
 

q8rakan

Emulation Addict
so show us that script. you wanna get support, but you don't provide enough information for us... how we can say what is wrong if you don't tell us that boss using custom script and you hiding that script...
No offence, but people now-days don't even know how to ask for support...

well i have removed the script and still having the problem event i edited the script and i didnt know that the script may case this problem .

here is the script

Code:
#include "ScriptMgr.h"
#include "Creature.h"
#include "CreatureAI.h"
#include "ScriptedCreature.h"

enum Spells
{
	SPELL_VoidStrike = 91021,
	SPELL_VoidBlast = 91020,
	SPELL_VoidBolt = 91022,
	SPELL_ShadowZone = 91023,
	SPELL_berserk = 45078,
};


enum Events
{
	EVENT_VoidStrike = 1,
	EVENT_VoidBlast = 2,
	EVENT_ShadowZone = 3,
	EVENT_VoidBolt = 4,
	EVENT_Berserk = 5,


};


class WorldBoss_TheVoid : public CreatureScript
{
public:
	WorldBoss_TheVoid() : CreatureScript("WorldBoss_TheVoid") { }

	struct WorldBoss_TheVoidAI : public BossAI
	{
		WorldBoss_TheVoidAI(Creature* creature) : BossAI(creature, 0)
		{
		}

		void Reset() override
		{
			events.Reset();
		}

		void EnterCombat(Unit* /*who*/) override
		{

			events.ScheduleEvent(EVENT_VoidStrike, 8000);
			events.ScheduleEvent(EVENT_VoidBlast, 15000);
			events.ScheduleEvent(EVENT_ShadowZone, 54000);
			events.ScheduleEvent(EVENT_VoidBolt, 12000);
			events.ScheduleEvent(EVENT_Berserk, 600000);

		}

		void UpdateAI(uint32 diff) override
		{
			if (!UpdateVictim())
				return;

			events.Update(diff);

			if (me->HasUnitState(UNIT_STATE_CASTING))
				return;


			while (uint32 eventId = events.ExecuteEvent())
			{
				switch (eventId)
				{
					//phase 1
				case EVENT_VoidStrike:
					DoCastVictim(SPELL_VoidStrike);
					events.ScheduleEvent(EVENT_VoidStrike, 18000);
					break;
				case EVENT_VoidBlast:
					DoCastVictim(SPELL_VoidBlast);
					events.ScheduleEvent(EVENT_VoidBlast, 42000);
					break;
				case EVENT_VoidBolt:
					DoCastVictim(SPELL_VoidBolt);
					events.ScheduleEvent(EVENT_VoidBolt, 30000);
					break;					
				case EVENT_ShadowZone:
					if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 0))
					DoCastVictim(SPELL_ShadowZone);
					events.ScheduleEvent(EVENT_ShadowZone, 54000);
					break;
				case EVENT_Berserk:
					DoCast(me, SPELL_berserk);
					events.ScheduleEvent(EVENT_Berserk, 600000);
					break;
				default:
					break;
				}
			}

			DoMeleeAttackIfReady();
		}
	};

	CreatureAI* GetAI(Creature* creature) const override
	{
		return new WorldBoss_TheVoidAI(creature);
	}
};

void AddSC_WorldBoss_TheVoid()
{
	new WorldBoss_TheVoid();
}
 

Vitrex

Moderator
So you said you have same problem after script remove, right? have you tried delete npc and spawn him again after you deleted the script?
 

q8rakan

Emulation Addict
So you said you have same problem after script remove, right? have you tried delete npc and spawn him again after you deleted the script?

i just added a line in the script

i changed the reset from

event.reset();

to
Code:
		void Reset() override
		{
			me->SetFullHealth();
		}

and than the bug gone when the boss reset he gets the full health. :)
 
Top