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

Check missile source type to determine death reason #7486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StephenCWills
Copy link
Member

This resolves an issue where Runes could be used to PK another player and have them drop their equipment as if they had been killed by a trap or monster.


TARGET_BOTH is only used for a handful of missiles:

  • Fire Wall
  • Lightning Wall
  • Ring of Fire
  • Runes
  • Phasing

For Fire Wall, Lightning Wall, and Ring of Fire, we were already checking missile.IsTrap() which is equivalent to missile.sourceType() == MissileSource::Trap. Therefore, the behavior after the change should match what we were doing before. Phasing is harmless, so the only real change is that Rune missiles will now also use DeathReason::Player.

This logic also just makes more sense compared to the special case for Fire Wall and Lightning Wall.

@AJenbo
Copy link
Member

AJenbo commented Oct 21, 2024

Are damage calculations not different for trap vs player spells?

@StephenCWills
Copy link
Member Author

There is indeed a separate function for collision checks against PvP missiles. It seems the game doesn't use it specifically for these missiles that use TARGET_BOTH.

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

Successfully merging this pull request may close these issues.

3 participants