Page 8 of 8

Re: Implementing Pets (0.7.2)

Posted: Mon Dec 30, 2013 5:36 pm
by Jabantiz
xinux wrote:Sorry meant to version check that Health is now 1.875 in the live client for 100% according to live packets.
/sigh
I hate SOE, 0-1 was stupid imo but it made sense, 1.875 = 100% doesn't, our code does 0-1 and it seems all of those values result in 0% in the tool tip but works for the bar...

Re: Implementing Pets (0.7.2)

Posted: Mon Dec 30, 2013 6:47 pm
by Jabantiz
Just tested on live client and the window does open and close on its own. I tried to get the tool tip working right with

Code: Select all

if (version >= 57000) {
				float hp_pct = (0.875 * info_struct->pet_health_pct) + 1;
but that didn't work, always had a value but not accurate, the odd thing is the hp bar seemed to work properly still. All attempts to get power showing when summoned has failed so far.

Re: Implementing Pets (0.7.2)

Posted: Mon Dec 30, 2013 6:53 pm
by xinux
yea best i could do was get the HP tooltip to say 100% but then would drop to 0% as soon as he took damage. I'm going to play with the other two unknowns tonight since i'm pretty sure they are the reason for the tooltip not working right..

Re: Implementing Pets (0.7.2)

Posted: Mon Dec 30, 2013 7:15 pm
by Jabantiz
1.1 = 1% in the tool tip 2.0 = 200% in the tool tip, with that code snippet I had a value at all times until the pet died but was way off, at about 95% the tool tip said 55%, ~60% was 46% tool tip.

And as I type this it hit me it might be a double and not a float now going to go test it.

Re: Implementing Pets (0.7.2)

Posted: Mon Dec 30, 2013 7:28 pm
by Jabantiz
Yea it is a double and it is still 0-1

Code: Select all

<Data ElementName="no_pet" Type="char" Size="32" />
<Data ElementName="unknown3a" Type="int8" Size="9" />
<Data ElementName="health_pct_tooltip" Type="double" Size="1" />
<Data ElementName="health_pct_bar" Type="double" Size="1" />
<Data ElementName="power_pct_tooltip" Type="float" Size="1" />
<Data ElementName="power_pct_bar" Type="float" Size="1" />
Still no luck on getting power bar to show

EDIT: Code and structs committed to Dev SVN

Re: Implementing Pets (0.7.2)

Posted: Mon Dec 30, 2013 9:03 pm
by xinux
Ok i got the power bar to appear on spawning now to figure how which setting did it lol.

Re: Implementing Pets (0.7.2)

Posted: Tue Dec 31, 2013 3:42 am
by xinux
Jab were you going to commit the changes to fix the power bar?

Re: Implementing Pets (0.7.2)

Posted: Tue Dec 31, 2013 12:52 pm
by xinux
I went ahead and committed changes for live pet's power bar.

Re: Implementing Pets (0.7.2)

Posted: Tue Dec 31, 2013 5:45 pm
by Jabantiz
Fixed the struct for 1188 clients, every thing that was implemented should work properly once again.

Also found and fixed a crash bug when a zone shuts down and there is a pet in the zone

Re: Implementing Pets (0.7.2)

Posted: Tue Jan 07, 2014 4:57 pm
by Jabantiz
Now that I have a NPC with a pet on my server I found a crash bug when a NPC had a pet and you did a /reload spells, fix has been committed to Dev SVN.