Various community board merchant improvements.
This commit is contained in:
@ -822,6 +822,7 @@ public final class Config
|
||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||
public static boolean COMMUNITYBOARD_COMBAT_DISABLED;
|
||||
public static boolean FACTION_SYSTEM_ENABLED;
|
||||
public static Location FACTION_STARTING_LOCATION;
|
||||
public static int FACTION_MANAGER_NPCID;
|
||||
@ -2598,6 +2599,7 @@ public final class Config
|
||||
COMMUNITYBOARD_ENABLE_BUFFS = CustomSettings.getBoolean("CommunityEnableBuffs", true);
|
||||
COMMUNITYBOARD_TELEPORT_PRICE = CustomSettings.getInt("CommunityTeleportPrice", 0);
|
||||
COMMUNITYBOARD_BUFF_PRICE = CustomSettings.getInt("CommunityBuffPrice", 0);
|
||||
COMMUNITYBOARD_COMBAT_DISABLED = CustomSettings.getBoolean("CommunityCombatDisabled", true);
|
||||
|
||||
String[] tempString;
|
||||
FACTION_SYSTEM_ENABLED = Boolean.valueOf(CustomSettings.getBoolean("EnableFactionSystem", false));
|
||||
|
@ -241,7 +241,7 @@ public final class MultisellData implements IXmlReader
|
||||
return;
|
||||
}
|
||||
|
||||
if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly()))
|
||||
if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())))
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": player " + player + " attempted to open multisell " + listId + " from npc " + npc + " which is not allowed!");
|
||||
return;
|
||||
|
@ -99,7 +99,7 @@ public class MultiSellChoose extends L2GameClientPacket
|
||||
}
|
||||
|
||||
final L2Npc npc = player.getLastFolkNPC();
|
||||
if (((npc != null) && !list.isNpcAllowed(npc.getId())) || ((npc == null) && list.isNpcOnly()))
|
||||
if (!list.isNpcAllowed(-1) && (((npc != null) && !list.isNpcAllowed(npc.getId())) || ((npc == null) && list.isNpcOnly())))
|
||||
{
|
||||
player.setMultiSell(null);
|
||||
return;
|
||||
|
@ -43,6 +43,7 @@ public final class RequestRefundItem extends L2GameClientPacket
|
||||
private static final String _C__D0_75_REQUESTREFUNDITEM = "[C] D0:75 RequestRefundItem";
|
||||
|
||||
private static final int BATCH_LENGTH = 4; // length of the one item
|
||||
private static final int CUSTOM_CB_SELL_LIST = 423;
|
||||
|
||||
private int _listId;
|
||||
private int[] _items = null;
|
||||
@ -91,25 +92,19 @@ public final class RequestRefundItem extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
L2Object target = player.getTarget();
|
||||
if (!player.isGM() && ((target == null) || !(target instanceof L2MerchantInstance) || (player.getInstanceId() != target.getInstanceId()) || !player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
final L2Object target = player.getTarget();
|
||||
L2Character merchant = null;
|
||||
if (target instanceof L2MerchantInstance)
|
||||
if (!player.isGM() && (_listId != CUSTOM_CB_SELL_LIST))
|
||||
{
|
||||
if (!(target instanceof L2MerchantInstance) || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) || (player.getInstanceId() != target.getInstanceId()))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
merchant = (L2Character) target;
|
||||
}
|
||||
else if (!player.isGM())
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
if (merchant == null)
|
||||
if ((merchant == null) && !player.isGM() && (_listId != CUSTOM_CB_SELL_LIST))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@ -122,7 +117,7 @@ public final class RequestRefundItem extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (!buyList.isNpcAllowed(merchant.getId()))
|
||||
if ((merchant != null) && !buyList.isNpcAllowed(merchant.getId()))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user