r6859 | openkore doesn't always "see" party members' HP

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

865255
Noob
Noob
Posts: 5
Joined: 26 Aug 2008, 18:49
Noob?: Yes

r6859 | openkore doesn't always "see" party members' HP

#1 Post by 865255 »

To reproduce:

1. setup an acolyte class bot (aco, priest, champ, etc) that has Heal skill.
2. add this skill block:

Code: Select all

partySkill Heal {
	lvl 10
	target_hp < 90%
}
3. make a party, and invite the bot
4. relog the bot, and it will start spamming level 1 Heal on party members.
5. if you type 'party' in the console, you'll see what the bot sees:
- it sees the party members (sees them as "online" correctly),
- it sees their map and coordinates correctly,
- but it doesn't see their HP yet.
6. the bot will keep spamming heal on those party member(s) until it gets an update on their HP
(one way is to take damage from a monster. Then the bot receives your updated HP and it'll Heal you properly, then stop spamming)

Image
Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: r6859 | openkore doesn't always "see" party members' HP

#2 Post by Technology »

nice bug report, i'll look at this again once i finish another project.

Maybe we should do this:

Code: Select all

Index: Misc.pm
===================================================================
--- Misc.pm	(revision 6858)
+++ Misc.pm	(working copy)
@@ -3240,7 +3240,7 @@
 sub percent_hp {
 	my $r_hash = shift;
 	if (!$$r_hash{'hp_max'}) {
-		return 0;
+		return undef;
 	} else {
 		return ($$r_hash{'hp'} / $$r_hash{'hp_max'} * 100);
 	}
Otherwise we make kore think that the other char has 0 hp while it actually hasn't been received by kore.
So if we have target_hp < 80% it would still heal because of this.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!
Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: r6859 | openkore doesn't always "see" party members' HP

#3 Post by Technology »

Please test the last svn to see if it is fixed now.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!
865255
Noob
Noob
Posts: 5
Joined: 26 Aug 2008, 18:49
Noob?: Yes

Re: r6859 | openkore doesn't always "see" party members' HP

#4 Post by 865255 »

Yes, that fixed it.

Thanks Image
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: r6859 | openkore doesn't always "see" party members' HP

#5 Post by kLabMouse »

Bug Closed.