mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +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 GoToBind(uint8 bindnum = 0);
|
||||||
void GoToSafeCoords(uint16 zone_id, uint16 instance_id);
|
void GoToSafeCoords(uint16 zone_id, uint16 instance_id);
|
||||||
void Gate();
|
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);
|
void SetStartZone(uint32 zoneid, float x = 0.0f, float y =0.0f, float z = 0.0f);
|
||||||
uint32 GetStartZone(void);
|
uint32 GetStartZone(void);
|
||||||
void MovePC(const char* zonename, float x, float y, float z, float heading, uint8 ignorerestrictions = 0, ZoneMode zm = ZoneSolicited);
|
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) {
|
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x) {
|
||||||
Lua_Safe_Call_Void();
|
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) {
|
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y) {
|
||||||
Lua_Safe_Call_Void();
|
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) {
|
void Lua_Client::SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z) {
|
||||||
Lua_Safe_Call_Void();
|
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() {
|
float Lua_Client::GetBindX() {
|
||||||
|
|||||||
@ -1072,7 +1072,7 @@ XS(XS_Client_SetBindPoint)
|
|||||||
new_z = (float)SvNV(ST(5));
|
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;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1525,7 +1525,7 @@ void QuestManager::ding() {
|
|||||||
void QuestManager::rebind(int zoneid, float x, float y, float z) {
|
void QuestManager::rebind(int zoneid, float x, float y, float z) {
|
||||||
QuestManagerCurrentQuestVars();
|
QuestManagerCurrentQuestVars();
|
||||||
if(initiator && initiator->IsClient()) {
|
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();
|
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) {
|
if (to_zone == -1) {
|
||||||
m_pp.binds[0].zoneId = zone->GetZoneID();
|
m_pp.binds[0].zoneId = zone->GetZoneID();
|
||||||
m_pp.binds[0].instance_id = (zone->GetInstanceID() != 0 && zone->IsInstancePersistent()) ? zone->GetInstanceID() : 0;
|
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 {
|
else {
|
||||||
m_pp.binds[0].zoneId = to_zone;
|
m_pp.binds[0].zoneId = to_zone;
|
||||||
m_pp.binds[0].instance_id = to_instance;
|
m_pp.binds[0].instance_id = to_instance;
|
||||||
m_pp.binds[0].x = new_x;
|
m_pp.binds[0].x = location.m_X;
|
||||||
m_pp.binds[0].y = new_y;
|
m_pp.binds[0].y = location.m_Y;
|
||||||
m_pp.binds[0].z = new_z;
|
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);
|
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);
|
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