mobai null resolution
This commit is contained in:
1 parent
ab96cfcda4
commit
6017641896
3 files changed
+40
-36
No files matched your search
@@ -14,6 +14,7 @@ import engine.jobs.AttackJob;
|
||||
import engine.jobs.DeferredPowerJob;
|
||||
import engine.mbEnums;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.PowerProjectileMsg;
|
||||
import engine.net.client.msg.TargetedActionMsg;
|
||||
import engine.net.client.msg.UpdateStateMsg;
|
||||
import engine.objects.*;
|
||||
@@ -319,7 +320,7 @@ public enum CombatManager {
|
||||
DispatchManager.sendToAllInRange(attacker, msg);
|
||||
|
||||
//we need to send the animation even if the attacker misses
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon.template, null, slot));
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon == null ? null : weapon.template, null, slot));
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
|
||||
//set auto attack job
|
||||
@@ -359,7 +360,7 @@ public enum CombatManager {
|
||||
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
//we need to send the animation even if the attacker misses
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon.template, null, slot));
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon == null ? null : weapon.template, null, slot));
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
//set auto attack job
|
||||
setAutoAttackJob(attacker, slot, delay);
|
||||
@@ -447,7 +448,7 @@ public enum CombatManager {
|
||||
if (resists.immuneTo(damageType)) {
|
||||
//set auto attack job
|
||||
//we need to send the animation even if the attacker misses
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon.template, null, slot));
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon == null ? null : weapon.template, null, slot));
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
setAutoAttackJob(attacker, slot, delay);
|
||||
return;
|
||||
@@ -479,6 +480,15 @@ public enum CombatManager {
|
||||
}
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim);
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
|
||||
//siege projectile is sent once per hit, not per AI pulse
|
||||
|
||||
if (attacker.getObjectType().equals(mbEnums.GameObjectType.Mob) && ((Mob) attacker).isSiege()
|
||||
&& target.getObjectType().equals(mbEnums.GameObjectType.Building)) {
|
||||
PowerProjectileMsg ppm = new PowerProjectileMsg(attacker, target);
|
||||
ppm.setRange(50);
|
||||
DispatchManager.dispatchMsgToInterestArea(attacker, ppm, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user