mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-03 00:52:25 +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)
189 lines
4.7 KiB
C++
189 lines
4.7 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/embperl.h"
|
|
#include "zone/spawn2.h"
|
|
|
|
void Perl_Spawn_Depop(Spawn2* self)
|
|
{
|
|
self->Depop();
|
|
}
|
|
|
|
void Perl_Spawn_Disable(Spawn2* self)
|
|
{
|
|
return self->Disable();
|
|
}
|
|
|
|
void Perl_Spawn_Enable(Spawn2* self)
|
|
{
|
|
return self->Enable();
|
|
}
|
|
|
|
void Perl_Spawn_ForceDespawn(Spawn2* self)
|
|
{
|
|
self->ForceDespawn();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetCurrentNPCID(Spawn2* self)
|
|
{
|
|
return self->CurrentNPCID();
|
|
}
|
|
|
|
float Perl_Spawn_GetHeading(Spawn2* self)
|
|
{
|
|
return self->GetHeading();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetID(Spawn2* self)
|
|
{
|
|
return self->GetID();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetKillCount(Spawn2* self)
|
|
{
|
|
return self->GetKillCount();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetRespawnTimer(Spawn2* self)
|
|
{
|
|
return self->RespawnTimer();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetSpawnCondition(Spawn2* self)
|
|
{
|
|
return self->GetSpawnCondition();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetSpawnGroupID(Spawn2* self)
|
|
{
|
|
return self->SpawnGroupID();
|
|
}
|
|
|
|
uint32 Perl_Spawn_GetVariance(Spawn2* self)
|
|
{
|
|
return self->GetVariance();
|
|
}
|
|
|
|
float Perl_Spawn_GetX(Spawn2* self)
|
|
{
|
|
return self->GetX();
|
|
}
|
|
|
|
float Perl_Spawn_GetY(Spawn2* self)
|
|
{
|
|
return self->GetY();
|
|
}
|
|
|
|
float Perl_Spawn_GetZ(Spawn2* self)
|
|
{
|
|
return self->GetZ();
|
|
}
|
|
|
|
bool Perl_Spawn_IsEnabled(Spawn2* self)
|
|
{
|
|
return self->Enabled();
|
|
}
|
|
|
|
bool Perl_Spawn_IsNPCPointerValid(Spawn2* self)
|
|
{
|
|
return self->NPCPointerValid();
|
|
}
|
|
|
|
void Perl_Spawn_LoadGrid(Spawn2* self)
|
|
{
|
|
self->LoadGrid();
|
|
}
|
|
|
|
void Perl_Spawn_Repop(Spawn2* self)
|
|
{
|
|
self->Repop();
|
|
}
|
|
|
|
void Perl_Spawn_Repop(Spawn2* self, uint32 delay)
|
|
{
|
|
self->Repop(delay);
|
|
}
|
|
|
|
void Perl_Spawn_Reset(Spawn2* self)
|
|
{
|
|
self->Reset();
|
|
}
|
|
|
|
void Perl_Spawn_SetCurrentNPCID(Spawn2* self, uint32 npc_id)
|
|
{
|
|
self->SetCurrentNPCID(npc_id);
|
|
}
|
|
|
|
void Perl_Spawn_SetNPCPointer(Spawn2* self, NPC* n)
|
|
{
|
|
self->SetNPCPointer(n);
|
|
}
|
|
|
|
void Perl_Spawn_SetRespawnTimer(Spawn2* self, uint32 new_respawn_time)
|
|
{
|
|
self->SetRespawnTimer(new_respawn_time);
|
|
}
|
|
|
|
void Perl_Spawn_SetTimer(Spawn2* self, uint32 duration)
|
|
{
|
|
self->SetTimer(duration);
|
|
}
|
|
|
|
void Perl_Spawn_SetVariance(Spawn2* self, uint32 new_variance)
|
|
{
|
|
self->SetVariance(new_variance);
|
|
}
|
|
|
|
void perl_register_spawn()
|
|
{
|
|
perl::interpreter perl(PERL_GET_THX);
|
|
|
|
auto package = perl.new_class<Spawn2>("Spawn");
|
|
package.add("Depop", (void(*)(Spawn2*))&Perl_Spawn_Depop);
|
|
package.add("Disable", (void(*)(Spawn2*))&Perl_Spawn_Disable);
|
|
package.add("Enable", (void(*)(Spawn2*))&Perl_Spawn_Enable);
|
|
package.add("ForceDespawn", (void(*)(Spawn2*))&Perl_Spawn_ForceDespawn);
|
|
package.add("GetCurrentNPCID", (uint32(*)(Spawn2*))&Perl_Spawn_GetCurrentNPCID);
|
|
package.add("GetHeading", (float(*)(Spawn2*))&Perl_Spawn_GetHeading);
|
|
package.add("GetID", (uint32(*)(Spawn2*))&Perl_Spawn_GetID);
|
|
package.add("GetKillCount", (uint32(*)(Spawn2*))&Perl_Spawn_GetKillCount);
|
|
package.add("GetRespawnTimer", (uint32(*)(Spawn2*))&Perl_Spawn_GetRespawnTimer);
|
|
package.add("GetSpawnCondition", (uint32(*)(Spawn2*))&Perl_Spawn_GetSpawnCondition);
|
|
package.add("GetSpawnGroupID", (uint32(*)(Spawn2*))&Perl_Spawn_GetSpawnGroupID);
|
|
package.add("GetVariance", (uint32(*)(Spawn2*))&Perl_Spawn_GetVariance);
|
|
package.add("GetX", (float(*)(Spawn2*))&Perl_Spawn_GetX);
|
|
package.add("GetY", (float(*)(Spawn2*))&Perl_Spawn_GetY);
|
|
package.add("GetZ", (float(*)(Spawn2*))&Perl_Spawn_GetZ);
|
|
package.add("IsEnabled", (bool(*)(Spawn2*))&Perl_Spawn_IsEnabled);
|
|
package.add("IsNPCPointerValid", (bool(*)(Spawn2*))&Perl_Spawn_IsNPCPointerValid);
|
|
package.add("LoadGrid", (void(*)(Spawn2*))&Perl_Spawn_LoadGrid);
|
|
package.add("Repop", (void(*)(Spawn2*))&Perl_Spawn_Repop);
|
|
package.add("Repop", (void(*)(Spawn2*, uint32))&Perl_Spawn_Repop);
|
|
package.add("Reset", (void(*)(Spawn2*))&Perl_Spawn_Reset);
|
|
package.add("SetCurrentNPCID", (void(*)(Spawn2*, uint32))&Perl_Spawn_SetCurrentNPCID);
|
|
package.add("SetNPCPointer", (void(*)(Spawn2*, NPC*))&Perl_Spawn_SetNPCPointer);
|
|
package.add("SetRespawnTimer", (void(*)(Spawn2*, uint32))&Perl_Spawn_SetRespawnTimer);
|
|
package.add("SetTimer", (void(*)(Spawn2*, uint32))&Perl_Spawn_SetTimer);
|
|
package.add("SetVariance", (void(*)(Spawn2*, uint32))&Perl_Spawn_SetVariance);
|
|
}
|
|
|
|
#endif //EMBPERL_XS_CLASSES
|