Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2003, 04:50 PM
r2d2atemyhomework
Fire Beetle
 
Join Date: Dec 2003
Posts: 10
Default Here's a fix for 5.3DR2 Mob Healthbar not updating in client

The problem with the mob healthbar was that, the SpawnHPUpdate packets are no longer different. The mob packet is the same as the client packet now. Replace the Mob::CreateHPPacket in mob.cpp with the code below and it will work:

Code:
void Mob::CreateHPPacket(APPLAYER* app)
{
	this->IsFullHP=(cur_hp>=max_hp);

	app->opcode = OP_HPUpdate;
	app->size = sizeof(SpawnHPUpdate_Struct);
	app->pBuffer = new uchar[app->size];
	memset(app->pBuffer, 0, sizeof(SpawnHPUpdate_Struct));
	SpawnHPUpdate_Struct* ds = (SpawnHPUpdate_Struct*)app->pBuffer;
	ds->spawn_id = GetID();
	
	if(IsClient())
	{
		ds->max_hp=max_hp;
		ds->cur_hp=GetHP()-itembonuses->HP;
		ds->cur_hp=ds->cur_hp>30000?30000:ds->cur_hp;
	}
	else
	{
		ds->cur_hp=IsNPC()?(sint32)GetHPRatio():cur_hp;
		ds->max_hp=100;
	}
}
I haven't extensively tested this, but the healthbar was working on all the mobs I attacked. Merry Christmas.
Reply With Quote
  #2  
Old 12-27-2003, 09:13 AM
voetsek
Sarnak
 
Join Date: Dec 2003
Location: Dynasty Server
Posts: 35
Default

I have this on the Dynasty server, its working great.
Reply With Quote
  #3  
Old 12-30-2003, 09:03 PM
Shawn319
Demi-God
 
Join Date: Jan 2002
Posts: 2,073
Default

This fix works great for mobs.. it'll be in the next release of EQEmu.. also we've made some fixes to client HP as well.. to be a little more accurate.
__________________
Shawn319
Semi-Retired EQ Addict

(Retired)EQEmu Lead Tester
(Retired)EQEmu Tech Support

(Retired)Host/ServerOP - [LIVE] Official EQEmu Test Server
(Retired)Host/ServerOP - Shawn319's All-GM Dev Test Server
(Retired)ServerOP - EQEmu Beta Server
(Retired)ServerOP - GuildWars Server
(Retired)ServerOP - Raid Addicts
--------------------------
Reply With Quote
  #4  
Old 01-20-2004, 04:10 PM
xxsupamanxx5
Fire Beetle
 
Join Date: Jan 2004
Posts: 8
Default

This didnt work for me i dont knwo what you guys are talking about i did what u said to do it didnt work. So i reinstalled everything and tried agian and agian and agian I even had my cousin try it and my dad!!! it didnt work pls somone help me fix this health bar stuff
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:46 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3