mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-05-22 15:24:57 +00:00
feat: make gm registration simpler and safer (#1932)
* gm registration re-work * fix errors Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * remove duplicate message * Remove duplicate function * add null check --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -31,8 +31,7 @@
|
||||
#include "Amf3.h"
|
||||
|
||||
ActivityComponent::ActivityComponent(Entity* parent, int32_t componentID) : Component(parent, componentID) {
|
||||
using namespace GameMessages;
|
||||
RegisterMsg<GetObjectReportInfo>(this, &ActivityComponent::OnGetObjectReportInfo);
|
||||
RegisterMsg(&ActivityComponent::OnGetObjectReportInfo);
|
||||
/*
|
||||
* This is precisely what the client does functionally
|
||||
* Use the component id as the default activity id and load its data from the database
|
||||
@@ -590,9 +589,7 @@ Entity* LobbyPlayer::GetEntity() const {
|
||||
return Game::entityManager->GetEntity(entityID);
|
||||
}
|
||||
|
||||
bool ActivityComponent::OnGetObjectReportInfo(GameMessages::GameMsg& msg) {
|
||||
auto& reportInfo = static_cast<GameMessages::GetObjectReportInfo&>(msg);
|
||||
|
||||
bool ActivityComponent::OnGetObjectReportInfo(GameMessages::GetObjectReportInfo& reportInfo) {
|
||||
auto& activityInfo = reportInfo.info->PushDebug("Activity");
|
||||
|
||||
auto& instances = activityInfo.PushDebug("Instances: " + std::to_string(m_Instances.size()));
|
||||
|
||||
Reference in New Issue
Block a user