Addition of friendly command channel configuration.
This commit is contained in:
		| @@ -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(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment