Jump to content

`Rοmeο

Legendary Member
  • Posts

    8,223
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by `Rοmeο

  1. RapidShare
  2. guys you have realy serious problems with that lags ... I left for that too... maybe when you finaly fix them I will come back :) thanks :
  3. spawnlist: Thats for interlude
  4. I like that one Couse ive never see it before :D
  5. maybe netstat -n will help you
  6. oh mine god thank you sooo much !!! I was serching for something like that for one friend ! Thanks !
  7. nop Dr.House fixed it realy long time ago :D
  8. omg the website total pwnz ! I like it alot. But in the forum i dont see alot of peoples like the other l2off servers :(
  9. how to download the patch ?
  10. mine is the awesomes :D:D (couse is for me) 10/10 :)
  11. LOL !!! Rozdex thats true ?
  12. 100+++++++++ Awesome !
  13. then what is speaking that guy ? :D:D
  14. the ddos fixed ? couse I whanna play serious ...
  15. Show the proofs. Couse if this is real bb... I don't whanna play shit servers like Overdose !!! Couse in the forum I see one idiot that posted a pic that he and his clan are all the heros in the server. I loved that server but when the admins fucked me up in the olly I get so mad that ive broked a keybopard ! I dont whant this to happend again
  16. yep 10 mins ago the lag was amaizing huge :( I hope that you will fix all in a day so I can play normal :)
  17. AMAIZING ! I Belive that this is your work. You are painting realy awesome man ! Just perfect work. 100000000000/10 ;)
  18. What about that one ? http://www.maxcheaters.com/forum/index.php?topic=49324.0 did you tested ? :D
  19. what about to put a status in the webpage ? Only Login ... Game ... ? If you put top 50 top 10 etc... will be great !
  20. Tested and working Index: /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/ForceBuff.java =================================================================== --- /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/ForceBuff.java (revision 281) +++ /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/ForceBuff.java (revision 304) @@ -21,104 +21,86 @@ import java.util.concurrent.Future; +import java.util.logging.Logger; +import net.sf.l2j.gameserver.GeoData; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.skills.effects.EffectForce; +import net.sf.l2j.gameserver.util.Util; +import net.sf.l2j.gameserver.model.L2Effect; +import net.sf.l2j.gameserver.model.L2Skill; +import net.sf.l2j.gameserver.model.ForceBuff; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +public final class ForceBuff -/** - * @author kombat - * - */ -public class ForceBuff { - static final Log _log = LogFactory.getLog(ForceBuff.class.getName()); - - protected L2PcInstance _caster; - private L2PcInstance _target; - private L2Skill _skill; - private L2Skill _force; - @SuppressWarnings("unchecked") - private Future _task; - private boolean _applied; - - public L2PcInstance getCaster() { return _caster; } - public L2PcInstance getTarget() { return _target; } - public L2Skill getSkill() { return _skill; } - public L2Skill getForce() { return _force; } - @SuppressWarnings("unchecked") - protected void setTask(Future task) { _task = task; } - protected void setApplied(boolean applied) { _applied = applied; } - - public ForceBuff(L2PcInstance caster, L2PcInstance target, L2Skill skill) - { - _caster = caster; - _target = target; - _skill = skill; - _force = SkillTable.getInstance().getInfo(skill.getForceId(), 1); - _applied = false; - - Runnable r = new Runnable() + protected static final Logger _log = Logger.getLogger(ForceBuff.class.getName()); + + final int _skillCastRange; + final int _forceId; + protected int _forceLevel; + L2PcInstance _caster; + L2PcInstance _target; + Future<?> _geoCheckTask; + + public L2PcInstance getCaster() + { + return _caster; + } + + public L2PcInstance getTarget() + { + return _target; + } + + public ForceBuff(L2PcInstance caster, L2PcInstance target, L2Skill skill) + { + _skillCastRange = skill.getCastRange(); + _caster = caster; + _target = target; + _forceId = skill.getTriggeredId(); + _forceLevel = skill.getTriggeredLevel(); + + L2Effect effect = _target.getFirstEffect(_forceId); + if (effect != null) { - public void run() - { - setApplied(true); - setTask(null); - - int forceId = getForce().getId(); - boolean create = true; - L2Effect[] effects = getTarget().getAllEffects(); - if (effects != null) - { - for(L2Effect e : effects) - { - if (e.getSkill().getId() == forceId) - { - EffectForce ef = (EffectForce)e; - if(ef.forces < 3) - ef.increaseForce(); - create = false; - break; - } - } - } - if(create) - { - getForce().getEffects(_caster, getTarget()); - } - } - }; - setTask(ThreadPoolManager.getInstance().scheduleGeneral(r, 2000)); + ((EffectForce)effect).increaseForce(); + } + else + { + L2Skill force = SkillTable.getInstance().getInfo(_forceId, _forceLevel); + if (force != null) + force.getEffects(_caster, _target); + else + _log.warning("Triggered skill ["+_forceId+";"+_forceLevel+"] not found!"); + } + _geoCheckTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new GeoCheckTask(), 1000, 1000); } - - public void delete() - { - if (_task != null) - { - _task.cancel(false); - _task = null; - } - - _caster.setForceBuff(null); - - if(!_applied) return; - - int toDeleteId = getForce().getId(); - - L2Effect[] effects = _target.getAllEffects(); - if (effects != null) - { - for(L2Effect e : effects) - { - if (e.getSkill().getId() == toDeleteId && (e instanceof EffectForce)) - { - ((EffectForce)e).decreaseForce(); - break; - } - } - } - } + + public void delete() + { + _caster.setForceBuff(null); + L2Effect effect = _target.getFirstEffect(_forceId); + if (effect != null) + ((EffectForce)effect).decreaseForce(); + + _geoCheckTask.cancel(true); + } + + class GeoCheckTask implements Runnable + { + public void run() + { + try + { + if (!Util.checkIfInRange(_skillCastRange, _caster, _target, true)) + delete(); + + if (!GeoData.getInstance().canSeeTarget(_caster, _target)) + delete(); + } + catch (Exception e){} + } + } }
  21. Sorry but I dont like it its realy not cool :(
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock