mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-19 10:15:27 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user