|
@@ -5902,10 +5902,19 @@ public abstract class L2Character extends L2Object
|
|
|
|
|
|
// Check Raidboss attack and
|
|
// Check Raidboss attack and
|
|
// check buffing chars who attack raidboss. Results in mute.
|
|
// check buffing chars who attack raidboss. Results in mute.
|
|
- L2Object target2 = target.getTarget();
|
|
|
|
- if ((target.isRaid() && getLevel() > target.getLevel() + 8)
|
|
|
|
- || (target2 instanceof L2Character && (((L2Character)target2).isRaid()
|
|
|
|
- && getLevel() > ((L2Character)target2).getLevel() + 8)))
|
|
|
|
|
|
+ L2Character targetsAttackTarget = target.getAI().getAttackTarget();
|
|
|
|
+ L2Character targetsCastTarget = target.getAI().getCastTarget();
|
|
|
|
+ if (
|
|
|
|
+ (target.isRaid() && getLevel() > target.getLevel() + 8)
|
|
|
|
+ ||
|
|
|
|
+ (!skill.isOffensive() && targetsAttackTarget != null && targetsAttackTarget.isRaid()
|
|
|
|
+ && targetsAttackTarget.getAttackByList().contains(target) // has attacked raid
|
|
|
|
+ && getLevel() > targetsAttackTarget.getLevel() + 8)
|
|
|
|
+ ||
|
|
|
|
+ (!skill.isOffensive() && targetsCastTarget != null && targetsCastTarget.isRaid()
|
|
|
|
+ && targetsCastTarget.getAttackByList().contains(target) // has attacked raid
|
|
|
|
+ && getLevel() > targetsCastTarget.getLevel() + 8)
|
|
|
|
+ )
|
|
{
|
|
{
|
|
if (skill.isMagic())
|
|
if (skill.isMagic())
|
|
{
|
|
{
|