Jump to content
  • 0
Battosai

How to remove emperium hp job3_arch03

Question

3 answers to this question

Recommended Posts

  • 0

conf / map / battle / monster.conf on line 194

// Display some mob info next to their name? (Note 3)
// (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

Keep in mind that this will be for the whole server and therefore for all the monsters ^^ '

Edit: It looks like the conf is not working.
It says

Quote

(does not works on guardian or Emperium)

but I do have the HP displayed. Can be created as a correction subject for Hercules developers

Edited by Daraen

Share this post


Link to post
Share on other sites
  • 0
/// Updates the object's (bl) name on client.
/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
static void clif_mobname_ack(int fd, struct block_list *bl)
{
	nullpo_retv(bl);
	Assert_retv(bl->type == BL_MOB);

	const struct mob_data *md = BL_UCCAST(BL_MOB, bl);

	if (md->guardian_data && md->guardian_data->g) {
		clif->mobname_guardian_ack(fd, bl);
	} else if (battle_config.show_mob_info) {
		clif->mobname_additional_ack(fd, bl);
	} else {
		clif->mobname_normal_ack(fd, bl);
	}
}

if that monster belongs to the guild, it won't show the hp/maxhp

/// Updates the object's (bl) name on client.
/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
static void clif_mobname_guardian_ack(int fd, struct block_list *bl)
{
	nullpo_retv(bl);
	Assert_retv(bl->type == BL_MOB);
	const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
	Assert_retv(md->guardian_data && md->guardian_data->g);

	struct PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
	packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
	packet.gid = bl->id;
	memcpy(packet.name, md->name, NAME_LENGTH);
	memcpy(packet.guild_name, md->guardian_data->g->name, NAME_LENGTH);
	memcpy(packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH);
	clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAMEALL));
}

it will shows the guild name, castle name etc instead of hp/maxhp

 


 

this is some quick fix to not show the emprium hp/maxhp with show_mob_info

 src/map/clif.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/map/clif.c b/src/map/clif.c
index a6427b796..9fa2323be 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9728,12 +9728,14 @@ static void clif_mobname_additional_ack(int fd, struct block_list *bl)
 	memcpy(packet.name, md->name, NAME_LENGTH);
 	char mobhp[100];
 	char *str_p = mobhp;
-	if (battle_config.show_mob_info&4)
-		str_p += sprintf(str_p, "Lv. %d | ", md->level);
-	if (battle_config.show_mob_info&1)
-		str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
-	if (battle_config.show_mob_info&2)
-		str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
+	if (md->class_ != MOBID_EMPELIUM) {
+		if (battle_config.show_mob_info&4)
+			str_p += sprintf(str_p, "Lv. %d | ", md->level);
+		if (battle_config.show_mob_info&1)
+			str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
+		if (battle_config.show_mob_info&2)
+			str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
+	}
 	//Even thought mobhp ain't a name, we send it as one so the client
 	//can parse it. [Skotlex]
 	if (str_p != mobhp) {

 

btw, I don't really call this a bug ... but it's true emperium should belongs to CLASS_GUARDIAN according to aegis ....

this one ... I don't really have a good idea how to make a correct fix on github, because emperium that belongs to guild doesn't show the information, which is working as intended

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.