[Server] Add script functions for setting world object placement info

This commit is contained in:
David Cernat 2017-01-29 16:16:01 +02:00
parent 2c5cc82f49
commit 920c1113a3
2 changed files with 14 additions and 0 deletions

View file

@ -61,6 +61,16 @@ void WorldFunctions::SetObjectRefNumIndex(unsigned int i, int refNumIndex) noexc
worldEvent->objectChanges.objects[i].refNumIndex = refNumIndex;
}
void WorldFunctions::SetObjectCount(unsigned int i, int count) noexcept
{
worldEvent->objectChanges.objects[i].count = count;
}
void WorldFunctions::SetObjectGoldValue(unsigned int i, int goldValue) noexcept
{
worldEvent->objectChanges.objects[i].goldValue = goldValue;
}
void WorldFunctions::SetObjectPosition(unsigned int i, double x, double y, double z) noexcept
{
worldEvent->objectChanges.objects[i].pos.pos[0] = x;

View file

@ -9,6 +9,8 @@
\
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
{"SetObjectCount", WorldFunctions::SetObjectCount},\
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
{"SetObjectPosition", WorldFunctions::SetObjectPosition},\
\
{"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\
@ -39,6 +41,8 @@ public:
static void SetObjectRefId(unsigned int i, const char* refId) noexcept;
static void SetObjectRefNumIndex(unsigned int i, int refNumIndex) noexcept;
static void SetObjectCount(unsigned int i, int count) noexcept;
static void SetObjectGoldValue(unsigned int i, int goldValue) noexcept;
static void SetObjectPosition(unsigned int i, double x, double y, double z) noexcept;
static unsigned int GetObjectChangesSize() noexcept;