mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 17:45:32 +00:00
[Server] Add deprecated alternatives for ObjectList functions
This will avoid server crashes in older scripts.
This commit is contained in:
parent
51698bed48
commit
2ac334664b
2 changed files with 64 additions and 1 deletions
|
@ -449,3 +449,45 @@ void ObjectFunctions::SendConsoleCommand(bool broadcast) noexcept
|
|||
if (broadcast)
|
||||
packet->Send(true);
|
||||
}
|
||||
|
||||
// All methods below are deprecated versions of methods from above
|
||||
|
||||
void ObjectFunctions::ReadLastEvent() noexcept
|
||||
{
|
||||
ReadLastObjectList();
|
||||
}
|
||||
|
||||
void ObjectFunctions::InitializeEvent(unsigned short pid) noexcept
|
||||
{
|
||||
InitializeObjectList(pid);
|
||||
}
|
||||
|
||||
unsigned char ObjectFunctions::GetEventAction() noexcept
|
||||
{
|
||||
return GetObjectListAction();
|
||||
}
|
||||
|
||||
unsigned char ObjectFunctions::GetEventContainerSubAction() noexcept
|
||||
{
|
||||
return GetObjectListContainerSubAction();
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetEventCell(const char* cellDescription) noexcept
|
||||
{
|
||||
SetObjectListCell(cellDescription);
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetEventAction(unsigned char action) noexcept
|
||||
{
|
||||
SetObjectListAction(action);
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetEventConsoleCommand(const char* consoleCommand) noexcept
|
||||
{
|
||||
SetObjectListConsoleCommand(consoleCommand);
|
||||
}
|
||||
|
||||
void ObjectFunctions::AddWorldObject() noexcept
|
||||
{
|
||||
AddObject();
|
||||
}
|
||||
|
|
|
@ -81,7 +81,16 @@
|
|||
{"SendDoorState", ObjectFunctions::SendDoorState},\
|
||||
{"SendDoorDestination", ObjectFunctions::SendDoorDestination},\
|
||||
{"SendContainer", ObjectFunctions::SendContainer},\
|
||||
{"SendConsoleCommand", ObjectFunctions::SendConsoleCommand}
|
||||
{"SendConsoleCommand", ObjectFunctions::SendConsoleCommand},\
|
||||
\
|
||||
{"ReadLastEvent", ObjectFunctions::ReadLastEvent},\
|
||||
{"InitializeEvent", ObjectFunctions::InitializeEvent},\
|
||||
{"GetEventAction", ObjectFunctions::GetEventAction},\
|
||||
{"GetEventContainerSubAction", ObjectFunctions::GetEventContainerSubAction},\
|
||||
{"SetEventCell", ObjectFunctions::SetEventCell},\
|
||||
{"SetEventAction", ObjectFunctions::SetEventAction},\
|
||||
{"SetEventConsoleCommand", ObjectFunctions::SetEventConsoleCommand},\
|
||||
{"AddWorldObject", ObjectFunctions::AddWorldObject}
|
||||
|
||||
class ObjectFunctions
|
||||
{
|
||||
|
@ -747,6 +756,18 @@ public:
|
|||
*/
|
||||
static void SendConsoleCommand(bool broadcast = false) noexcept;
|
||||
|
||||
|
||||
// All methods below are deprecated versions of methods from above
|
||||
|
||||
static void ReadLastEvent() noexcept;
|
||||
static void InitializeEvent(unsigned short pid) noexcept;
|
||||
static unsigned char GetEventAction() noexcept;
|
||||
static unsigned char GetEventContainerSubAction() noexcept;
|
||||
static void SetEventCell(const char* cellDescription) noexcept;
|
||||
static void SetEventAction(unsigned char action) noexcept;
|
||||
static void SetEventConsoleCommand(const char* consoleCommand) noexcept;
|
||||
static void AddWorldObject() noexcept;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue