Add additional validation to the recall power

This commit is contained in:
dongresource 2020-12-28 16:12:23 +01:00
parent d97444cca5
commit 26f4767082

View File

@ -192,6 +192,14 @@ void NanoManager::nanoRecallHandler(CNSocket* sock, CNPacketData* data) {
if (otherPlr == nullptr) if (otherPlr == nullptr)
return; return;
// ensure the group member is still in the same IZ
if (otherPlr->instanceID != plr->instanceID)
return;
// do not allow hypothetical recall points in lairs to mess with the respawn logic
if (PLAYERID(plr->instanceID) != 0)
return;
if ((int32_t)plr->instanceID == otherPlr->recallInstance) if ((int32_t)plr->instanceID == otherPlr->recallInstance)
PlayerManager::sendPlayerTo(sock, otherPlr->recallX, otherPlr->recallY, otherPlr->recallZ, otherPlr->recallInstance); PlayerManager::sendPlayerTo(sock, otherPlr->recallX, otherPlr->recallY, otherPlr->recallZ, otherPlr->recallInstance);
else { else {