Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple NPCs can attack in single combat #160

Open
JeztC opened this issue Jun 6, 2019 · 2 comments
Open

Multiple NPCs can attack in single combat #160

JeztC opened this issue Jun 6, 2019 · 2 comments

Comments

@JeztC
Copy link
Contributor

JeztC commented Jun 6, 2019

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.
@dosier
Copy link

dosier commented Jun 22, 2019

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.

@JeztC
Copy link
Contributor Author

JeztC commented Jun 23, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants