Improved attacker and defender's party check

This commit is contained in:
bm01
2012-05-08 19:39:12 +02:00
parent 946ea19371
commit 9b3838b912
2 changed files with 17 additions and 16 deletions

View File

@ -268,9 +268,7 @@ public class Combat {
int damage = event.getDamage();
if (permInstance.archery(attacker) && damage > 0) {
if (permInstance.archeryBonus(attacker)) {
/*Archery needs a damage bonus to be viable in PVP*/
int skillLvl = Users.getProfile(attacker).getSkillLevel(SkillType.ARCHERY);
double dmgBonusPercent = ((skillLvl / 50) * 0.1D);
@ -293,16 +291,8 @@ public class Combat {
startGainXp(attacker, PPa, target, SkillType.ARCHERY, pluginx);
if (target instanceof Player) {
Player defender = (Player) target;
PlayerProfile PPd = Users.getProfile(defender);
if (PPa.inParty() && PPd.inParty() && Party.getInstance().inSameParty(defender, attacker)) {
event.setCancelled(true);
return;
}
if (permInstance.daze(attacker)) {
Archery.dazeCheck(defender, attacker);
Archery.dazeCheck((Player) target, attacker);
}
}
}