mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
feature: Donation Vendor Component (#1168)
* refactor: Vendor inventory loading Implement proper delta compression dynamically determine multicostitems and standard cost items Quatantine max's custom code * WIP * progress missions * address feedback * fix newline * Cleanup * oops * fix default for nexus tower jawbox cleanup some logs * remove log * remove include that got added back
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "BuildBorderComponent.h"
|
||||
#include "MovementAIComponent.h"
|
||||
#include "VendorComponent.h"
|
||||
#include "DonationVendorComponent.h"
|
||||
#include "RocketLaunchpadControlComponent.h"
|
||||
#include "PropertyComponent.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
@@ -578,6 +579,9 @@ void Entity::Initialize() {
|
||||
if ((compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::VENDOR) > 0)) {
|
||||
VendorComponent* comp = new VendorComponent(this);
|
||||
m_Components.insert(std::make_pair(eReplicaComponentType::VENDOR, comp));
|
||||
} else if ((compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::DONATION_VENDOR, -1) != -1)) {
|
||||
DonationVendorComponent* comp = new DonationVendorComponent(this);
|
||||
m_Components.insert(std::make_pair(eReplicaComponentType::DONATION_VENDOR, comp));
|
||||
}
|
||||
|
||||
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::PROPERTY_VENDOR, -1) != -1) {
|
||||
@@ -1160,6 +1164,11 @@ void Entity::WriteComponents(RakNet::BitStream* outBitStream, eReplicaPacketType
|
||||
vendorComponent->Serialize(outBitStream, bIsInitialUpdate, flags);
|
||||
}
|
||||
|
||||
DonationVendorComponent* donationVendorComponent;
|
||||
if (TryGetComponent(eReplicaComponentType::DONATION_VENDOR, donationVendorComponent)) {
|
||||
donationVendorComponent->Serialize(outBitStream, bIsInitialUpdate, flags);
|
||||
}
|
||||
|
||||
BouncerComponent* bouncerComponent;
|
||||
if (TryGetComponent(eReplicaComponentType::BOUNCER, bouncerComponent)) {
|
||||
bouncerComponent->Serialize(outBitStream, bIsInitialUpdate, flags);
|
||||
|
Reference in New Issue
Block a user