forked from mirror/openmw-tes3mp
[Server] Reorder World script functions
This commit is contained in:
parent
8a5bc77699
commit
70470e12b4
2 changed files with 110 additions and 110 deletions
|
@ -28,6 +28,86 @@ void WorldFunctions::CreateBaseEvent(unsigned short pid) noexcept
|
|||
baseEvent = new BaseEvent(player->guid);
|
||||
}
|
||||
|
||||
unsigned int WorldFunctions::GetObjectChangesSize() noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count;
|
||||
}
|
||||
|
||||
unsigned int WorldFunctions::GetBaseEventAction() noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->action;
|
||||
}
|
||||
|
||||
const char *WorldFunctions::GetObjectRefId(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refId.c_str();
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectRefNumIndex(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refNumIndex;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectCharge(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).charge;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectCount(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).count;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectGoldValue(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).goldValue;
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectScale(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).scale;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectDoorState(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).doorState;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectLockLevel(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).lockLevel;
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosX(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[0];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosY(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[1];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosZ(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[2];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotX(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[0];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotY(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[1];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotZ(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[2];
|
||||
}
|
||||
|
||||
void WorldFunctions::AddWorldObject() noexcept
|
||||
{
|
||||
WorldObject worldObject;
|
||||
|
@ -126,86 +206,6 @@ void WorldFunctions::SetObjectRotation(double x, double y, double z) noexcept
|
|||
tempWorldObject.pos.rot[2] = z;
|
||||
}
|
||||
|
||||
unsigned int WorldFunctions::GetObjectChangesSize() noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count;
|
||||
}
|
||||
|
||||
unsigned int WorldFunctions::GetBaseEventAction() noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->action;
|
||||
}
|
||||
|
||||
const char *WorldFunctions::GetObjectRefId(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refId.c_str();
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectRefNumIndex(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refNumIndex;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectCharge(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).charge;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectCount(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).count;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectGoldValue(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).goldValue;
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectScale(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).scale;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectDoorState(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).doorState;
|
||||
}
|
||||
|
||||
int WorldFunctions::GetObjectLockLevel(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).lockLevel;
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosX(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[0];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosY(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[1];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosZ(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[2];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotX(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[0];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotY(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[1];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotZ(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[2];
|
||||
}
|
||||
|
||||
void WorldFunctions::SendContainer() noexcept
|
||||
{
|
||||
mwmp::Networking::get().getWorldController()->GetPacket(ID_CONTAINER)->Send(baseEvent, baseEvent->guid);
|
||||
|
|
|
@ -4,21 +4,6 @@
|
|||
#define WORLDFUNCTIONS \
|
||||
{"CreateBaseEvent", WorldFunctions::CreateBaseEvent},\
|
||||
\
|
||||
{"AddWorldObject", WorldFunctions::AddWorldObject},\
|
||||
{"SetBaseEventCell", WorldFunctions::SetBaseEventCell},\
|
||||
{"SetBaseEventAction", WorldFunctions::SetBaseEventAction},\
|
||||
\
|
||||
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
||||
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
||||
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
||||
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
||||
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
||||
{"SetObjectScale", WorldFunctions::SetObjectScale},\
|
||||
{"SetObjectDoorState", WorldFunctions::SetObjectDoorState},\
|
||||
{"SetObjectLockLevel", WorldFunctions::SetObjectLockLevel},\
|
||||
{"SetObjectPosition", WorldFunctions::SetObjectPosition},\
|
||||
{"SetObjectRotation", WorldFunctions::SetObjectRotation},\
|
||||
\
|
||||
{"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\
|
||||
{"GetBaseEventAction", WorldFunctions::GetBaseEventAction},\
|
||||
\
|
||||
|
@ -37,6 +22,21 @@
|
|||
{"GetObjectRotY", WorldFunctions::GetObjectRotY},\
|
||||
{"GetObjectRotZ", WorldFunctions::GetObjectRotZ},\
|
||||
\
|
||||
{"AddWorldObject", WorldFunctions::AddWorldObject},\
|
||||
{"SetBaseEventCell", WorldFunctions::SetBaseEventCell},\
|
||||
{"SetBaseEventAction", WorldFunctions::SetBaseEventAction},\
|
||||
\
|
||||
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
||||
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
||||
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
||||
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
||||
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
||||
{"SetObjectScale", WorldFunctions::SetObjectScale},\
|
||||
{"SetObjectDoorState", WorldFunctions::SetObjectDoorState},\
|
||||
{"SetObjectLockLevel", WorldFunctions::SetObjectLockLevel},\
|
||||
{"SetObjectPosition", WorldFunctions::SetObjectPosition},\
|
||||
{"SetObjectRotation", WorldFunctions::SetObjectRotation},\
|
||||
\
|
||||
{"SendContainer", WorldFunctions::SendContainer},\
|
||||
\
|
||||
{"SendObjectDelete", WorldFunctions::SendObjectDelete},\
|
||||
|
@ -56,21 +56,6 @@ public:
|
|||
|
||||
static void CreateBaseEvent(unsigned short pid) noexcept;
|
||||
|
||||
static void AddWorldObject() noexcept;
|
||||
static void SetBaseEventCell(const char* cellDescription) noexcept;
|
||||
static void SetBaseEventAction(int action) noexcept;
|
||||
|
||||
static void SetObjectRefId(const char* refId) noexcept;
|
||||
static void SetObjectRefNumIndex(int refNumIndex) noexcept;
|
||||
static void SetObjectCharge(int charge) noexcept;
|
||||
static void SetObjectCount(int count) noexcept;
|
||||
static void SetObjectGoldValue(int goldValue) noexcept;
|
||||
static void SetObjectScale(double scale) noexcept;
|
||||
static void SetObjectDoorState(int doorState) noexcept;
|
||||
static void SetObjectLockLevel(int lockLevel) noexcept;
|
||||
static void SetObjectPosition(double x, double y, double z) noexcept;
|
||||
static void SetObjectRotation(double x, double y, double z) noexcept;
|
||||
|
||||
static unsigned int GetObjectChangesSize() noexcept;
|
||||
static unsigned int GetBaseEventAction() noexcept;
|
||||
|
||||
|
@ -89,6 +74,21 @@ public:
|
|||
static double GetObjectRotY(unsigned int i) noexcept;
|
||||
static double GetObjectRotZ(unsigned int i) noexcept;
|
||||
|
||||
static void AddWorldObject() noexcept;
|
||||
static void SetBaseEventCell(const char* cellDescription) noexcept;
|
||||
static void SetBaseEventAction(int action) noexcept;
|
||||
|
||||
static void SetObjectRefId(const char* refId) noexcept;
|
||||
static void SetObjectRefNumIndex(int refNumIndex) noexcept;
|
||||
static void SetObjectCharge(int charge) noexcept;
|
||||
static void SetObjectCount(int count) noexcept;
|
||||
static void SetObjectGoldValue(int goldValue) noexcept;
|
||||
static void SetObjectScale(double scale) noexcept;
|
||||
static void SetObjectDoorState(int doorState) noexcept;
|
||||
static void SetObjectLockLevel(int lockLevel) noexcept;
|
||||
static void SetObjectPosition(double x, double y, double z) noexcept;
|
||||
static void SetObjectRotation(double x, double y, double z) noexcept;
|
||||
|
||||
static void SendContainer() noexcept;
|
||||
|
||||
static void SendObjectDelete() noexcept;
|
||||
|
|
Loading…
Reference in a new issue