Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public double absorbToSummon(double damage)
- {
- double transferToSummonDam = calcStat(Stats.TRANSFER_TO_SUMMON_DAMAGE_PERCENT, 0.);
- if(transferToSummonDam > 0.)
- {
- Summon summon = getPet();
- double transferDamage = damage * transferToSummonDam * 0.01;
- if(summon == null || summon.isDead() || !summon.isSummon())
- return damage;
- if(summon.isInRangeZ(this, 900) && summon.getCurrentHp() > transferDamage)
- {
- damage -= transferDamage;
- summon.reduceCurrentHp(transferDamage, summon, null, true, false, false, false, true, false, true);
- }
- }
- return damage;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement