Skip to content

Commit

Permalink
fiux mission (#1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC authored May 25, 2024
1 parent debc2a9 commit 0348db7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions dScripts/02_server/Enemy/AG/BossSpiderQueenEnemyServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "SkillComponent.h"
#include "eReplicaComponentType.h"
#include "RenderComponent.h"
#include "PlayerManager.h"

#include <vector>

Expand Down Expand Up @@ -53,11 +54,13 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) {

void BossSpiderQueenEnemyServer::OnDie(Entity* self, Entity* killer) {
if (Game::zoneManager->GetZoneID().GetMapID() == instanceZoneID && killer) {
auto* missionComponent = killer->GetComponent<MissionComponent>();
if (missionComponent == nullptr)
return;
for (const auto& player : PlayerManager::GetAllPlayers()) {
auto* missionComponent = player->GetComponent<MissionComponent>();
if (missionComponent == nullptr)
return;

missionComponent->CompleteMission(instanceMissionID);
missionComponent->CompleteMission(instanceMissionID);
}
}

// There is suppose to be a 0.1 second delay here but that may be admitted?
Expand Down

0 comments on commit 0348db7

Please sign in to comment.