Proper usage for party range configuration.
This commit is contained in:
@@ -664,17 +664,11 @@ AltClanMembersForWar = 15
|
||||
# Party
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# CONFUSING(nothing to do with party) -> When you made damage to a mob
|
||||
# and are inside this range, you will be considered as player to reward.
|
||||
# When you made damage to a mob and are inside this range, you will be considered as player to reward.
|
||||
# Checks for party range to mob to calculate rewards(exp, items).
|
||||
# Default: 1600
|
||||
AltPartyRange = 1600
|
||||
|
||||
# 1. Used for Adena distribution in party
|
||||
# 2. Used to handle random and by turn party loot
|
||||
# Default: 1400
|
||||
AltPartyRange2 = 1400
|
||||
|
||||
# If true, when party leader leaves party, next member in party will be the leader.
|
||||
# If false the party be will dispersed.
|
||||
# Default: False
|
||||
|
@@ -636,7 +636,7 @@ public abstract class AbstractSagaQuest extends Quest
|
||||
for (L2PcInstance player1 : party.getMembers())
|
||||
{
|
||||
final QuestState st1 = findQuest(player1);
|
||||
if ((st1 != null) && player1.isInsideRadius2D(player, Config.ALT_PARTY_RANGE2))
|
||||
if ((st1 != null) && player1.isInsideRadius2D(player, Config.ALT_PARTY_RANGE))
|
||||
{
|
||||
if (st1.isCond(15))
|
||||
{
|
||||
|
@@ -254,7 +254,6 @@ public final class Config
|
||||
public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
|
||||
public static boolean REMOVE_CASTLE_CIRCLETS;
|
||||
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;
|
||||
@@ -1889,7 +1888,6 @@ public final class Config
|
||||
ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Character.getBoolean("AltMembersCanWithdrawFromClanWH", false);
|
||||
REMOVE_CASTLE_CIRCLETS = Character.getBoolean("RemoveCastleCirclets", true);
|
||||
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);
|
||||
|
@@ -158,7 +158,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);
|
||||
}
|
||||
@@ -184,7 +184,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;
|
||||
}
|
||||
@@ -714,7 +714,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);
|
||||
}
|
||||
|
@@ -68,6 +68,7 @@ import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcQuestHtmlMessage;
|
||||
import com.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Quest main class.
|
||||
@@ -2195,7 +2196,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)
|
||||
{
|
||||
@@ -2232,7 +2233,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);
|
||||
}
|
||||
@@ -2279,7 +2280,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);
|
||||
}
|
||||
@@ -2405,7 +2406,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
|
||||
private static boolean checkDistanceToTarget(L2PcInstance player, L2Npc target)
|
||||
{
|
||||
return (target == null) || com.l2jmobius.gameserver.util.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