Index: C:/Documents and Settings/Anderson/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Character.java =================================================================== --- C:/Documents and Settings/Anderson/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Character.java (revision 1605) +++ C:/Documents and Settings/Anderson/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Character.java (working copy) @@ -654,7 +654,7 @@ // Calculate physical damages of hit 1 damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, true, attack._soulshot); - damage1 /= 2; + damage1 /= 2; } // Check if hit 2 isn't missed @@ -668,7 +668,7 @@ // Calculate physical damages of hit 2 damage2 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld2, crit2, true, attack._soulshot); - damage2 /= 2; + damage2 /= 2; } // Create a new hit task with Medium priority for hit 1 @@ -737,6 +737,20 @@ // Update char's heading degree angleChar = Util.convertHeadingToDegree(this.getHeading()); double attackpercent = 85; + int attackcountmax = 13; + int attackcount = 0; + if (this instanceof L2PcInstance) + { + if (getKnownSkill(216) == null) //216 = pole mastery skill id + { + attackcountmax = 3; //Can attack 3 monster dont have pole mastery + } + else if (getSkillLevel(216) < 9) + { + attackcountmax = 8; //Can attack 8 monster pole mastery lvl is to low + } + } + if (angleChar <= 0) angleChar += 360; // =========================================================== @@ -763,13 +777,17 @@ // Launch a simple attack against the L2Character targeted if(!target.isAlikeDead()) { - if (target == getAI().getAttackTarget() || target.isAutoAttackable(this)) - { - - hitted |= doAttackHitSimple(attack, target, attackpercent); - attackpercent /= 1.15; - target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this); - } + attackcount += 1; + if (attackcount <= attackcountmax) + { + if (target == getAI().getAttackTarget() || target.isAutoAttackable(this)) + { + + hitted |= doAttackHitSimple(attack, target, attackpercent); + attackpercent /= 1.15; + target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this); + } + } } } } @@ -795,9 +813,9 @@ * */ private boolean doAttackHitSimple(Attack attack, L2Character target) - { - return doAttackHitSimple(attack, target, 100); - } + { + return doAttackHitSimple(attack, target, 100); + } private boolean doAttackHitSimple(Attack attack, L2Character target, double attackpercent) { int damage1 = 0; @@ -818,8 +836,8 @@ // Calculate physical damages damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack._soulshot); - if (attackpercent != 100) - damage1 = (int)((double)damage1*attackpercent/100); + if (attackpercent != 100) + damage1 = (int)((double)damage1*attackpercent/100); } else { @@ -1284,8 +1302,8 @@ _IsAttacked = value; } - /** Return True if the L2Character can't attack (stun, sleep, attackEndTime, fakeDeath, paralyse, imobilise). */ - public final boolean isAttackingDisabled() { return isStunned() || isSleeping() || _attackEndTime > GameTimeController.getGameTicks() || isFakeDeath() || isParalyzed() || isImobilised(); } + /** Return True if the L2Character can't attack (stun, sleep, attackEndTime). */ + public final boolean isAttackingDisabled() { return isStunned() || isSleeping() || _attackEndTime > GameTimeController.getGameTicks() || isFakeDeath(); } public final Calculator[] getCalculators() { return _Calculators; } @@ -1540,7 +1558,7 @@ try { onMagicUseTimer(_targets, _skill); - _skillCast = null; + _skillCast = null; } catch (Throwable e) { @@ -2947,9 +2965,9 @@ _castEndTime = 0; _castInterruptTime = 0; if (_skillCast != null) - { - _skillCast.cancel(true); - _skillCast = null; + { + _skillCast.cancel(true); + _skillCast = null; } // cancels the skill hit scheduled task enableAllSkills(); // re-enables the skills @@ -3994,7 +4012,7 @@ { _castEndTime = 0; _castInterruptTime = 0; - _skillCast = null; + _skillCast = null; // Get the display identifier of the skill int magicId = skill.getDisplayId(); @@ -4321,7 +4339,7 @@ { return 1; } - + public final void setSkillCast(Future newSkillCast) { _skillCast = newSkillCast; @@ -4507,6 +4525,6 @@ return _aiClass; } } + - - +