Sync with L2jServer HighFive Sep 11th 2015.

This commit is contained in:
MobiusDev
2015-09-12 10:36:13 +00:00
parent 8d8e6db3d4
commit cc669ba506
172 changed files with 1128 additions and 23 deletions

View File

@ -23,7 +23,6 @@ import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.ai.L2CharacterAI;
import com.l2jserver.gameserver.ai.L2SummonAI;
import com.l2jserver.gameserver.data.xml.impl.ExperienceData;
import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.enums.InstanceType;
import com.l2jserver.gameserver.enums.Race;
import com.l2jserver.gameserver.enums.ShotType;
@ -44,7 +43,6 @@ import com.l2jserver.gameserver.model.effects.L2EffectType;
import com.l2jserver.gameserver.model.events.EventDispatcher;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerSummonSpawn;
import com.l2jserver.gameserver.model.itemcontainer.PetInventory;
import com.l2jserver.gameserver.model.items.L2EtcItem;
import com.l2jserver.gameserver.model.items.L2Weapon;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.items.type.ActionType;
@ -134,8 +132,6 @@ public abstract class L2Summon extends L2Playable
// if someone comes into range now, the animation shouldn't show any more
_restoreSummon = false;
rechargeShots(true, true);
// Notify to scripts
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSummonSpawn(this), this);
}
@ -468,14 +464,6 @@ public abstract class L2Summon extends L2Playable
setTarget(null);
if (owner != null)
{
for (int itemId : owner.getAutoSoulShot())
{
String handler = ((L2EtcItem) ItemTable.getInstance().getTemplate(itemId)).getHandlerName();
if ((handler != null) && handler.contains("Beast"))
{
owner.disableAutoShot(itemId);
}
}
owner.setUsedSummonPoints(owner.getUsedSummonPoints() - _summonPoints);
}
}

View File

@ -1400,7 +1400,7 @@ public final class Skill implements IIdentifiable
}
// Support for buff sharing feature including healing herbs.
if (effected.isPlayer() && effected.hasServitors() && (_abnormalType != AbnormalType.TRANSFORM))
if (effected.isPlayer() && effected.hasServitors() && !isTransformation())
{
if ((addContinuousEffects && isContinuous() && !isDebuff()) || isRecoveryHerb())
{

View File

@ -516,7 +516,7 @@ public final class Formulas
double power = skill.getPower(isPvP, isPvE);
double damage = 0;
double proximityBonus = attacker.isBehindTarget() ? 1.2 : attacker.isInFrontOfTarget() ? 1 : 1.1; // Behind: +20% - Side: +10% (TODO: values are unconfirmed, possibly custom, remove or update when confirmed);
double ssboost = ss ? 2 : 1;
double ssboost = ss ? 1.458 : 1;
double pvpBonus = 1;
if (isPvP)
@ -608,7 +608,7 @@ public final class Formulas
boolean isPvE = attacker.isPlayable() && target.isAttackable();
double damage = 0;
double proximityBonus = attacker.isBehindTarget() ? 1.2 : attacker.isInFrontOfTarget() ? 1 : 1.1; // Behind: +20% - Side: +10% (TODO: values are unconfirmed, possibly custom, remove or update when confirmed)
double ssboost = ss ? 2 : 1;
double ssboost = ss ? 1.458 : 1;
double pvpBonus = 1;
if (isPvP)
@ -691,6 +691,7 @@ public final class Formulas
{
final boolean isPvP = attacker.isPlayable() && target.isPlayable();
final boolean isPvE = attacker.isPlayable() && target.isAttackable();
double proximityBonus = attacker.isBehindTarget() ? 1.2 : attacker.isInFrontOfTarget() ? 1 : 1.1; // Behind: +20% - Side: +10%
double damage = attacker.getPAtk(target);
double defence = target.getPDef(attacker);
@ -759,14 +760,14 @@ public final class Formulas
if (crit)
{
// Retail like formula.
damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * attacker.calcStat(Stats.CRITICAL_DAMAGE_POS, 1, target, skill) * target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, null) * ((76 * damage) / (defence * reduceDef));
damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * attacker.calcStat(Stats.CRITICAL_DAMAGE_POS, 1, target, skill) * target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, null) * ((76 * damage * proximityBonus) / (defence * reduceDef));
// Crit dmg add is almost useless in normal hits.
damage += ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 77) / (defence * reduceDef));
damage += target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill);
}
else
{
damage = (76 * damage) / (defence * reduceDef);
damage = (76 * damage * proximityBonus) / (defence * reduceDef);
}
damage *= calcAttackTraitBonus(attacker, target);
@ -1764,6 +1765,10 @@ public final class Formulas
else
{
attack_attribute = attacker.getAttackElementValue(attacker.getAttackElement());
if (attack_attribute == 0)
{
return 1;
}
}
int defence_attribute = target.getDefenseElementValue(attacker.getAttackElement());