rendered paste bodyIndex: java/net/sf/l2j/gameserver/model/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/L2Attackable.java (revision 1420)
+++ java/net/sf/l2j/gameserver/model/L2Attackable.java (working copy)
@@ -281,6 +281,8 @@
/** Have this L2Attackable to reward Exp and SP on Die? **/
private boolean _mustGiveExpSp;
+
+ private boolean _isUsingShots = false;
/**
* Constructor of L2Attackable (use L2Character and L2NpcInstance constructor).<BR><BR>
*
@@ -297,8 +299,17 @@
super(objectId, template);
getKnownList(); // init knownlist
_mustGiveExpSp = true;
+
+ if (getLevel()>70 && !(this.isRaid()))
+ if (this.getRightHandItem()>0)
+ if (Rnd.get(100)<10+getLevel()-70){ // Set % chance to 10% + mob level - 70, so mob lvl 71->11%, 72->12% etc...
+ _isUsingShots = true;
+ }
}
+ public boolean isUsingShots(){
+ return _isUsingShots;
+ }
@Override
public AttackableKnownList getKnownList()
{
Index: java/net/sf/l2j/gameserver/model/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/L2Character.java (revision 1420)
+++ java/net/sf/l2j/gameserver/model/L2Character.java (working copy)
@@ -77,6 +77,7 @@
import net.sf.l2j.gameserver.serverpackets.ChangeWaitType;
import net.sf.l2j.gameserver.serverpackets.CharInfo;
import net.sf.l2j.gameserver.serverpackets.CharMoveToLocation;
+import net.sf.l2j.gameserver.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.serverpackets.ExOlympiadSpelledInfo;
import net.sf.l2j.gameserver.serverpackets.L2GameServerPacket;
import net.sf.l2j.gameserver.serverpackets.MagicEffectIcons;
@@ -713,6 +714,11 @@
else
wasSSCharged = (weaponInst != null && weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE);
+ if (this instanceof L2Attackable && ((L2Attackable)this).isUsingShots()){
+ wasSSCharged = true;
+ ((L2Attackable)this).broadcastPacket(new MagicSkillUser(this, this, 2153, 1, 0, 0), 360000/*600*/);
+ ((L2Attackable)this).broadcastPacket(new ExAutoSoulShot(5789, 0));
+ }
// Get the Attack Speed of the L2Character (delay (in milliseconds) before next attack)
int timeAtk = calculateTimeBetweenAttacks(target, weaponItem);
// the hit is calculated to happen halfway to the animation - might need further tuning e.g. in bow case
@@ -1177,6 +1183,9 @@
//Recharge AutoSoulShot
if (skill.useSoulShot())
{
+ if ((this instanceof L2Attackable && ((L2Attackable)this).isUsingShots())){
+ ((L2Attackable)this).broadcastPacket(new ExAutoSoulShot(5789, 0));
+ }
if (this instanceof L2PcInstance)
((L2PcInstance)this).rechargeAutoSoulShot(true, false, false);
else if (this instanceof L2Summon)
@@ -1184,6 +1193,9 @@
}
else if (skill.useSpiritShot())
{
+ if ((this instanceof L2Attackable && ((L2Attackable)this).isUsingShots())){
+ ((L2Attackable)this).broadcastPacket(new ExAutoSoulShot(3952, 0));
+ }
if (this instanceof L2PcInstance)
((L2PcInstance)this).rechargeAutoSoulShot(false, true, false);
else if (this instanceof L2Summon)
@@ -1278,6 +1290,11 @@
// Calculate altered Cast Speed due to BSpS/SpS
L2ItemInstance weaponInst = getActiveWeaponInstance();
+ if ((this instanceof L2Attackable && ((L2Attackable)this).isUsingShots())){
+ hitTime = (int)(0.70 * hitTime);
+ coolTime = (int)(0.70 * coolTime);
+ ((L2Attackable)this).broadcastPacket(new MagicSkillUser(this, this, 2163, 1, 0, 0), 360000/*600*/);
+ }
if (weaponInst != null && skill.isMagic() && !forceBuff && skill.getTargetType() != SkillTargetType.TARGET_SELF)
{
if ((weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)