Addition of friendly command channel configuration.
This commit is contained in:
@@ -557,6 +557,10 @@ AltPartyRange = 1500
|
||||
# Default: False
|
||||
AltLeavePartyLeader = False
|
||||
|
||||
# Consider same command channel members friends. (Used by target handlers.)
|
||||
# Retail is supposed to be false, but have no proof that it is like that.
|
||||
AltCommandChannelFriends = False
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Initial Settings:
|
||||
|
@@ -16,7 +16,9 @@
|
||||
*/
|
||||
package handlers.targethandlers.affectobject;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -49,6 +51,16 @@ public class Friend implements IAffectObjectHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.ALT_COMMAND_CHANNEL_FRIENDS)
|
||||
{
|
||||
final CommandChannel playerCC = player.getCommandChannel();
|
||||
final CommandChannel targetCC = targetPlayer.getCommandChannel();
|
||||
if ((playerCC != null) && (targetCC != null) && (playerCC.getLeaderObjectId() == targetCC.getLeaderObjectId()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Party (command channel doesn't make you friends).
|
||||
final Party party = player.getParty();
|
||||
final Party targetParty = targetPlayer.getParty();
|
||||
|
@@ -16,7 +16,9 @@
|
||||
*/
|
||||
package handlers.targethandlers.affectobject;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -47,6 +49,16 @@ public class FriendPc implements IAffectObjectHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.ALT_COMMAND_CHANNEL_FRIENDS)
|
||||
{
|
||||
final CommandChannel playerCC = player.getCommandChannel();
|
||||
final CommandChannel targetCC = targetPlayer.getCommandChannel();
|
||||
if ((playerCC != null) && (targetCC != null) && (playerCC.getLeaderObjectId() == targetCC.getLeaderObjectId()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Party (command channel doesn't make you friends).
|
||||
final Party party = player.getParty();
|
||||
final Party targetParty = targetPlayer.getParty();
|
||||
|
@@ -16,7 +16,9 @@
|
||||
*/
|
||||
package handlers.targethandlers.affectobject;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -58,6 +60,16 @@ public class NotFriend implements IAffectObjectHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Config.ALT_COMMAND_CHANNEL_FRIENDS)
|
||||
{
|
||||
final CommandChannel playerCC = player.getCommandChannel();
|
||||
final CommandChannel targetCC = targetPlayer.getCommandChannel();
|
||||
if ((playerCC != null) && (targetCC != null) && (playerCC.getLeaderObjectId() == targetCC.getLeaderObjectId()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Party (command channel doesn't make you friends).
|
||||
final Party party = player.getParty();
|
||||
final Party targetParty = targetPlayer.getParty();
|
||||
|
@@ -16,7 +16,9 @@
|
||||
*/
|
||||
package handlers.targethandlers.affectobject;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.handler.IAffectObjectHandler;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -58,6 +60,16 @@ public class NotFriendPc implements IAffectObjectHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Config.ALT_COMMAND_CHANNEL_FRIENDS)
|
||||
{
|
||||
final CommandChannel playerCC = player.getCommandChannel();
|
||||
final CommandChannel targetCC = targetPlayer.getCommandChannel();
|
||||
if ((playerCC != null) && (targetCC != null) && (playerCC.getLeaderObjectId() == targetCC.getLeaderObjectId()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Party (command channel doesn't make you friends).
|
||||
final Party party = player.getParty();
|
||||
final Party targetParty = targetPlayer.getParty();
|
||||
|
@@ -270,6 +270,7 @@ public class Config
|
||||
public static int ALT_PARTY_MAX_MEMBERS;
|
||||
public static int ALT_PARTY_RANGE;
|
||||
public static boolean ALT_LEAVE_PARTY_LEADER;
|
||||
public static boolean ALT_COMMAND_CHANNEL_FRIENDS;
|
||||
public static boolean INITIAL_EQUIPMENT_EVENT;
|
||||
public static long STARTING_ADENA;
|
||||
public static byte STARTING_LEVEL;
|
||||
@@ -1753,6 +1754,7 @@ public class Config
|
||||
ALT_PARTY_MAX_MEMBERS = Character.getInt("AltPartyMaxMembers", 7);
|
||||
ALT_PARTY_RANGE = Character.getInt("AltPartyRange", 1500);
|
||||
ALT_LEAVE_PARTY_LEADER = Character.getBoolean("AltLeavePartyLeader", false);
|
||||
ALT_COMMAND_CHANNEL_FRIENDS = Character.getBoolean("AltCommandChannelFriends", false);
|
||||
INITIAL_EQUIPMENT_EVENT = Character.getBoolean("InitialEquipmentEvent", false);
|
||||
STARTING_ADENA = Character.getLong("StartingAdena", 0);
|
||||
STARTING_LEVEL = Character.getByte("StartingLevel", (byte) 1);
|
||||
|
Reference in New Issue
Block a user