|
|
|
@ -528,7 +528,7 @@ public enum CombatManager {
@@ -528,7 +528,7 @@ public enum CombatManager {
|
|
|
|
|
float atr; |
|
|
|
|
int minDamage, maxDamage; |
|
|
|
|
int errorTrack = 0; |
|
|
|
|
|
|
|
|
|
int subTrack = 0; |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
if (ac == null) |
|
|
|
@ -824,31 +824,39 @@ public enum CombatManager {
@@ -824,31 +824,39 @@ public enum CombatManager {
|
|
|
|
|
if (tarAc.isSit()) |
|
|
|
|
damage *= 2.5f; //increase damage if sitting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subTrack = 1; |
|
|
|
|
|
|
|
|
|
if (tarAc.getObjectType() == GameObjectType.Mob) { |
|
|
|
|
Mob mobTarget = (Mob) tarAc; |
|
|
|
|
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter)) { |
|
|
|
|
subTrack = 2; |
|
|
|
|
if (mobTarget.playerAgroMap.containsKey(ac.getObjectUUID())) { |
|
|
|
|
subTrack = 3; |
|
|
|
|
float hateValue = damage + mobTarget.playerAgroMap.get(ac.getObjectUUID()); |
|
|
|
|
mobTarget.playerAgroMap.put(ac.getObjectUUID(), hateValue); |
|
|
|
|
} else { |
|
|
|
|
mobTarget.playerAgroMap.put(ac.getObjectUUID(), damage); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
subTrack = 4; |
|
|
|
|
} |
|
|
|
|
mobTarget.handleDirectAggro(ac); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (tarAc.getHealth() > 0) |
|
|
|
|
d = tarAc.modifyHealth(-damage, ac, false); |
|
|
|
|
subTrack = 5; |
|
|
|
|
} else if (target.getObjectType().equals(GameObjectType.Building)) { |
|
|
|
|
|
|
|
|
|
subTrack = 6; |
|
|
|
|
if (BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) { |
|
|
|
|
ac.setCombatTarget(null); |
|
|
|
|
subTrack = 7; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
subTrack = 8; |
|
|
|
|
if (target.getHealth() > 0) |
|
|
|
|
d = ((Building) target).modifyHealth(-damage, ac); |
|
|
|
|
subTrack = 9; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
errorTrack = 13; |
|
|
|
@ -949,7 +957,7 @@ public enum CombatManager {
@@ -949,7 +957,7 @@ public enum CombatManager {
|
|
|
|
|
ac.cancelOnAttack(); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
Logger.error(ac.getName() + ' ' + errorTrack + ' ' + e); |
|
|
|
|
Logger.error(ac.getName() + ' ' + "ErrorTrack: " + errorTrack + " ErrorSubTrack = " + subTrack + e); |
|
|
|
|
Logger.error(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|