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

[Fix] Update trader add/remove packets to limits for RoF2 #4595

Merged
merged 2 commits into from
Jan 19, 2025

Conversation

neckkola
Copy link
Contributor

Description

As previously noted, the RoF2 limit for the number of traders is 600. If there are already 600 traders within the client and a new trader is enabled, the 601st would crash the client.

This fix tracks that condition and does not send the packet.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Testing

Tested with a client that had 600 traders, and then enabled a new trader. Prior the client would crash. Post, the client would not crash.

Clients tested:
RoF2 against linux and windows builds

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

Update trader add/remove to limit for RoF2
@Kinglykrab
Copy link
Contributor

Looks great, appreciate the contribution.

Minor nitpick, could we change the names? Like GetTraderCount, SetTraderCount, IncrementTraderCount, DecrementTraderCount, and m_trader_count.

@neckkola
Copy link
Contributor Author

Thanks Kingly. Updated accordingly.

@Akkadius Akkadius merged commit d47bf68 into EQEmu:master Jan 19, 2025
1 check passed
@Akkadius Akkadius mentioned this pull request Jan 27, 2025
MortimerGreenwald pushed a commit to MortimerGreenwald/Server that referenced this pull request Jan 27, 2025
* Update trader add/remove to limit for RoF2

Update trader add/remove to limit for RoF2

* Update for feedback

---------

Co-authored-by: Mitch Freeman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants