Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item Tooltips #373

Open
GoogleCodeExporter opened this issue Mar 21, 2015 · 11 comments
Open

Item Tooltips #373

GoogleCodeExporter opened this issue Mar 21, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

There is a major bug about the weapons and armor.

when you create a new items, on the server side everything work fines, but when 
you put your cursor above it, the tooltip is showing the stats and all the 
STATS are missing.

I mean Str, Agi, MinHit, MaxHit etc...

I've seen that all the other stats on the items are synchronizing on the IO but 
not these...

anyone could fix this?

I guess, I should just put them as normal stats like the other cause they work 
fine. 

Original issue reported on code.google.com by [email protected] on 25 Apr 2013 at 6:33

@GoogleCodeExporter
Copy link
Author

I finally had some time to look at this again. I think I've cracked it, give me 
a few days and I'll try and commit a solution to this :).

Original comment by [email protected] on 4 Aug 2013 at 7:48

  • Changed state: Accepted
  • Added labels: Priority-High

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I won't be committing any changes but the cause of this bug is due to the 
[NetGore.SyncValueAttribute()] not being set on the stat collections therefore 
all stats defaulting to 0 and not showing on the tooltips.

Original comment by [email protected] on 6 Aug 2013 at 6:17

@GoogleCodeExporter
Copy link
Author

So would the way to solve it be to not using stat collections for the stats? Or 
is there someway to add the [NetGore.SyncValueAttribute()] to the stat 
collections?

Original comment by [email protected] on 12 Aug 2013 at 11:36

@GoogleCodeExporter
Copy link
Author

No - statcollections are there for a reason.
This is what I thought but wasn't sure of whether the sync attribute could be 
added to collections. I asked Spodi but I've not received a reply yet.
Instead of relying on the sync, I created my own manual way of showing stats to 
the client.

Original comment by [email protected] on 12 Aug 2013 at 12:17

@GoogleCodeExporter
Copy link
Author

I've created other stats on the character that doesn't use these stats anymore.
Until a better fix is done, cause I am trying to make my game balance with the 
Mobs, quests... can't wait for a fix in 5 months :P

What did you do dark for this trouble?

Original comment by [email protected] on 12 Aug 2013 at 1:39

@GoogleCodeExporter
Copy link
Author

My fix (which I might as well commit at this rate xD), was manually sending the 
StatCollection over to the client via the normal BitStream approach. Issue 
solved :).
However, I wanted other people to realise this and learn something ;).

Original comment by [email protected] on 12 Aug 2013 at 7:21

@GoogleCodeExporter
Copy link
Author

Did you have to code your own read function for stat collections? I've found I 
can write stat collections, but can't seem to find the corresponding read 
function.

Original comment by [email protected] on 13 Aug 2013 at 9:52

@GoogleCodeExporter
Copy link
Author

If you look at the write method, you will see that it actually loops through 
each relevant (non zero) stat. So the answer is there - all you have to do is 
loop through the total sent (which it sends via a byte datatype) and read each 
stat.

I've basically explained the whole thing now, oh well :P

Original comment by [email protected] on 13 Aug 2013 at 12:12

@GoogleCodeExporter
Copy link
Author

Ok, well I solved it now, but my fix is very hacky it seems. My read method 
converts them into the KeyValue<StatType, int> collection that the client 
expects but it doesn't add the zero stats, so sometimes returns null.. so I had 
to test for null in the tool tips.

Original comment by [email protected] on 13 Aug 2013 at 12:37

@GoogleCodeExporter
Copy link
Author

That's not right at all :( If you follow my comments correctly, it will work 
perfectly. Talk on the forums or message me to carry this conversation further.

Original comment by [email protected] on 13 Aug 2013 at 3:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant