forked from MagicBane/Server
pets stats calculate properly & pet buffs no longer nerf pet
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package engine.powers.poweractions;
|
||||
|
||||
import com.sun.prism.impl.ps.BaseShaderContext;
|
||||
import engine.Enum.GameObjectType;
|
||||
import engine.Enum.ModType;
|
||||
import engine.Enum.SourceType;
|
||||
@@ -140,10 +141,17 @@ public class ApplyEffectPowerAction extends AbstractPowerAction {
|
||||
((Mob) awo).setCombatTarget(source);
|
||||
ChatSystemMsg msg = ChatManager.CombatInfo(source, awo);
|
||||
DispatchMessage.sendToAllInRange(source, msg);
|
||||
((Mob)awo).refresh();
|
||||
}
|
||||
}
|
||||
if (awo != null && awo.getObjectType() == GameObjectType.Mob) {
|
||||
if(((Mob)awo).isPet()) {
|
||||
((Mob) awo).recalculateStats();
|
||||
}
|
||||
}
|
||||
this.effect.startEffect(source, awo, trains, eff);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void _applyEffectForItem(Item item, int trains) {
|
||||
|
||||
@@ -158,6 +158,11 @@ public class CreateMobPowerAction extends AbstractPowerAction {
|
||||
if(pet.isSiege() == false) {
|
||||
MovementManager.translocate(pet, owner.getLoc(), owner.region);
|
||||
}
|
||||
pet.recalculateStats();
|
||||
if(pet.isPet()){
|
||||
pet.healthMax = pet.level * 0.5f * 120;
|
||||
}
|
||||
pet.setHealth(pet.healthMax);
|
||||
PetMsg pm = new PetMsg(5, pet);
|
||||
Dispatch dispatch = Dispatch.borrow(owner, pm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY);
|
||||
|
||||
Reference in New Issue
Block a user