mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-15 04:28:27 +00:00
Rename some variables
- Add order for loading Components - Enforce all components have Entity* in the first argument
This commit is contained in:
@@ -21,7 +21,7 @@ void PropertyVendorComponent::OnUse(Entity* originator) {
|
||||
if (PropertyManagementComponent::Instance()->GetOwnerId() == LWOOBJID_EMPTY) {
|
||||
Game::logger->Log("PropertyVendorComponent", "Property vendor opening!");
|
||||
|
||||
GameMessages::SendOpenPropertyVendor(m_OwningEntity->GetObjectID(), originator->GetSystemAddress());
|
||||
GameMessages::SendOpenPropertyVendor(m_ParentEntity->GetObjectID(), originator->GetSystemAddress());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ void PropertyVendorComponent::OnUse(Entity* originator) {
|
||||
void PropertyVendorComponent::OnQueryPropertyData(Entity* originator, const SystemAddress& sysAddr) {
|
||||
if (PropertyManagementComponent::Instance() == nullptr) return;
|
||||
|
||||
PropertyManagementComponent::Instance()->OnQueryPropertyData(originator, sysAddr, m_OwningEntity->GetObjectID());
|
||||
PropertyManagementComponent::Instance()->OnQueryPropertyData(originator, sysAddr, m_ParentEntity->GetObjectID());
|
||||
}
|
||||
|
||||
void PropertyVendorComponent::OnBuyFromVendor(Entity* originator, const bool confirmed, const LOT lot, const uint32_t count) {
|
||||
@@ -41,11 +41,11 @@ void PropertyVendorComponent::OnBuyFromVendor(Entity* originator, const bool con
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendPropertyRentalResponse(m_OwningEntity->GetObjectID(), 0, 0, 0, 0, originator->GetSystemAddress());
|
||||
GameMessages::SendPropertyRentalResponse(m_ParentEntity->GetObjectID(), 0, 0, 0, 0, originator->GetSystemAddress());
|
||||
|
||||
auto* controller = dZoneManager::Instance()->GetZoneControlObject();
|
||||
|
||||
controller->OnFireEventServerSide(m_OwningEntity, "propertyRented");
|
||||
controller->OnFireEventServerSide(m_ParentEntity, "propertyRented");
|
||||
|
||||
PropertyManagementComponent::Instance()->SetOwner(originator);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user