Open GoogleCodeExporter opened 9 years ago
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 darksumm...@gmail.com
on 4 Aug 2013 at 7:48
[deleted comment]
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 darksumm...@gmail.com
on 6 Aug 2013 at 6:17
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 pamm...@gmail.com
on 12 Aug 2013 at 11:36
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 darksumm...@gmail.com
on 12 Aug 2013 at 12:17
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 volko...@hotmail.com
on 12 Aug 2013 at 1:39
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 darksumm...@gmail.com
on 12 Aug 2013 at 7:21
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 pamm...@gmail.com
on 13 Aug 2013 at 9:52
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 darksumm...@gmail.com
on 13 Aug 2013 at 12:12
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 pamm...@gmail.com
on 13 Aug 2013 at 12:37
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 darksumm...@gmail.com
on 13 Aug 2013 at 3:00
Original issue reported on code.google.com by
volko...@hotmail.com
on 25 Apr 2013 at 6:33