Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void execute() {
- if (!character.isActive()) { // TODO is this check okay for this? an NPC could be temporarily removed from list
- stop();
- } else {
- PriorityQueue<Hit> hitQueue = character.getCombatState().getHitQueue();
- Skill hitpoints = character.getSkillSet().getSkill(Skill.HITPOINTS);
- if (hitQueue.size() > 0) {
- Hit primaryHit = hitQueue.poll();
- character.getBlockSet().add(SynchronizationBlock.createPrimaryHitSplatBlock(primaryHit, hitpoints.getMaximumLevel(), hitpoints.getCurrentLevel()));
- }
- if (hitQueue.size() > 0) {
- Hit secondaryHit = hitQueue.poll();
- character.getBlockSet().add(SynchronizationBlock.createSecondaryHitSplatBlock(secondaryHit, hitpoints.getMaximumLevel(), hitpoints.getCurrentLevel()));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement