mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
SetBindPoint converted to xyz_location
This commit is contained in:
parent
2995b20d62
commit
7ce7af05f3
@ -578,7 +578,7 @@ public:
|
||||
void GoToBind(uint8 bindnum = 0);
|
||||
void GoToSafeCoords(uint16 zone_id, uint16 instance_id);
|
||||
void Gate();
|
||||
void SetBindPoint(int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f);
|
||||
void SetBindPoint(int to_zone = -1, int to_instance = 0, const xyz_location& location = xyz_location::Origin());
|
||||
void SetStartZone(uint32 zoneid, float x = 0.0f, float y =0.0f, float z = 0.0f);
|
||||
uint32 GetStartZone(void);
|
||||
void MovePC(const char* zonename, float x, float y, float z, float heading, uint8 ignorerestrictions = 0, ZoneMode zm = ZoneSolicited);
|
||||
|
||||
@ -242,17 +242,17 @@ void Lua_Client::SetBindPoint(int to_zone, int to_instance) {
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, to_instance, new_x);
|
||||
self->SetBindPoint(to_zone, to_instance, xyz_location(new_x,0.0f,0.0f));
|
||||
}
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, to_instance, new_x, new_y);
|
||||
self->SetBindPoint(to_zone, to_instance, xyz_location(new_x, new_y, 0.0f));
|
||||
}
|
||||
|
||||
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetBindPoint(to_zone, to_instance, new_x, new_y, new_z);
|
||||
self->SetBindPoint(to_zone, to_instance, xyz_location(new_x, new_y, new_z));
|
||||
}
|
||||
|
||||
float Lua_Client::GetBindX() {
|
||||
@ -700,13 +700,13 @@ void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug
|
||||
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5);
|
||||
}
|
||||
|
||||
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
||||
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
||||
bool attuned) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, attuned);
|
||||
}
|
||||
|
||||
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
||||
void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
||||
bool attuned, int to_slot) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, attuned, to_slot);
|
||||
@ -1396,7 +1396,7 @@ luabind::scope lua_register_client() {
|
||||
.def("SummonItem", (void(Lua_Client::*)(uint32,int,uint32,uint32,uint32,uint32))&Lua_Client::SummonItem)
|
||||
.def("SummonItem", (void(Lua_Client::*)(uint32,int,uint32,uint32,uint32,uint32,uint32))&Lua_Client::SummonItem)
|
||||
.def("SummonItem", (void(Lua_Client::*)(uint32,int,uint32,uint32,uint32,uint32,uint32,bool))&Lua_Client::SummonItem)
|
||||
.def("SummonItem", (void(Lua_Client::*)(uint32,int,uint32,uint32,uint32,uint32,uint32,bool,int))&Lua_Client::SummonItem)
|
||||
.def("SummonItem", (void(Lua_Client::*)(uint32,int,uint32,uint32,uint32,uint32,uint32,bool,int))&Lua_Client::SummonItem)
|
||||
.def("SetStats", (void(Lua_Client::*)(int,int))&Lua_Client::SetStats)
|
||||
.def("IncStats", (void(Lua_Client::*)(int,int))&Lua_Client::IncStats)
|
||||
.def("DropItem", (void(Lua_Client::*)(int))&Lua_Client::DropItem)
|
||||
|
||||
@ -1072,7 +1072,7 @@ XS(XS_Client_SetBindPoint)
|
||||
new_z = (float)SvNV(ST(5));
|
||||
}
|
||||
|
||||
THIS->SetBindPoint(to_zone, to_instance, new_x, new_y, new_z);
|
||||
THIS->SetBindPoint(to_zone, to_instance, xyz_location(new_x, new_y, new_z));
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
@ -1277,7 +1277,7 @@ XS(XS_Client_MovePC)
|
||||
#ifdef BOTS
|
||||
else if (THIS->IsBot())
|
||||
_log(CLIENT__ERROR, "Perl(XS_Client_MovePC) attempted to process a type Bot reference");
|
||||
#endif
|
||||
#endif
|
||||
else
|
||||
_log(CLIENT__ERROR, "Perl(XS_Client_MovePC) attempted to process an Unknown type reference");
|
||||
|
||||
@ -1327,7 +1327,7 @@ XS(XS_Client_MovePCInstance)
|
||||
else
|
||||
_log(CLIENT__ERROR, "Perl(XS_Client_MovePCInstance) attempted to process an Unknown type reference");
|
||||
|
||||
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||
|
||||
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||
}
|
||||
@ -5087,7 +5087,7 @@ XS(XS_Client_GetTaskActivityDoneCount)
|
||||
Perl_croak(aTHX_ "Usage: Client::GetTaskActivityDoneCount(THIS, TaskID, ActivityID)");
|
||||
{
|
||||
Client * THIS;
|
||||
int RETVAL;
|
||||
int RETVAL;
|
||||
int TaskID = (int)SvIV(ST(1));
|
||||
int ActivityID = (int)SvIV(ST(2));
|
||||
dXSTARG;
|
||||
@ -5101,7 +5101,7 @@ XS(XS_Client_GetTaskActivityDoneCount)
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
|
||||
RETVAL = THIS->GetTaskActivityDoneCountFromTaskID(TaskID, ActivityID);
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
}
|
||||
@ -5945,7 +5945,7 @@ XS(XS_Client_SilentMessage)
|
||||
{
|
||||
Client * THIS;
|
||||
dXSTARG;
|
||||
|
||||
|
||||
if (sv_derived_from(ST(0), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Client *,tmp);
|
||||
@ -6344,7 +6344,7 @@ XS(boot_Client)
|
||||
newXSproto(strcpy(buf, "SendMarqueeMessage"), XS_Client_SendMarqueeMessage, file, "$$$$$$$");
|
||||
newXSproto(strcpy(buf, "SendColoredText"), XS_Client_SendColoredText, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SendSpellAnim"), XS_Client_SendSpellAnim, file, "$$$");
|
||||
|
||||
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
@ -1525,7 +1525,7 @@ void QuestManager::ding() {
|
||||
void QuestManager::rebind(int zoneid, float x, float y, float z) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if(initiator && initiator->IsClient()) {
|
||||
initiator->SetBindPoint(zoneid, x, y, z);
|
||||
initiator->SetBindPoint(zoneid, 0, xyz_location(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -705,7 +705,7 @@ void NPC::Gate() {
|
||||
Mob::Gate();
|
||||
}
|
||||
|
||||
void Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z) {
|
||||
void Client::SetBindPoint(int to_zone, int to_instance, const xyz_location& location) {
|
||||
if (to_zone == -1) {
|
||||
m_pp.binds[0].zoneId = zone->GetZoneID();
|
||||
m_pp.binds[0].instance_id = (zone->GetInstanceID() != 0 && zone->IsInstancePersistent()) ? zone->GetInstanceID() : 0;
|
||||
@ -716,9 +716,9 @@ void Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y
|
||||
else {
|
||||
m_pp.binds[0].zoneId = to_zone;
|
||||
m_pp.binds[0].instance_id = to_instance;
|
||||
m_pp.binds[0].x = new_x;
|
||||
m_pp.binds[0].y = new_y;
|
||||
m_pp.binds[0].z = new_z;
|
||||
m_pp.binds[0].x = location.m_X;
|
||||
m_pp.binds[0].y = location.m_Y;
|
||||
m_pp.binds[0].z = location.m_Z;
|
||||
}
|
||||
auto regularBindPoint = xyz_heading(m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, 0.0f);
|
||||
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[0].zoneId, m_pp.binds[0].instance_id, regularBindPoint, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user