Jump to content
Returning Members: Password Reset Required ×

Recommended Posts

Posted

I'm working on a server using ConquerServer v2 and am having an issue with getting warehouse to work as intended. Can deposit way too much gold, can't remove gold, and I can't get items to deposit at all - they disappear from inventory until closed and reopened. I've spent the last couple hours going through and nothing I changed would take.

I tried to troubleshoot why no changes worked and even removed the files related to the warehouse to see if that would prevent anything. Unfortunately, it kept allowing gold to be deposited. I have all my changes on a different branch atm to ensure I didn't break anything. (Yes, I restarted the server each time to ensure the changes took for testing)

I noticed no .bin files were created within the Database Warehouse section, so I thought maybe those were created upon registration. I reviewed registration and character creation, and that does not seem to be the case. 

Has anyone worked on this source who could give me a hint? I've been able to get most things working as intended but the warhouse and attribute points not saving after relogging are the two big ones for me atm. 

At the very least, this forced me to go through almost every file and add comments to try and track every process... at least some plus side?

Posted

We may need to bite off one bit at a time. Gold seems like a good place to start. Can you share how you're depositing gold? Like, what steps your project takes to do that?

Posted

Thanks for the quick reply! So, I figured out the gold was because I didn't add the file to the project; I only tossed it in the folder. I set my git to public, since I plan to make this a public source anyway, and noticed my files weren't there. Big red flag lol. 

https://github.com/RTNMatt/ConquerServerV2/tree/be2da5371faa9cb9704c3e0d5bfc55dbc9645363/CoServerV2

To answer your question for anyone else who might be interested in the source: 

Gold is being handled from the item usage, so need to add a withdraw to the item usage packet structure and a catch break in the process file. Added a file for the deposit packet in the item useage folder, which thankfully came right after deposit, so was a sub packet of 0x0B. 

I'm going to investigate the warehouse a bit more. The functionality should already be in the original source code, from the looks of it, but it isn't working. I did a lot to try and fix that but honestly could of made the same mistake of not right-clicking to add the file to the project. Probably just too used to projects files only needing to be in folders to be included.

Posted

You may want to add a .gitignore file to your project so your commits are cleaner. Side note, as much as it probably doesn't matter right now, your passwords are visible. 

Posted

Thanks for the advice! I wasn't worried about the two test accounts or the internal currently listed, but it would be smart to handle that ahead of time. I dug into the original warehouse logic and found that it is working. The issue is that the UID is not getting pulled properly, always returning 0. Probably going to take me a bit to dig into this one, as I'm not quite sure how to break it down. That was the purpose of starting this, so fingers crossed I can figure it out lol

  • 2 weeks later...
Posted

Took a bit for me to find time to work on this again, but found some points. Looks like the ItemUID and Count were being forced to be the same and I couldn't see any indication as to why. Count appears to be the count of items in the warehouse. Allowing ItemUID in the warehouse packet structure be its own variable allows for items to be deposited, the items to be found in inventory, and the warehouse .bin files to be created and updated with the correct number of items. However... the game client crashes on deposit OR when trying to open the warehouse for the second time. 

Going to make time to look into this tomorrow while it is still fresh but it is 1 am and time to sleep for work tomorrow. First three thoughts are that 1) packet structure may be off due to ItemUID and Count having been forced to match previously. 2) Because items don't show and there is a warehouse file created that has an item in it, the warehouse update could be the issue. 3) I created a +3 super ring with an enchantment and that should have some item data. The output showed all 00s, so it's possible the crash is related to invalid item data?

I'd rather not rebuild the warehouse packet and processes from scratch but honestly wondering if that would be the better route here. I'm going to see if another source for the same patch, Albetros, may help me figure out what I'm missing in the packet structure but not overly sure that is the right path. Hopefully will have an update tomorrow of it working and be able to move onto other things. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...