mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Don't need that anymore.
This commit is contained in:
parent
ec8581a835
commit
07a0f43825
@ -1,30 +0,0 @@
|
||||
package com.gmail.nossr50.skills.archery;
|
||||
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
|
||||
public class SkillShotEventHandler {
|
||||
private ArcheryManager manager;
|
||||
private EntityDamageEvent event;
|
||||
|
||||
protected double damageBonusPercent;
|
||||
|
||||
protected SkillShotEventHandler(ArcheryManager manager, EntityDamageEvent event) {
|
||||
this.manager = manager;
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
protected void calculateDamageBonus() {
|
||||
this.damageBonusPercent = ((manager.getSkillLevel() / Archery.skillShotIncreaseLevel) * Archery.skillShotIncreasePercentage);
|
||||
|
||||
if (damageBonusPercent > Archery.skillShotMaxBonusPercentage) {
|
||||
damageBonusPercent = Archery.skillShotMaxBonusPercentage;
|
||||
}
|
||||
}
|
||||
|
||||
protected void modifyEventDamage() {
|
||||
int damage = event.getDamage();
|
||||
int archeryBonus = (int) (damage * damageBonusPercent);
|
||||
|
||||
event.setDamage(damage + archeryBonus);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user