From 69a8086d7f1dfa61ebaff52b0256e4a1022527a1 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 10 Jul 2018 20:22:46 +1000 Subject: [PATCH 1/2] fixed inter-instance gm calling, fixes #341 as a note, calling someone into an instance has been disabled --- .../Network/Handlers/GMCommandHandlers.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp index b68be510..23687b2d 100644 --- a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp @@ -551,8 +551,14 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R } case GmCommand::Call: { - if( targetPlayer->getZoneId() != player.getZoneId() ) - targetPlayer->setZone( player.getZoneId() ); + // We shouldn't be able to call a player into an instance, only call them out of one + if( player.getCurrentInstance() ) + { + player.sendUrgent("You are unable to call a player while bound to a battle instance."); + return; + } + + targetPlayer->setInstance( player.getCurrentZone() ); targetPlayer->changePosition( player.getPos().x, player.getPos().y, player.getPos().z, player.getRot() ); player.sendNotice( "Calling " + targetPlayer->getName() ); From fccf3daf952abc04096774fe6a0345a1cc75ae52 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 10 Jul 2018 20:25:08 +1000 Subject: [PATCH 2/2] style --- .../sapphire_zone/Network/Handlers/GMCommandHandlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp index 23687b2d..4a583bc6 100644 --- a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp @@ -554,7 +554,7 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R // We shouldn't be able to call a player into an instance, only call them out of one if( player.getCurrentInstance() ) { - player.sendUrgent("You are unable to call a player while bound to a battle instance."); + player.sendUrgent( "You are unable to call a player while bound to a battle instance." ); return; }