From 31914eb0b669bc57e353ab790f7c7a3a0c9e7c8d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 29 Oct 2019 20:32:20 -0500 Subject: [PATCH 1/3] Properly set box size [skip ci] --- zone/command.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 2be3776af..f18b5b26f 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7432,10 +7432,10 @@ void command_roambox(Client *c, const Seperator *sep) WHERE id = {} ), box_size, - npc->GetX() - 100, - npc->GetX() + 100, - npc->GetY() - 100, - npc->GetY() + 100, + npc->GetX() - (box_size / 2), + npc->GetX() + (box_size / 2), + npc->GetY() - (box_size / 2), + npc->GetY() + (box_size / 2), delay, spawn_group_id ); From dadeb01045a8932bc3441be79e26af8b012f6572 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 29 Oct 2019 20:55:27 -0500 Subject: [PATCH 2/3] One more arg [skip ci] --- zone/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index f18b5b26f..44bdd0dad 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7431,7 +7431,7 @@ void command_roambox(Client *c, const Seperator *sep) delay = {} WHERE id = {} ), - box_size, + (box_size / 2), npc->GetX() - (box_size / 2), npc->GetX() + (box_size / 2), npc->GetY() - (box_size / 2), From e2630d2b20e01abc20317fcf0d0e971dc993161d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 29 Oct 2019 23:16:37 -0500 Subject: [PATCH 3/3] Return blank string on null socket [skip ci] --- common/net/tcp_connection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/net/tcp_connection.cpp b/common/net/tcp_connection.cpp index 03f8466de..83d6c89b5 100644 --- a/common/net/tcp_connection.cpp +++ b/common/net/tcp_connection.cpp @@ -203,6 +203,10 @@ int EQ::Net::TCPConnection::LocalPort() const std::string EQ::Net::TCPConnection::RemoteIP() const { + if (!m_socket) { + return ""; + } + sockaddr_storage addr; int addr_len = sizeof(addr); uv_tcp_getpeername(m_socket, (sockaddr*)&addr, &addr_len);