mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-23 14:33:07 +00:00
refactor(entity): each vendor type in its own place in the client's load order
Vendor (16), donation vendor (100) and achievement vendor (102) are separate entries in the client's component walk; no LOT has two of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -614,15 +614,17 @@ void Entity::Initialize() {
|
|||||||
}
|
}
|
||||||
case eReplicaComponentType::VENDOR: {
|
case eReplicaComponentType::VENDOR: {
|
||||||
const auto vendorID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::VENDOR);
|
const auto vendorID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::VENDOR);
|
||||||
const auto donationVendorID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::DONATION_VENDOR, -1);
|
if (vendorID > 0) AddComponent<VendorComponent>(vendorID);
|
||||||
const auto achievementVendorID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ACHIEVEMENT_VENDOR, -1);
|
break;
|
||||||
if (vendorID > 0) {
|
|
||||||
AddComponent<VendorComponent>(vendorID);
|
|
||||||
} else if (donationVendorID > -1) {
|
|
||||||
AddComponent<DonationVendorComponent>(donationVendorID);
|
|
||||||
} else if (achievementVendorID > -1) {
|
|
||||||
AddComponent<AchievementVendorComponent>(achievementVendorID);
|
|
||||||
}
|
}
|
||||||
|
case eReplicaComponentType::DONATION_VENDOR: {
|
||||||
|
const auto donationVendorID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::DONATION_VENDOR, -1);
|
||||||
|
if (donationVendorID > -1) AddComponent<DonationVendorComponent>(donationVendorID);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case eReplicaComponentType::ACHIEVEMENT_VENDOR: {
|
||||||
|
const auto achievementVendorID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ACHIEVEMENT_VENDOR, -1);
|
||||||
|
if (achievementVendorID > -1) AddComponent<AchievementVendorComponent>(achievementVendorID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eReplicaComponentType::SHOOTING_GALLERY: {
|
case eReplicaComponentType::SHOOTING_GALLERY: {
|
||||||
|
|||||||
Reference in New Issue
Block a user