Proper usage for party range configuration.
This commit is contained in:
@ -256,7 +256,6 @@ public final class Config
|
||||
public static boolean REMOVE_CASTLE_CIRCLETS;
|
||||
public static int ALT_PARTY_MAX_MEMBERS;
|
||||
public static int ALT_PARTY_RANGE;
|
||||
public static int ALT_PARTY_RANGE2;
|
||||
public static boolean ALT_LEAVE_PARTY_LEADER;
|
||||
public static boolean INITIAL_EQUIPMENT_EVENT;
|
||||
public static long STARTING_ADENA;
|
||||
@ -1615,7 +1614,6 @@ public final class Config
|
||||
REMOVE_CASTLE_CIRCLETS = Character.getBoolean("RemoveCastleCirclets", true);
|
||||
ALT_PARTY_MAX_MEMBERS = Character.getInt("AltPartyMaxMembers", 7);
|
||||
ALT_PARTY_RANGE = Character.getInt("AltPartyRange", 1600);
|
||||
ALT_PARTY_RANGE2 = Character.getInt("AltPartyRange2", 1400);
|
||||
ALT_LEAVE_PARTY_LEADER = Character.getBoolean("AltLeavePartyLeader", false);
|
||||
INITIAL_EQUIPMENT_EVENT = Character.getBoolean("InitialEquipmentEvent", false);
|
||||
STARTING_ADENA = Character.getLong("StartingAdena", 0);
|
||||
|
@ -170,7 +170,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
final List<L2PcInstance> availableMembers = new ArrayList<>();
|
||||
for (L2PcInstance member : _members)
|
||||
{
|
||||
if (member.getInventory().validateCapacityByItemId(itemId) && Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||
if (member.getInventory().validateCapacityByItemId(itemId) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, target, member, true))
|
||||
{
|
||||
availableMembers.add(member);
|
||||
}
|
||||
@ -196,7 +196,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
try
|
||||
{
|
||||
member = _members.get(_itemLastLoot);
|
||||
if (member.getInventory().validateCapacityByItemId(ItemId) && Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||
if (member.getInventory().validateCapacityByItemId(ItemId) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, target, member, true))
|
||||
{
|
||||
return member;
|
||||
}
|
||||
@ -802,7 +802,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
final List<L2PcInstance> toReward = new LinkedList<>();
|
||||
for (L2PcInstance member : _members)
|
||||
{
|
||||
if (Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||
if (Util.checkIfInRange(Config.ALT_PARTY_RANGE, target, member, true))
|
||||
{
|
||||
toReward.add(member);
|
||||
}
|
||||
|
@ -2460,7 +2460,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
* @param value the value of the specified quest variable the random party member must have
|
||||
* @return a random party member that matches the specified conditions or {@code null} if no match was found.<br>
|
||||
* If the {@code var} parameter is {@code null}, a random party member is selected without any conditions.<br>
|
||||
* The party member must be within a range of 1500 ingame units of the target of the reference player, or, if no target exists, within the same range of the player itself
|
||||
* The party member must be within a range of 1600 ingame units of the target of the reference player, or, if no target exists, within the same range of the player itself
|
||||
*/
|
||||
public L2PcInstance getRandomPartyMember(L2PcInstance player, String var, String value)
|
||||
{
|
||||
@ -2506,7 +2506,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
continue;
|
||||
}
|
||||
temp = partyMember.getQuestState(getName());
|
||||
if ((temp != null) && (temp.get(var) != null) && (temp.get(var)).equalsIgnoreCase(value) && partyMember.isInsideRadius3D(target, 1500))
|
||||
if ((temp != null) && (temp.get(var) != null) && (temp.get(var)).equalsIgnoreCase(value) && partyMember.isInsideRadius3D(target, Config.ALT_PARTY_RANGE))
|
||||
{
|
||||
candidates.add(partyMember);
|
||||
}
|
||||
@ -2569,7 +2569,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
continue;
|
||||
}
|
||||
temp = partyMember.getQuestState(getName());
|
||||
if ((temp != null) && (temp.getState() == state) && partyMember.isInsideRadius3D(target, 1500))
|
||||
if ((temp != null) && (temp.getState() == state) && partyMember.isInsideRadius3D(target, Config.ALT_PARTY_RANGE))
|
||||
{
|
||||
candidates.add(partyMember);
|
||||
}
|
||||
@ -2700,7 +2700,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
|
||||
private static boolean checkDistanceToTarget(L2PcInstance player, L2Npc target)
|
||||
{
|
||||
return (target == null) || Util.checkIfInRange(1500, player, target, true);
|
||||
return (target == null) || Util.checkIfInRange(Config.ALT_PARTY_RANGE, player, target, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user