Jump to content
  • 0

Question

Posted (edited)

how can i disable the hp bars?

 

Solved

 

Thanks Mootie and RyotoRyo

How?

look for this at clif.c then comment/remove == post #4 

void clif_monster_hp_bar( struct mob_data* md, int fd ) {
#if PACKETVER >= 20120404
	WFIFOHEAD(fd,packet_len(0x977));

	WFIFOW(fd,0)  = 0x977;
	WFIFOL(fd,2)  = md->bl.id;
	WFIFOL(fd,6)  = md->status.hp;
	WFIFOL(fd,10) = md->status.max_hp;

	WFIFOSET(fd,packet_len(0x977));
#endif
}

next look for this still at clif.c then comment

#if PACKETVER >= 20120404
			if( !(md->status.mode&MD_BOSS) ){
				int i;
				for(i = 0; i < DAMAGELOG_SIZE; i++)// must show hp bar to all char who already hit the mob.
					if( md->dmglog[i].id == sd->status.char_id )
						//clif_monster_hp_bar(md, sd->fd);
			}
#endif

 

then look for this at mob.c then comment
 

#if PACKETVER >= 20120404
	if( !(md->status.mode&MD_BOSS) ){
		int i;
		for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
			struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
			if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
				clif_monster_hp_bar(md, sd->fd);
		}
	}
#endif

 

 

 

 

save then recompile.

Edited by MrVandalBus
  • Upvote 1

8 answers to this question

Recommended Posts

Posted

Hi,

Please search the function "clif_monster_hp_bar" and you know what to do. delete or annotate the code.

void clif_monster_hp_bar( struct mob_data* md, int fd ) {
#if PACKETVER >= 20120404
	WFIFOHEAD(fd,packet_len(0x977));

	WFIFOW(fd,0)  = 0x977;
	WFIFOL(fd,2)  = md->bl.id;
	WFIFOL(fd,6)  = md->status.hp;
	WFIFOL(fd,10) = md->status.max_hp;

	WFIFOSET(fd,packet_len(0x977));
#endif
}
Posted (edited)

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/conf/battle/monster.conf

this part

 

 

 

// Display some mob info next to their name? (add as needed) 
// (does not works on guardian or emperium) 
// 1: Display mob HP (Hp/MaxHp format) 
// 2: Display mob HP (Percent of full life format) 
// 4: Display mob's level 
show_mob_info: 0  
 

Does this remove HP bars?

 

Isn't it packet related? or src mod?

Edited by MrVandalBus
Posted (edited)

Hi,

Please search the function "clif_monster_hp_bar" and you know what to do. delete or annotate the code.

void clif_monster_hp_bar( struct mob_data* md, int fd ) {
#if PACKETVER >= 20120404
	WFIFOHEAD(fd,packet_len(0x977));

	WFIFOW(fd,0)  = 0x977;
	WFIFOL(fd,2)  = md->bl.id;
	WFIFOL(fd,6)  = md->status.hp;
	WFIFOL(fd,10) = md->status.max_hp;

	WFIFOSET(fd,packet_len(0x977));
#endif
}

where can i find this?   

 

found at clif.c

 

Solved

Edited by MrVandalBus
Posted (edited)

Sorry, I tryed delete 3 text like post #1 and edit display monster conf to 0.  But nothing happen. 

 

I am using Server 3ceam revision 731 with Client 2012-04-10.

 

Please help me.


I try delete SRC folder and login in game but nothing happen.

 

I still login game normal when had deleted SRC folder :((

 

Solved

Edited by trungkingcb
Posted (edited)

how can i disable the hp bars?

 

Solved

 

Thanks Mootie and RyotoRyo

How?

look for this at clif.c then comment/remove == post #4 

void clif_monster_hp_bar( struct mob_data* md, int fd ) {
#if PACKETVER >= 20120404
	WFIFOHEAD(fd,packet_len(0x977));

	WFIFOW(fd,0)  = 0x977;
	WFIFOL(fd,2)  = md->bl.id;
	WFIFOL(fd,6)  = md->status.hp;
	WFIFOL(fd,10) = md->status.max_hp;

	WFIFOSET(fd,packet_len(0x977));
#endif
}

next look for this still at clif.c then comment

#if PACKETVER >= 20120404
			if( !(md->status.mode&MD_BOSS) ){
				int i;
				for(i = 0; i < DAMAGELOG_SIZE; i++)// must show hp bar to all char who already hit the mob.
					if( md->dmglog[i].id == sd->status.char_id )
						//clif_monster_hp_bar(md, sd->fd);
			}
#endif

then look for this at mob.c then comment

 

#if PACKETVER >= 20120404
	if( !(md->status.mode&MD_BOSS) ){
		int i;
		for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
			struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
			if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
				clif_monster_hp_bar(md, sd->fd);
		}
	}
#endif
 

 

 

save then recompile.

For removing HP bar.. 

 

change all the date  20120404 to 20150404.. and its works for me.. sorry for my bad english!  /no1

Edited by blizzard2117
Posted (edited)

This is my setup and it work ^_^  /no1 

src\map\clif.c

/* <--- Add
#if PACKETVER >= 20120404
				if( !(md->status.mode&MD_BOSS) ){
					int i;
					for(i = 0; i < DAMAGELOG_SIZE; i++) {// must show hp bar to all char who already hit the mob.
						if( md->dmglog[i].id == sd->status.char_id ) {
							clif->monster_hp_bar(md, sd);
							break;
						}
					}
				}
#endif */ <-- Add
src\map\mob.c

/*==========================================
 * mob heal, update display hp info of mob for players
 *------------------------------------------*/
void mob_heal(struct mob_data *md,unsigned int heal)
{
	if (battle_config.show_mob_info&3)
		clif->charnameack (0, &md->bl);
/* <-- Add
#if PACKETVER >= 20120404
	if( !(md->status.mode&MD_BOSS) ){
		int i;
		for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
			if( md->dmglog[i].id ) {
				struct map_session_data *sd = map->charid2sd(md->dmglog[i].id);
				if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
					clif->monster_hp_bar(md,sd);
			}
		}
	}
#endif
*/ <-- add
}
src\map\mob.c

	if (battle_config.show_mob_info&3)
		clif->charnameack (0, &md->bl);

	if (!src)
		return;
/*  <-- Add
#if PACKETVER >= 20120404
	if( !(md->status.mode&MD_BOSS) ){
		int i;
		for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
			if( md->dmglog[i].id ) {
				struct map_session_data *sd = map->charid2sd(md->dmglog[i].id);
				if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
					clif->monster_hp_bar(md,sd);
			}
		}
	}
#endif
*/  <-- Add
}
Edited by chatterboy
Posted

Simplest change would be:
On \src\map\clif.c:

void clif_monster_hp_bar( struct mob_data* md, int fd ) {
	return;
}

 Edit and recompile. Don't know if that will work or not, I'm not a src god.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...