Proper usage for party range configuration.
This commit is contained in:
@ -367,7 +367,6 @@ public final class Config
|
||||
public static boolean ALT_GAME_CANCEL_CAST;
|
||||
public static boolean ALT_GAME_TIREDNESS;
|
||||
public static int ALT_PARTY_RANGE;
|
||||
public static int ALT_PARTY_RANGE2;
|
||||
public static boolean ALT_GAME_SHIELD_BLOCKS;
|
||||
public static int ALT_PERFECT_SHLD_BLOCK;
|
||||
public static boolean ALT_GAME_MOB_ATTACK_AI;
|
||||
@ -1840,7 +1839,6 @@ public final class Config
|
||||
ALT_GAME_FREIGHTS = Boolean.parseBoolean(altSettings.getProperty("AltGameFreights", "false"));
|
||||
ALT_GAME_FREIGHT_PRICE = Integer.parseInt(altSettings.getProperty("AltGameFreightPrice", "1000"));
|
||||
ALT_PARTY_RANGE = Integer.parseInt(altSettings.getProperty("AltPartyRange", "1600"));
|
||||
ALT_PARTY_RANGE2 = Integer.parseInt(altSettings.getProperty("AltPartyRange2", "1400"));
|
||||
REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(altSettings.getProperty("RemoveCastleCirclets", "true"));
|
||||
LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(altSettings.getProperty("LifeCrystalNeeded", "true"));
|
||||
SP_BOOK_NEEDED = Boolean.parseBoolean(altSettings.getProperty("SpBookNeeded", "true"));
|
||||
|
@ -163,7 +163,7 @@ public class L2Party
|
||||
|
||||
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);
|
||||
}
|
||||
@ -195,7 +195,7 @@ public class L2Party
|
||||
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;
|
||||
}
|
||||
@ -669,7 +669,7 @@ public class L2Party
|
||||
|
||||
for (L2PcInstance member : membersList)
|
||||
{
|
||||
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE, target, member, true))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ public class Quest extends ManagedScript
|
||||
|
||||
/**
|
||||
* @param player : The player instance to check.
|
||||
* @return true if the given player got an online clan member sponsor in a 1500 radius range.
|
||||
* @return true if the given player got an online clan member sponsor in a 1600 radius range.
|
||||
*/
|
||||
public static boolean getSponsor(L2PcInstance player)
|
||||
{
|
||||
@ -324,7 +324,7 @@ public class Quest extends ManagedScript
|
||||
{
|
||||
// The sponsor is online, retrieve player instance and check distance.
|
||||
final L2PcInstance sponsor = member.getPlayerInstance();
|
||||
if ((sponsor != null) && player.isInsideRadius(sponsor, 1500, true, false))
|
||||
if ((sponsor != null) && player.isInsideRadius(sponsor, Config.ALT_PARTY_RANGE, true, false))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -335,7 +335,7 @@ public class Quest extends ManagedScript
|
||||
|
||||
/**
|
||||
* @param player : The player instance to check.
|
||||
* @return the apprentice of the given player. He must be online, and in a 1500 radius range.
|
||||
* @return the apprentice of the given player. He must be online, and in a 1600 radius range.
|
||||
*/
|
||||
public static L2PcInstance getApprentice(L2PcInstance player)
|
||||
{
|
||||
@ -359,7 +359,7 @@ public class Quest extends ManagedScript
|
||||
{
|
||||
// The apprentice is online, retrieve player instance and check distance.
|
||||
final L2PcInstance academic = member.getPlayerInstance();
|
||||
if ((academic != null) && player.isInsideRadius(academic, 1500, true, false))
|
||||
if ((academic != null) && player.isInsideRadius(academic, Config.ALT_PARTY_RANGE, true, false))
|
||||
{
|
||||
return academic;
|
||||
}
|
||||
@ -1611,7 +1611,7 @@ public class Quest extends ManagedScript
|
||||
* @param npc : the instance of a L2Npc to compare distance
|
||||
* @param var : a tuple specifying a quest condition that must be satisfied for a party member to be considered.
|
||||
* @param value : a tuple specifying a quest condition that must be satisfied for a party member to be considered.
|
||||
* @return Player : Player for a random party member that matches the specified condition, or null if no match. If the var is null, null is returned (i.e. no condition is applied). The party member must be within 1500 distance from the npc. If npc is null, distance condition is ignored.
|
||||
* @return Player : Player for a random party member that matches the specified condition, or null if no match. If the var is null, null is returned (i.e. no condition is applied). The party member must be within 1600 distance from the npc. If npc is null, distance condition is ignored.
|
||||
*/
|
||||
public L2PcInstance getRandomPartyMember(L2PcInstance player, L2NpcInstance npc, String var, String value)
|
||||
{
|
||||
@ -1647,8 +1647,8 @@ public class Quest extends ManagedScript
|
||||
* @param player the instance of a player whose party is to be searched
|
||||
* @param var a tuple specifying a quest condition that must be satisfied for a party member to be considered.
|
||||
* @param value
|
||||
* @return L2PcInstance: L2PcInstance for a random party member that matches the specified condition, or null if no match. If the var is null, any random party member is returned (i.e. no condition is applied). The party member must be within 1500 distance from the target of the reference
|
||||
* player, or if no target exists, 1500 distance from the player itself.
|
||||
* @return L2PcInstance: L2PcInstance for a random party member that matches the specified condition, or null if no match. If the var is null, any random party member is returned (i.e. no condition is applied). The party member must be within 1600 distance from the target of the reference
|
||||
* player, or if no target exists, 1600 distance from the player itself.
|
||||
*/
|
||||
public L2PcInstance getRandomPartyMember(L2PcInstance player, String var, String value)
|
||||
{
|
||||
@ -1693,7 +1693,7 @@ public class Quest extends ManagedScript
|
||||
for (L2PcInstance partyMember : party.getPartyMembers())
|
||||
{
|
||||
temp = partyMember.getQuestState(_name);
|
||||
if ((temp != null) && (temp.get(var) != null) && ((String) temp.get(var)).equalsIgnoreCase(value) && partyMember.isInsideRadius(target, 1500, true, false))
|
||||
if ((temp != null) && (temp.get(var) != null) && ((String) temp.get(var)).equalsIgnoreCase(value) && partyMember.isInsideRadius(target, Config.ALT_PARTY_RANGE, true, false))
|
||||
{
|
||||
candidates.add(partyMember);
|
||||
}
|
||||
@ -1799,7 +1799,7 @@ public class Quest extends ManagedScript
|
||||
{
|
||||
temp = partyMember.getQuestState(_name);
|
||||
|
||||
if ((temp != null) && (temp.getState() == state) && partyMember.isInsideRadius(target, 1500, true, false))
|
||||
if ((temp != null) && (temp.getState() == state) && partyMember.isInsideRadius(target, Config.ALT_PARTY_RANGE, true, false))
|
||||
{
|
||||
candidates.add(partyMember);
|
||||
}
|
||||
|
Reference in New Issue
Block a user