![]() |
#1 |
L2-scripts клиент Classic 1.5 + ГЕО до 1 июля
Регистрация: 23.09.2013
Сообщений: 437
|
![]()
lindvior 10269 built 4 april 2014
if i use condition forbidenclassid in skills, the skill will not work on mobs, creatures please let it work on mobs, or skills become useless if this condition is used in pve Код:
package l2s.gameserver.stats.conditions; import gnu.trove.set.hash.TIntHashSet; import l2s.gameserver.model.Creature; import l2s.gameserver.model.Player; import l2s.gameserver.stats.Env; public class ConditionTargetForbiddenClassId extends Condition { private TIntHashSet _classIds = new TIntHashSet(); public ConditionTargetForbiddenClassId(String[] ids) { for (String id : ids) this._classIds.add(Integer.parseInt(id)); } protected boolean testImpl(Env env) { Creature target = env.target; if (!target.isPlayable()) return false; return (!target.isPlayer()) || (!this._classIds.contains(target.getPlayer().getActiveClassId())); } } |
![]() |