feat: add some info and app logging messages

This commit is contained in:
k0t9i
2023-10-17 23:08:41 +04:00
parent ab85800275
commit a2428bb0d1
12 changed files with 63 additions and 16 deletions

View File

@@ -180,6 +180,7 @@ namespace Interlude
if (_target == 0)
{
_target = This;
Services::ServiceLocator::GetInstance().GetLogger()->Info(L"UGameEngine {:#010x} obtained", (int)_target);
}
(*__Tick)(This, deltaTime);

View File

@@ -2,6 +2,9 @@
#include "../../../Common/apihook.h"
#include "L2GameDataWrapper.h"
#include "ProcessManipulation.h"
#include "Domain/Services/ServiceLocator.h"
using namespace L2Bot::Domain;
namespace Interlude
{
@@ -53,6 +56,7 @@ namespace Interlude
restore(originalInitAddress);
InjectLibrary::StartCurrentProcess();
Services::ServiceLocator::GetInstance().GetLogger()->Info(L"FL2GameData {:#010x} obtained", (int)_target);
return (*__Init)(This, unk, unk1);
}

View File

@@ -166,6 +166,7 @@ namespace Interlude
restore(originalInitAddress);
InjectLibrary::StartCurrentProcess();
Services::ServiceLocator::GetInstance().GetLogger()->Info(L"UNetworkHandler {:#010x} obtained", (int)_target);
(*__Init)(This, unk);
}
}

View File

@@ -26,6 +26,7 @@ namespace Interlude
if (!m_Hero) {
m_Hero = m_Factory.Create(hero);
Services::ServiceLocator::GetInstance().GetEventDispatcher()->Dispatch(Events::HeroCreatedEvent{});
Services::ServiceLocator::GetInstance().GetLogger()->App(L"{} enter in the world", m_Hero->GetFullName().GetNickname());
}
else
{
@@ -34,6 +35,7 @@ namespace Interlude
result[hero->objectId] = m_Hero;
}
else if (m_Hero) {
Services::ServiceLocator::GetInstance().GetLogger()->App(L"{} leave the world", m_Hero->GetFullName().GetNickname());
m_Hero = nullptr;
Services::ServiceLocator::GetInstance().GetEventDispatcher()->Dispatch(Events::HeroDeletedEvent{});
}