mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-02 20:42:28 +00:00
- License was intended to be GPLv3 per earlier commit of GPLv3 LICENSE FILE - This is confirmed by the inclusion of libraries that are incompatible with GPLv2 - This is also confirmed by KLS and the agreement of KLS's predecessors - Added GPLv3 license headers to the compilable source files - Removed Folly licensing in strings.h since the string functions do not match the Folly functions and are standard functions - this must have been left over from previous implementations - Removed individual contributor license headers since the project has been under the "developer" mantle for many years - Removed comments on files that were previously automatically generated since they've been manually modified multiple times and there are no automatic scripts referencing them (removed in 2023)
347 lines
8.9 KiB
C++
347 lines
8.9 KiB
C++
/* EQEmu: EQEmulator
|
|
|
|
Copyright (C) 2001-2026 EQEmu Development Team
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#include "common/features.h"
|
|
|
|
#ifdef EMBPERL_XS_CLASSES
|
|
|
|
#include "zone/doors.h"
|
|
#include "zone/embperl.h"
|
|
|
|
uint32_t Perl_Doors_GetDoorDBID(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetDoorDBID();
|
|
}
|
|
|
|
uint32_t Perl_Doors_GetDoorID(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetDoorID();
|
|
}
|
|
|
|
uint32_t Perl_Doors_GetID(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetEntityID();
|
|
}
|
|
|
|
float Perl_Doors_GetX(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetPosition().x;
|
|
}
|
|
|
|
float Perl_Doors_GetY(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetPosition().y;
|
|
}
|
|
|
|
float Perl_Doors_GetZ(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetPosition().z;
|
|
}
|
|
|
|
float Perl_Doors_GetHeading(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetPosition().w;
|
|
}
|
|
|
|
uint32_t Perl_Doors_GetOpenType(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetOpenType();
|
|
}
|
|
|
|
uint32_t Perl_Doors_GetLockPick(Doors* self) // @categories Doors, Skills and Recipes
|
|
{
|
|
return self->GetLockpick();
|
|
}
|
|
|
|
uint32_t Perl_Doors_GetKeyItem(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetKeyItem();
|
|
}
|
|
|
|
uint8_t Perl_Doors_GetNoKeyring(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetNoKeyring();
|
|
}
|
|
|
|
int Perl_Doors_GetIncline(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetIncline();
|
|
}
|
|
|
|
uint32_t Perl_Doors_GetSize(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetSize();
|
|
}
|
|
|
|
void Perl_Doors_SetOpenType(Doors* self, uint32_t open_type) // @categories Doors
|
|
{
|
|
self->SetOpenType(open_type);
|
|
}
|
|
|
|
void Perl_Doors_SetLockPick(Doors* self, uint32_t lockpick_type) // @categories Doors
|
|
{
|
|
self->SetLockpick(lockpick_type);
|
|
}
|
|
|
|
void Perl_Doors_SetKeyItem(Doors* self, uint32_t key_item_id) // @categories Doors
|
|
{
|
|
self->SetKeyItem(key_item_id);
|
|
}
|
|
|
|
void Perl_Doors_SetNoKeyring(Doors* self, uint8_t no_key_ring) // @categories Doors
|
|
{
|
|
self->SetNoKeyring(no_key_ring);
|
|
}
|
|
|
|
void Perl_Doors_SetIncline(Doors* self, uint32_t incline) // @categories Doors
|
|
{
|
|
self->SetIncline(incline);
|
|
}
|
|
|
|
void Perl_Doors_SetSize(Doors* self, uint32_t size) // @categories Doors
|
|
{
|
|
self->SetSize(size);
|
|
}
|
|
|
|
void Perl_Doors_SetLocation(Doors* self, float x, float y, float z) // @categories Doors
|
|
{
|
|
self->SetLocation(x, y, z);
|
|
}
|
|
|
|
void Perl_Doors_SetX(Doors* self, float x) // @categories Doors
|
|
{
|
|
auto position = self->GetPosition();
|
|
position.x = x;
|
|
self->SetPosition(position);
|
|
}
|
|
|
|
void Perl_Doors_SetY(Doors* self, float y) // @categories Doors
|
|
{
|
|
auto position = self->GetPosition();
|
|
position.y = y;
|
|
self->SetPosition(position);
|
|
}
|
|
|
|
void Perl_Doors_SetZ(Doors* self, float z) // @categories Doors
|
|
{
|
|
auto position = self->GetPosition();
|
|
position.z = z;
|
|
self->SetPosition(position);
|
|
}
|
|
|
|
void Perl_Doors_SetHeading(Doors* self, float heading) // @categories Doors
|
|
{
|
|
auto position = self->GetPosition();
|
|
position.w = heading;
|
|
self->SetPosition(position);
|
|
}
|
|
|
|
void Perl_Doors_SetModelName(Doors* self, const char* name) // @categories Doors
|
|
{
|
|
self->SetDoorName(name);
|
|
}
|
|
|
|
std::string Perl_Doors_GetModelName(Doors* self) // @categories Doors
|
|
{
|
|
return self->GetDoorName();
|
|
}
|
|
|
|
void Perl_Doors_CreateDatabaseEntry(Doors* self) // @categories Doors
|
|
{
|
|
self->CreateDatabaseEntry();
|
|
}
|
|
|
|
void Perl_Doors_ForceClose(Doors* self, Mob* sender)
|
|
{
|
|
self->ForceClose(sender);
|
|
}
|
|
|
|
void Perl_Doors_ForceClose(Doors* self, Mob* sender, bool alt_mode)
|
|
{
|
|
self->ForceClose(sender, alt_mode);
|
|
}
|
|
|
|
void Perl_Doors_ForceOpen(Doors* self, Mob* sender)
|
|
{
|
|
self->ForceOpen(sender);
|
|
}
|
|
|
|
void Perl_Doors_ForceOpen(Doors* self, Mob* sender, bool alt_mode)
|
|
{
|
|
self->ForceOpen(sender, alt_mode);
|
|
}
|
|
|
|
bool Perl_Doors_GetDisableTimer(Doors* self)
|
|
{
|
|
return self->GetDisableTimer();
|
|
}
|
|
|
|
void Perl_Doors_SetDisableTimer(Doors* self, bool disable_timer)
|
|
{
|
|
self->SetDisableTimer(disable_timer);
|
|
}
|
|
|
|
uint8 Perl_Doors_GetTriggerDoorID(Doors* self)
|
|
{
|
|
return self->GetTriggerDoorID();
|
|
}
|
|
|
|
uint8 Perl_Doors_GetTriggerType(Doors* self)
|
|
{
|
|
return self->GetTriggerType();
|
|
}
|
|
|
|
bool Perl_Doors_IsLDoNDoor(Doors* self)
|
|
{
|
|
return self->IsLDoNDoor();
|
|
}
|
|
|
|
uint32 Perl_Doors_GetClientVersionMask(Doors* self)
|
|
{
|
|
return self->GetClientVersionMask();
|
|
}
|
|
|
|
int Perl_Doors_GetDoorParam(Doors* self)
|
|
{
|
|
return self->GetDoorParam();
|
|
}
|
|
|
|
bool Perl_Doors_HasDestinationZone(Doors* self)
|
|
{
|
|
return self->HasDestinationZone();
|
|
}
|
|
|
|
bool Perl_Doors_IsDestinationZoneSame(Doors* self)
|
|
{
|
|
return self->IsDestinationZoneSame();
|
|
}
|
|
|
|
bool Perl_Doors_IsDoorBlacklisted(Doors* self)
|
|
{
|
|
return self->IsDoorBlacklisted();
|
|
}
|
|
|
|
std::string Perl_Doors_GetDestinationZoneName(Doors* self)
|
|
{
|
|
return self->GetDestinationZoneName();
|
|
}
|
|
|
|
int Perl_Doors_GetDestinationInstanceID(Doors* self)
|
|
{
|
|
return self->GetDestinationInstanceID();
|
|
}
|
|
|
|
float Perl_Doors_GetDestinationX(Doors* self)
|
|
{
|
|
return self->GetDestinationX();
|
|
}
|
|
|
|
float Perl_Doors_GetDestinationY(Doors* self)
|
|
{
|
|
return self->GetDestinationY();
|
|
}
|
|
|
|
float Perl_Doors_GetDestinationZ(Doors* self)
|
|
{
|
|
return self->GetDestinationZ();
|
|
}
|
|
|
|
float Perl_Doors_GetDestinationHeading(Doors* self)
|
|
{
|
|
return self->GetDestinationHeading();
|
|
}
|
|
|
|
int Perl_Doors_GetDzSwitchID(Doors* self)
|
|
{
|
|
return self->GetDzSwitchID();
|
|
}
|
|
|
|
int Perl_Doors_GetInvertState(Doors* self)
|
|
{
|
|
return self->GetInvertState();
|
|
}
|
|
|
|
void Perl_Doors_SetInvertState(Doors* self, int invert_state)
|
|
{
|
|
self->SetInvertState(invert_state);
|
|
}
|
|
|
|
uint32 Perl_Doors_GetGuildID(Doors* self)
|
|
{
|
|
return self->GetGuildID();
|
|
}
|
|
|
|
void perl_register_doors()
|
|
{
|
|
perl::interpreter perl(PERL_GET_THX);
|
|
|
|
auto package = perl.new_class<Doors>("Doors");
|
|
package.add("CreateDatabaseEntry", &Perl_Doors_CreateDatabaseEntry);
|
|
package.add("ForceClose", (void(*)(Doors*, Mob*))&Perl_Doors_ForceClose);
|
|
package.add("ForceClose", (void(*)(Doors*, Mob*, bool))&Perl_Doors_ForceClose);
|
|
package.add("ForceOpen", (void(*)(Doors*, Mob*))&Perl_Doors_ForceOpen);
|
|
package.add("ForceOpen", (void(*)(Doors*, Mob*, bool))&Perl_Doors_ForceOpen);
|
|
package.add("GetClientVersionMask", &Perl_Doors_GetClientVersionMask);
|
|
package.add("GetDestinationHeading", &Perl_Doors_GetDestinationHeading);
|
|
package.add("GetDestinationInstanceID", &Perl_Doors_GetDestinationInstanceID);
|
|
package.add("GetDestinationX", &Perl_Doors_GetDestinationX);
|
|
package.add("GetDestinationY", &Perl_Doors_GetDestinationY);
|
|
package.add("GetDestinationZ", &Perl_Doors_GetDestinationZ);
|
|
package.add("GetDestinationZoneName", &Perl_Doors_GetDestinationZoneName);
|
|
package.add("GetDisableTimer", &Perl_Doors_GetDisableTimer);
|
|
package.add("GetDoorDBID", &Perl_Doors_GetDoorDBID);
|
|
package.add("GetDoorID", &Perl_Doors_GetDoorID);
|
|
package.add("GetDoorParam", &Perl_Doors_GetDoorParam);
|
|
package.add("GetDzSwitchID", &Perl_Doors_GetDzSwitchID);
|
|
package.add("GetGuildID", &Perl_Doors_GetGuildID);
|
|
package.add("GetHeading", &Perl_Doors_GetHeading);
|
|
package.add("GetID", &Perl_Doors_GetID);
|
|
package.add("GetIncline", &Perl_Doors_GetIncline);
|
|
package.add("GetInvertState", &Perl_Doors_GetInvertState);
|
|
package.add("GetKeyItem", &Perl_Doors_GetKeyItem);
|
|
package.add("GetLockPick", &Perl_Doors_GetLockPick);
|
|
package.add("GetModelName", &Perl_Doors_GetModelName);
|
|
package.add("GetNoKeyring", &Perl_Doors_GetNoKeyring);
|
|
package.add("GetOpenType", &Perl_Doors_GetOpenType);
|
|
package.add("GetSize", &Perl_Doors_GetSize);
|
|
package.add("GetTriggerDoorID", &Perl_Doors_GetTriggerDoorID);
|
|
package.add("GetTriggerType", &Perl_Doors_GetTriggerType);
|
|
package.add("GetX", &Perl_Doors_GetX);
|
|
package.add("GetY", &Perl_Doors_GetY);
|
|
package.add("GetZ", &Perl_Doors_GetZ);
|
|
package.add("HasDestinationZone", &Perl_Doors_HasDestinationZone);
|
|
package.add("IsDestinationZoneSame", &Perl_Doors_IsDestinationZoneSame);
|
|
package.add("IsDoorBlacklisted", &Perl_Doors_IsDoorBlacklisted);
|
|
package.add("IsLDoNDoor", &Perl_Doors_IsLDoNDoor);
|
|
package.add("SetDisableTimer", &Perl_Doors_SetDisableTimer);
|
|
package.add("SetHeading", &Perl_Doors_SetHeading);
|
|
package.add("SetIncline", &Perl_Doors_SetIncline);
|
|
package.add("SetInvertState", &Perl_Doors_SetInvertState);
|
|
package.add("SetKeyItem", &Perl_Doors_SetKeyItem);
|
|
package.add("SetLocation", &Perl_Doors_SetLocation);
|
|
package.add("SetLockPick", &Perl_Doors_SetLockPick);
|
|
package.add("SetModelName", &Perl_Doors_SetModelName);
|
|
package.add("SetNoKeyring", &Perl_Doors_SetNoKeyring);
|
|
package.add("SetOpenType", &Perl_Doors_SetOpenType);
|
|
package.add("SetSize", &Perl_Doors_SetSize);
|
|
package.add("SetX", &Perl_Doors_SetX);
|
|
package.add("SetY", &Perl_Doors_SetY);
|
|
package.add("SetZ", &Perl_Doors_SetZ);
|
|
}
|
|
|
|
#endif //EMBPERL_XS_CLASSES
|