Upgraded to new APIs

This commit is contained in:
wincent
2023-10-07 15:15:15 +02:00
parent 2097dbfff1
commit 89339d3003
7 changed files with 18 additions and 109 deletions

View File

@@ -41,7 +41,7 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) {
destroyable->GetInfo().armor = 330;
destroyable->ComputeBaseStats(true);
EntityManager::Instance()->SerializeEntity(self);
Game::entityManager->SerializeEntity(self);
// Determine Spider Boss health transition thresholds
int spiderBossHealth = destroyable->GetMaxHealth();
@@ -165,10 +165,6 @@ void BossSpiderQueenEnemyServer::WithdrawSpider(Entity* self, const bool withdra
destroyable->SetArmor(destroyable->GetMaxArmor() / 3);
auto* destroyable = self->GetComponent<DestroyableComponent>();
destroyable->SetArmor(destroyable->GetMaxArmor() / 3);
Game::entityManager->SerializeEntity(self);
// Prepare a timer for post leap attack
@@ -366,9 +362,9 @@ void BossSpiderQueenEnemyServer::RainOfFireManager(Entity* self) {
info.pos = entity->GetPosition();
info.spawnerID = entity->GetObjectID();
auto* spawned = EntityManager::Instance()->CreateEntity(info);
auto* spawned = Game::entityManager->CreateEntity(info);
EntityManager::Instance()->ConstructEntity(spawned);
Game::entityManager->ConstructEntity(spawned);
});
}
else
@@ -388,9 +384,9 @@ void BossSpiderQueenEnemyServer::RainOfFireManager(Entity* self) {
info.pos = entity->GetPosition() + NiPoint3(x, 0, z);
info.spawnerID = entity->GetObjectID();
auto* spawned = EntityManager::Instance()->CreateEntity(info);
auto* spawned = Game::entityManager->CreateEntity(info);
EntityManager::Instance()->ConstructEntity(spawned);
Game::entityManager->ConstructEntity(spawned);
});
}
@@ -647,7 +643,7 @@ void BossSpiderQueenEnemyServer::OnPlayerDied(Entity* self, Entity* player) {
ply->SendToZone(1100);
self->AddCallbackTimer(10, [] () {
dZoneManager::Instance()->GetZoneControlObject()->SetVar(u"shutdown", true);
Game::zoneManager->GetZoneControlObject()->SetVar(u"shutdown", true);
});
}