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

[Feature] Add RoF2 Bazaar Support #4315

Merged
merged 29 commits into from
May 26, 2024
Merged

Conversation

neckkola
Copy link
Contributor

Description

This PR will re-write much of the bazaar functionality with the intent to be phase 1 of RoF2 support. Phase 2 will be to enable the barter/buyer system. I am separating the two to allow for easier testing/review. I have marked this draft, as I believe it is ready for folks to kick the tires and comment upon. More changes will occur as I test further and respond to any feedback, suggestions, bugs, etc. I trust this is a good approach.

Specifically, this change;

  • rewrites much of the encode/decode functions to be base on action keys instead of packet length
  • rewrites much, though not all, of the pre-existing merchant/bazaar functionality, again to be based on action instead of packet length.
  • the change to action allows for backwards compatibility with Ti, UF, and RoF2
  • Enables /bazaar functionality for RoF2
  • Enable co-existence with UF/RoF2 traders including the 80/200 limits
  • supports tradeable augmented items
  • supports RoF2 clients to purchase via parcel delivery outside of bazaar at a delivery cost. I set this to 20% as a default. Not sure what live is atm.
  • creates several rules to adjust parcel delivery cost(implemented) and voucher delivery (not yet implemented)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Testing

I have tested via RoF2 and UF. Ti compatibility is not yet complete. I will tackle this next.

Clients tested:
RoF2 and UF

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.
  • [TODO] I have made corresponding changes to the documentation (if applicable, if not delete this line)
  • I own the changes of my code and take responsibility for the potential issues that occur
  • If my changes make database schema changes, I have tested the changes on a local database (attach image). Updated version.h CURRENT_BINARY_DATABASE_VERSION to the new version. (Delete this if not applicable)

Comments

  • Ti integration not complete.
  • The client, at least with the old implementation of the bazaar, and with these updates, has a limitation where duplicate item ids within a trader will have the same sale price. For example, if you have two stacks of item 8517 (Class 6 Arrows) they will be the same price. I will investigate this more, though this is how it previously functioned, so I have not spent much time at the moment.
  • Augmented items are supported. Due to the client issue above, if you have two items, one augmented and one not, they will have the same price.
  • RoF2 direct delivery via vouchers is not enabled. Are expedient delivery vouchers enabled within alt currency? I can look into this if folks would like this functionality.

Any suggests, or feedback are welcome, including any testing that people could do.

Thanks, and enjoy.
Neckkola

@fryguy503
Copy link
Contributor

Can we completely disable parcel delivery and force users to visit the bazaar stalls?

@neckkola
Copy link
Contributor Author

Can we completely disable parcel delivery and force users to visit the bazaar stalls?

I can add that. No problem

@neckkola
Copy link
Contributor Author

Can we completely disable parcel delivery and force users to visit the bazaar stalls?

I can add that. No problem

@fryguy503 Added a new rule. Default is to allow delivery so you will have to flip to false.

@neckkola neckkola force-pushed the FeatureBazaarRoF2 branch 4 times, most recently from 5eac2a4 to c57b5e7 Compare May 26, 2024 12:04
neckkola and others added 22 commits May 26, 2024 17:09
Enable RoF2 bazaar features
Cleanup of formatting and unused functions
Add parcel delivery price functionality via rules and new delivery cost struct.
Further testing and a few fixes and messages added.  Add active transaction check to ensure two clients cannot purchase from the bazaar window at the same time
Cleanup and Formatting updates
Add a rule Bazaar:EnableParcelDelivery to enable/disable bazaar parcel delivery.  Default is True.
Adds/Tested bazaar search with move to content_db
- race, class, money, number of returned items, stats, name, slot, level, traders, local traders, specific trader.
Outstanding
- type, more stats to add (heroic, etc)
Akkadius and others added 6 commits May 26, 2024 17:09
Updates the bazaar search for item types.  They should be working as per RoF2+ types.
Add search by augmentation slots available on the item.
This enables all but Prestige, which I believe are not implemented yet.
Add Titanium /trader /bazaar functionality.
Added itemtype=armor bazaar search.  It was missed in the search work
@neckkola
Copy link
Contributor Author

