Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

gainGP issue

Newbie Spellweaver
Joined
May 24, 2017
Messages
57
Reaction score
1
Hello everyone,

So lately there's been this issue that's been driving me nuts, so basically everytime I gain guild points from any NPC I'll basically only get that x amount and it will not increase until the next server restart.

For example: If I finish a quest and get 2 guild points and then re-do the quest again and gain 2 more guild points, it will just register as 2 guild points in the guild meaning the points won't add up and will just stay as 2.

However if I restart the server and do the quest again it will add up and become 4, and the same goes for another server restart. I hope that made sense. :/

The weird thing is that I've compared every single gaingp method with HeavenMS/MoopleDEV and they are basically the same which is weird...so then I thought it might have to do with wrong op codes but my GUILD_OPERATION send/recv codes are correct (I think?)

These are my opcodes and the gaingp method in MapleGuild.java for reference:
PHP:
public void gainGP(int amount) {        
this.gp += amount;        
this.writeToDB(false);        
this.guildMessage(MaplePacketCreator.updateGP(this.id, this.gp));    
}

Sendops:
Code:
GUILD_OPERATION: 0x41

Recvops:
Code:
GUILD_OPERATION: 0x7E

I hope someone can shed some light on this as I am very lost on what is going on here. Thanks.
 
Newbie Spellweaver
Joined
May 24, 2017
Messages
57
Reaction score
1
What ended up being the issue?
I'm legit curious now, hehe

I’m not even sure to be honest, I realised that TiredStory handles guild in a different way than alot of other sources so I looked for other sources that handled them in a somewhat similar way and just replaced every single guild function. Took me approximately 4 hours to add and test cause I broke some things along the way. Also, thank you for you and Zydee helping I appreciated it.
 
Upvote 0
Mythic Archon
Joined
Jul 2, 2013
Messages
723
Reaction score
70
I’m not even sure to be honest, I realised that TiredStory handles guild in a different way than alot of other sources so I looked for other sources that handled them in a somewhat similar way and just replaced every single guild function. Took me approximately 4 hours to add and test cause I broke some things along the way. Also, thank you for you and Zydee helping I appreciated it.
... okay i guess? Also some advice, copy pasta isn't generally a good idea; it's as you said, "a different than a lot of sources". Though implementing foreign code may work, you may have introduced 10 more issues from that single one. Best practice is just to debug. Best of luck
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
I see. Yeah, I noticed that it's quite different in TiredStory, it relies a lot on the MapleGuildCharacter object, which I don't agree with, although it doesn't make it necessarily worse than other public implementations.

Just for clarity, what I was looking for was the way that the function AbstractPlayerInteraction.getGuild() passes the MapleGuildCharacter object: in normal TiredStory source that's passed as a null, but that might not have been the case in your source, which would have allowed the code to reach the new MapleGuild portion of the function in WorldRegistryImpl.


Hopefully the new functions you added won't be causing further issues, but should they do, we'll work on them. c:
Goodluck!
 
Upvote 0
Back
Top