mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 20:49:56 +00:00
32 lines
854 B
C++
32 lines
854 B
C++
#include "Miscellaneous.hpp"
|
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
|
#include <apps/openmw-mp/Networking.hpp>
|
|
#include <components/openmw-mp/Log.hpp>
|
|
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
unsigned int MiscellaneousFunctions::GetLastPlayerId() noexcept
|
|
{
|
|
return Players::getLastPlayerId();
|
|
}
|
|
|
|
int MiscellaneousFunctions::GetCurrentMpNum() noexcept
|
|
{
|
|
return mwmp::Networking::getPtr()->getCurrentMpNum();
|
|
}
|
|
|
|
void MiscellaneousFunctions::SetCurrentMpNum(int mpNum) noexcept
|
|
{
|
|
mwmp::Networking::getPtr()->setCurrentMpNum(mpNum);
|
|
}
|
|
|
|
void MiscellaneousFunctions::LogMessage(unsigned short level, const char *message) noexcept
|
|
{
|
|
LOG_MESSAGE_SIMPLE(level, "[Script]: %s", message);
|
|
}
|
|
|
|
void MiscellaneousFunctions::LogAppend(unsigned short level, const char *message) noexcept
|
|
{
|
|
LOG_APPEND(level, "[Script]: %s", message);
|
|
}
|