mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
commit
This commit is contained in:
@ -68,15 +68,12 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
|
||||
}
|
||||
}
|
||||
|
||||
void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2,
|
||||
int32_t param3) {
|
||||
void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||
auto* scriptedActivityComponent = self->GetComponent<ScriptedActivityComponent>();
|
||||
if (scriptedActivityComponent == nullptr)
|
||||
return;
|
||||
if (scriptedActivityComponent == nullptr) return;
|
||||
|
||||
auto* data = scriptedActivityComponent->GetActivityPlayerData(sender->GetObjectID());
|
||||
if (data == nullptr)
|
||||
return;
|
||||
if (data == nullptr) return;
|
||||
|
||||
if (args == "course_cancel") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"cancel_timer", 0, 0,
|
||||
@ -96,7 +93,8 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
}
|
||||
|
||||
EntityManager::Instance()->SerializeEntity(self);
|
||||
// LeaderboardManager::Instance().SaveFootRaceScore(sender->GetObjectID(), scriptedActivityComponent->GetActivityID(), finish);
|
||||
auto leaderboardType = LeaderboardManager::GetLeaderboardType(scriptedActivityComponent->GetActivityID());
|
||||
LeaderboardManager::Instance().SaveScore(sender->GetObjectID(), scriptedActivityComponent->GetActivityID(), leaderboardType, 1, finish);
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"ToggleLeaderBoard",
|
||||
scriptedActivityComponent->GetActivityID(), 0, sender->GetObjectID(),
|
||||
|
Reference in New Issue
Block a user