Jump to content
  • 0

remove monster hp bars


Mabuhay

Question


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   1
  • Joined:  06/04/13
  • Last Seen:  

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
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

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  
 
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  10/23/13
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  09/24/14
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

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.

Link to comment
Share on other sites

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.

×
×
  • Create New...