Package net.sf.l2j.gameserver.skills.conditions

Examples of net.sf.l2j.gameserver.skills.conditions.ConditionGameChance


    sLv = set.getInteger("onCast_skill_lvl");
    int sCh = set.getInteger("onCast_skill_chance");
    if(sId > 0 && sLv > 0 && sCh > 0)
    {
      L2Skill skill = SkillTable.getInstance().getInfo(sId, sLv);
      skill.attach(new ConditionGameChance(sCh),true);
      attachOnCast(skill);
    }

    sId = set.getInteger("onCrit_skill_id");
    sLv = set.getInteger("onCrit_skill_lvl");
    sCh = set.getInteger("onCrit_skill_chance");
    if(sId > 0 && sLv > 0 && sCh > 0)
    {
      L2Skill skill = SkillTable.getInstance().getInfo(sId, sLv);
      skill.attach(new ConditionGameChance(sCh),true);
      attachOnCrit(skill);
    }
  }
View Full Code Here


        L2Skill skill = SkillTable.getInstance().getInfo(id, lvl);
        if (attrs.getNamedItem("chance") != null)
        {
          if (template instanceof L2Weapon || template instanceof L2Item)
          {
            skill.attach(new ConditionGameChance(Integer.decode(getValue(attrs.getNamedItem("chance").getNodeValue(), template))), true);
          }
          else
          {
            skill.attach(new ConditionGameChance(Integer.decode(getValue(attrs.getNamedItem("chance").getNodeValue(), template))), false);
          }
        }
        if (template instanceof L2Weapon)
        {
            if (attrs.getNamedItem("onUse") != null
View Full Code Here

                cond = joinAnd(cond, new ConditionGameTime(CheckGameTime.NIGHT, val));
            }
            if ("chance".equalsIgnoreCase(a.getNodeName()))
            {
                int val = Integer.decode(getValue(a.getNodeValue(), null));
                cond = joinAnd(cond, new ConditionGameChance(val));
            }
        }
        if (cond == null) _log.severe("Unrecognized <game> condition in " + _file);
        return cond;
    }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.skills.conditions.ConditionGameChance

Copyright © 2018 www.massapicom. 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.