rsmod icon indicating copy to clipboard operation
rsmod copied to clipboard

Multiple NPCs can attack in single combat

Open JeztC opened this issue 6 years ago • 2 comments

Current Behavior

Multiple NPCs can attack player even if not in multi-combat zone. Player can also attack multiple npcs at the same time.

Expected Behavior

Player/NPC should only be able to attack a single target in non-multi combat zone.

Steps to Reproduce the Problem

  1. Go to Edgeville
  2. Attack multiple npcs at the same time.

JeztC avatar Jun 06 '19 15:06 JeztC

I believe this cannot be fixed (elegantly) at the moment. The npc option packet handler directly calls the pawn.attack method. The pawn.attack method then overrides the pawn's combat target before activating the combat plugin (prior to it hitting any combat conditions.) Therefore from within the combat plugin, there is no direct way of knowing whether the pawn initiating the attack is already under attack or not.

dosier avatar Jun 22 '19 22:06 dosier

I believe this cannot be fixed (elegantly) at the moment. The npc option packet handler directly calls the pawn.attack method. The pawn.attack method then overrides the pawn's combat target before activating the combat plugin (prior to it hitting any combat conditions.) Therefore from within the combat plugin, there is no direct way of knowing whether the pawn initiating the attack is already under attack or not.

Oh. Do u know if it'll be fixed soon?

JeztC avatar Jun 23 '19 16:06 JeztC