L2-scripts Форум

L2-scripts Форум (http://l2-scripts.ru/forum/index.php)
-   Archive Lindvior, Ertheia, Odyssey, Undergeround, Helios, Grand Crusade (http://l2-scripts.ru/forum/forumdisplay.php?f=103)
-   -   [CORE] FOrbiddenclassid condition not working on mobs (http://l2-scripts.ru/forum/showthread.php?t=4327)

boulanger 05.04.2014 12:33

[CORE] FOrbiddenclassid condition not working on mobs
 
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()));
  }
}


iqman 07.04.2014 00:14

Done .


Часовой пояс GMT +4, время: 18:02.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd. Перевод: zCarot