SHARE
TWEET

Untitled

a guest Aug 12th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     @Override
  3.     public void execute() {
  4.         if (!character.isActive()) { // TODO is this check okay for this? an NPC could be temporarily removed from list
  5.             stop();
  6.         } else {
  7.             PriorityQueue<Hit> hitQueue = character.getCombatState().getHitQueue();
  8.             Skill hitpoints = character.getSkillSet().getSkill(Skill.HITPOINTS);
  9.            
  10.             if (hitQueue.size() > 0) {
  11.                 Hit primaryHit = hitQueue.poll();
  12.                 character.getBlockSet().add(SynchronizationBlock.createPrimaryHitSplatBlock(primaryHit, hitpoints.getMaximumLevel(), hitpoints.getCurrentLevel()));
  13.             }
  14.            
  15.             if (hitQueue.size() > 0) {
  16.                 Hit secondaryHit = hitQueue.poll();
  17.                 character.getBlockSet().add(SynchronizationBlock.createSecondaryHitSplatBlock(secondaryHit, hitpoints.getMaximumLevel(), hitpoints.getCurrentLevel()));
  18.             }
  19.         }
  20.     }
RAW Paste Data
Top