Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

BLU Magical Damage Spells Treated as attackType.PHYSICAL #6225

Open
2 tasks done
ibm2431 opened this issue Sep 22, 2019 · 3 comments
Open
2 tasks done

BLU Magical Damage Spells Treated as attackType.PHYSICAL #6225

ibm2431 opened this issue Sep 22, 2019 · 3 comments

Comments

@ibm2431
Copy link
Contributor

ibm2431 commented Sep 22, 2019

I have:

  • searched existing issues (http://github.com/darkstarproject/darkstar/issues/) to see if the issue I am posting has already been addressed or opened by another contributor
  • checked the commit log to see if my issue has been resolved since my server was last updated

Client Version (type /ver in game) : n/a

Source Branch (master/stable) : master

Additional Information (Steps to reproduce/Expected behavior) :

Before I forget to publicly note this (again): Damage-dealing Blue Magic that goes through BlueFinalAdjustments is always treated as attackType.PHYSICAL, even if the damage type should be Magical.

Some examples of Blue Spells that should be treated as Magical - but aren't due to BlueFinalAdjustments - are:

Death Ray

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/spells/bluemagic/death_ray.lua#L42

Ice Break

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/spells/bluemagic/ice_break.lua#L50

Mind Blast

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/spells/bluemagic/mind_blast.lua#L44

When they get into BlueFinalAdjustments, after calculating reductions due to Phalanx and Stoneskin, takeDamage is always called with attackType.PHYSICAL:

https://github.com/DarkstarProject/darkstar/blob/master/scripts/globals/bluemagic.lua#L232-L247

@mrhappyasthma
Copy link
Contributor

mrhappyasthma commented Jan 24, 2020

I can go through and audit/correct these.

I'm doing some refactors to BlueFinalAdjustments in #6396 anyway.

This could be a good follow up.

@mrhappyasthma
Copy link
Contributor

Looks like the same issue applies to Breath spells as well.

@mrhappyasthma
Copy link
Contributor

This shouldn't affect too much though, from the looks of it. The attackType is only referenced in takeDamage to trigger an event. But no code seems to be listening for it.

PAI->EventHandler.triggerListener("TAKE_DAMAGE", this, amount, attacker, (uint16)attackType, (uint16)damageType);

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

No branches or pull requests

2 participants