Minor adjustments for previous commit.

This commit is contained in:
MobiusDevelopment
2019-08-09 12:36:00 +00:00
parent f9031d41f9
commit 5c7cfee3ed
14 changed files with 70 additions and 168 deletions

View File

@ -16,8 +16,6 @@
*/
package org.l2jmobius.gameserver.network.clientpackets;
import static org.l2jmobius.gameserver.model.actor.Npc.INTERACTION_DISTANCE;
import java.util.Collections;
import java.util.List;
import java.util.OptionalLong;
@ -117,7 +115,11 @@ public class MultiSellChoose implements IClientIncomingPacket
final Npc npc = player.getLastFolkNPC();
if (!list.isNpcAllowed(-1))
{
if ((npc == null) || !list.isNpcAllowed(npc.getId()))
if ((npc == null) //
|| !list.isNpcAllowed(npc.getId()) //
|| !list.checkNpcObjectId(npc.getObjectId()) //
|| (player.getInstanceId() != npc.getInstanceId()) //
|| !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE))
{
if (player.isGM())
{
@ -131,15 +133,6 @@ public class MultiSellChoose implements IClientIncomingPacket
}
}
if (!player.isGM() && (npc != null))
{
if (!player.isInsideRadius3D(npc, INTERACTION_DISTANCE) || (player.getInstanceId() != npc.getInstanceId()))
{
player.setMultiSell(null);
return;
}
}
final MultisellEntryHolder entry = list.getEntries().get(_entryId - 1); // Entry Id begins from 1. We currently use entry IDs as index pointer.
if (entry == null)
{