neckkola commented May 26, 2024

Good afternoon. I have worked through the remaining bazaar search items. Everything should now be working in search except for prestige items as I understand that they are not implemented. Others should work; item name, local/all/specific traders, race, class, stats, type, level, cost and number of returned items.

I have also now added Titanium support for both /trader and /bazaar.

A previous version has been running in PEQ for several days, no reported issues that I am aware of, other than the limited search functionality. Should be ready to go.

I will need to do some cleanup as well, as there are some unused functions, duplicate enums. Will look after this for sure, then add some documentation, videos.

Neckkola

@Valorith
Copy link
Contributor

Good afternoon. I have worked through the remaining bazaar search items. Everything should now be working in search except for prestige items as I understand that they are not implemented. Others should work; item name, local/all/specific traders, race, class, stats, type, level, cost and number of returned items.

I have also now added Titanium support for both /trader and /bazaar.

A previous version has been running in PEQ for several days, no reported issues that I am aware of, other than the limited search functionality. Should be ready to go.

I will need to do some cleanup as well, as there are some unused functions, duplicate enums. Will look after this for sure, then add some documentation, videos.

Neckkola

You're a legend!

@Akkadius Akkadius marked this pull request as ready for review May 26, 2024 20:22
@fryguy503
Copy link
Contributor

Can I add a request?

Currently to use barter, you must use the new bazaar. Before I had hardcoded a location in the old bazaar stalls to use barter.

Now with using the old bazaar, we need a door down for players to stand on. Can we code this in as an option for barter. So a different door to stand on will trigger barter allowance?

In era there was two old bazaars one for traders and one for barters, that did not last long before the new and arguably worse bazaar was added.

@Akkadius
Copy link
Member

Been testing on PEQ for a good week, been solid

@Akkadius Akkadius merged commit fc79614 into EQEmu:master May 26, 2024
1 check was pending
@Akkadius Akkadius mentioned this pull request May 26, 2024
joligario added a commit to ProjectEQ/peqphpeditor that referenced this pull request May 31, 2024
catapultam-habeo pushed a commit to The-Heroes-Journey-EQEMU/Server that referenced this pull request Jul 14, 2024
* Add RoF2 Bazaar Support

Enable RoF2 bazaar features

* Add augments to Trader Items

* Cleanup

Cleanup of formatting and unused functions

* Update PlayerProfile for correct char_id in trader transactions.  Further cleanup.

* Add parcel delivery price functionality

Add parcel delivery price functionality via rules and new delivery cost struct.

* Add RoF support for bazaar window outside of bazaar with parcel delivery

* Further Testing and ActiveTransaction added

Further testing and a few fixes and messages added.  Add active transaction check to ensure two clients cannot purchase from the bazaar window at the same time

* Cleanup and Formatting updates

Cleanup and Formatting updates

* Update database manifest for the trader table against default peq trader table

* Logs and formatting

* Update bazaarsearch to be content_db aware

* Fix crash

* Simplify search

* Search fixes

* Push up more search logging

* More search fixes

* Formatting

* Update trader_repository.h

* Add Rule for Bazaar Parcel Delivery

Add a rule Bazaar:EnableParcelDelivery to enable/disable bazaar parcel delivery.  Default is True.

* Fix crash

* Update Bazaar Search

Adds/Tested bazaar search with move to content_db
- race, class, money, number of returned items, stats, name, slot, level, traders, local traders, specific trader.
Outstanding
- type, more stats to add (heroic, etc)

* Formatting

* Push

* Update bazaarsearch to include all stats that are available in RoF2

* Update BazaarSearch

Updates the bazaar search for item types.  They should be working as per RoF2+ types.

* Formatting

* Final updates to BazaarSearch

Add search by augmentation slots available on the item.
This enables all but Prestige, which I believe are not implemented yet.

* Add Titanium functionality correct ItemType Search

Add Titanium /trader /bazaar functionality.
Added itemtype=armor bazaar search.  It was missed in the search work

* Close off for loops

---------

Co-authored-by: Akkadius <[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.

None yet

4 participants