mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 07:27:18 +00:00
Use of final
This commit is contained in:
parent
a5611e9c7f
commit
06acd23cb7
@ -6,7 +6,7 @@
|
||||
|
||||
class Entity;
|
||||
|
||||
class AchievementVendorComponent : public VendorComponent {
|
||||
class AchievementVendorComponent final : public VendorComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::ACHIEVEMENT_VENDOR;
|
||||
AchievementVendorComponent(Entity* parent);
|
||||
|
@ -51,7 +51,7 @@ struct AiSkillEntry {
|
||||
/**
|
||||
* Handles the AI of entities, making them wander, tether and attack their enemies
|
||||
*/
|
||||
class BaseCombatAIComponent : public Component {
|
||||
class BaseCombatAIComponent final : public Component {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BASE_COMBAT_AI;
|
||||
|
||||
|
@ -46,7 +46,6 @@ void BouncerComponent::SetBouncerEnabled(bool value) {
|
||||
m_ParentEntity->TriggerEvent(eTriggerEventType::PET_OFF_SWITCH, m_ParentEntity);
|
||||
GameMessages::SendStopFXEffect(m_ParentEntity, true, "PetOnSwitch");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void BouncerComponent::LookupPetSwitch() {
|
||||
|
@ -10,7 +10,7 @@
|
||||
/**
|
||||
* Attached to bouncer entities, allowing other entities to bounce off of it
|
||||
*/
|
||||
class BouncerComponent : public Component {
|
||||
class BouncerComponent final : public Component {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BOUNCER;
|
||||
|
||||
|
@ -14,12 +14,6 @@
|
||||
|
||||
std::unordered_map<int32_t, std::vector<BuffParameter>> BuffComponent::m_Cache{};
|
||||
|
||||
BuffComponent::BuffComponent(Entity* parent) : Component(parent) {
|
||||
}
|
||||
|
||||
BuffComponent::~BuffComponent() {
|
||||
}
|
||||
|
||||
void BuffComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
|
||||
if (!bIsInitialUpdate) return;
|
||||
if (m_Buffs.empty()) {
|
||||
|
@ -14,20 +14,18 @@ class Entity;
|
||||
/**
|
||||
* Extra information on effects to apply after applying a buff, for example whether to buff armor, imag or health and by how much
|
||||
*/
|
||||
struct BuffParameter
|
||||
{
|
||||
int32_t buffId;
|
||||
struct BuffParameter {
|
||||
int32_t buffId = 0;
|
||||
std::string name;
|
||||
float value;
|
||||
float value = 0.0f;
|
||||
std::vector<float> values;
|
||||
int32_t effectId;
|
||||
int32_t effectId = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Meta information about a buff that can be applied, e.g. how long it's applied, who applied it, etc.
|
||||
*/
|
||||
struct Buff
|
||||
{
|
||||
struct Buff {
|
||||
int32_t id = 0;
|
||||
float time = 0;
|
||||
float tick = 0;
|
||||
@ -40,13 +38,11 @@ struct Buff
|
||||
/**
|
||||
* Allows for the application of buffs to the parent entity, altering health, armor and imagination.
|
||||
*/
|
||||
class BuffComponent : public Component {
|
||||
class BuffComponent final : public Component {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BUFF;
|
||||
|
||||
explicit BuffComponent(Entity* parent);
|
||||
|
||||
~BuffComponent();
|
||||
explicit BuffComponent(Entity* parent) : Component(parent) { };
|
||||
|
||||
Entity* GetParentEntity() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user