refactor(component): vendors share the client's base vendor component

LWOBaseVendorComponent is the base of the client's vendor, donation vendor and
achievement vendor; DLU's vendor logic becomes BaseVendorComponent with
VendorComponent, DonationVendorComponent and AchievementVendorComponent all
built on it (the last two derived from VendorComponent before). Nothing sent
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-01 15:43:13 -05:00
parent 9a464ac35f
commit c710e1d3a9
8 changed files with 126 additions and 107 deletions

View File

@@ -14,7 +14,7 @@
#include "User.h"
#include "UserManager.h"
DonationVendorComponent::DonationVendorComponent(Entity* parent, const int32_t componentID) : VendorComponent(parent, componentID) {
DonationVendorComponent::DonationVendorComponent(Entity* parent, const int32_t componentID) : BaseVendorComponent(parent, componentID) {
}
// The level config: the donation goal and activity, and the total donated so far
@@ -53,7 +53,7 @@ void DonationVendorComponent::SubmitDonation(uint32_t count) {
}
void DonationVendorComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) {
VendorComponent::Serialize(outBitStream, bIsInitialUpdate);
BaseVendorComponent::Serialize(outBitStream, bIsInitialUpdate);
outBitStream.Write(bIsInitialUpdate || m_DirtyDonationVendor);
if (bIsInitialUpdate || m_DirtyDonationVendor) {
outBitStream.Write(m_PercentComplete);