Package l2p.gameserver.skills.conditions

Source Code of l2p.gameserver.skills.conditions.ConditionTargetClan

package l2p.gameserver.skills.conditions;

import l2p.gameserver.model.L2Character;
import l2p.gameserver.skills.Env;

public class ConditionTargetClan extends Condition
{
  private final boolean _test;

  public ConditionTargetClan(String param)
  {
    _test = Boolean.valueOf(param);
  }

  @Override
  protected boolean testImpl(Env env)
  {
    L2Character Char = env.character;
    L2Character target = env.target;
    return Char.getPlayer() != null && target.getPlayer() != null && (Char.getPlayer().getClanId() != 0 && Char.getPlayer().getClanId() == target.getPlayer().getClanId() == _test || Char.getPlayer().getParty() != null && Char.getPlayer().getParty() == target.getPlayer().getParty());
  }
}
TOP

Related Classes of l2p.gameserver.skills.conditions.ConditionTargetClan

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.