Package lineage2.gameserver.stats.conditions

Source Code of lineage2.gameserver.stats.conditions.ConditionCastleLightClanLeader

package lineage2.gameserver.stats.conditions;

import lineage2.gameserver.model.Player;
import lineage2.gameserver.stats.Env;

public class ConditionCastleLightClanLeader extends Condition
{
  public ConditionCastleLightClanLeader()
  {
  }

  @Override
  protected boolean testImpl(Env env)
  {
    if(!env.character.isPlayer())
    {
      return false;
    }

    Player player = env.character.getPlayer();

    if(player.getClan() == null || player.getCastle() == null)
    {
      return false;
    }

    if(!player.isClanLeader())
    {
      return false;
    }

    return player.getCastle().isCastleTypeLight();
  }
}
TOP

Related Classes of lineage2.gameserver.stats.conditions.ConditionCastleLightClanLeader

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.