mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-29 03:32:00 +00:00
Upgraded to new APIs
This commit is contained in:
@@ -102,7 +102,7 @@ void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::Bit
|
||||
totalDamageDealt = this->m_MinDamage;
|
||||
}
|
||||
|
||||
auto* source = EntityManager::Instance()->GetEntity(context->originator);
|
||||
auto* source = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
auto* damageProfile = DamageProfile::FindDamageProfile(context->skillID);
|
||||
|
||||
@@ -206,7 +206,7 @@ void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet
|
||||
|
||||
auto damage = this->m_MinDamage;
|
||||
|
||||
auto* source = EntityManager::Instance()->GetEntity(context->originator);
|
||||
auto* source = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
auto* damageProfile = DamageProfile::FindDamageProfile(context->skillID);
|
||||
|
||||
|
||||
@@ -833,7 +833,7 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Entity*> scripts = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::SCRIPT);
|
||||
std::vector<Entity*> scripts = Game::entityManager->GetEntitiesByComponent(eReplicaComponentType::SCRIPT);
|
||||
for (Entity* scriptEntity : scripts) {
|
||||
// Prevent double triggering
|
||||
if (scriptEntity->GetObjectID() == zoneControl->GetObjectID()) continue;
|
||||
@@ -1135,7 +1135,7 @@ void DestroyableComponent::ComputeBaseStats(bool refill) {
|
||||
if (currentArmor > maxArmor || refill) SetArmor(maxArmor);
|
||||
else SetArmor(currentArmor);
|
||||
|
||||
EntityManager::Instance()->SerializeEntity(m_Parent);
|
||||
Game::entityManager->SerializeEntity(m_Parent);
|
||||
}
|
||||
|
||||
std::map<eStatTypes, float> DestroyableComponent::ComputeDamage(uint32_t baseDamage, Entity* source, DamageProfile* damageProfile) {
|
||||
|
||||
Reference in New Issue
Block a user