mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-20 03:30:18 +00:00
Vendor cleanup and start Donation Vendor impl
This commit is contained in:
24
dGame/dComponents/DonationVendorComponent.cpp
Normal file
24
dGame/dComponents/DonationVendorComponent.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "DonationVendorComponent.h"
|
||||
|
||||
DonationVendorComponent::DonationVendorComponent(Entity* parent) : VendorComponent(parent) {
|
||||
m_PercentComplete = 0.0;
|
||||
m_TotalDonated = 0;
|
||||
m_TotalRemaining = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DonationVendorComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
|
||||
VendorComponent::Serialize(outBitStream, bIsInitialUpdate, flags);
|
||||
outBitStream->Write(bIsInitialUpdate || m_DirtyDonationVendor);
|
||||
if (bIsInitialUpdate || m_DirtyDonationVendor) {
|
||||
outBitStream->Write(m_PercentComplete);
|
||||
outBitStream->Write(m_TotalDonated);
|
||||
outBitStream->Write(m_TotalRemaining);
|
||||
}
|
||||
}
|
||||
|
||||
void DonationVendorComponent::LoadConfigData() {
|
||||
m_ActivityId = m_ParentEntity->GetVar<uint32_t>(u"activityID");
|
||||
VendorComponent::LoadConfigData();
|
||||
}
|
||||
Reference in New Issue
Block a user