Where Are Spell Flags stored?
Posted: Sat Feb 25, 2017 2:33 pm
Hi,
I am looking for help to identify where spell flags are stored. I know SQL very well, but for the life of me, I can't figure out what sets these values.
I couldn't find an existing bug report and would like to simply understand this.
darkstar/src/map/spell.h
enum SPELLFLAG
{
SPELLFLAG_NONE = 0x00,
SPELLFLAG_HIT_ALL = 0x01, // Hit all targets in range regardless of party
SPELLFLAG_WIPE_SHADOWS = 0x02 // Wipe shadows even if single target and miss/resist (example: Maiden's Virelai)
};
I am trying to identify why so many spells that are cast have a spellflag value of 0x02, where they shouldn't be and correct this either in a database or the code.
Here are some examples with a spellflag value of 0x02:
Aero III
Bind
Burst
Flare
Drain
Drown
Poision II
Quake
Sleep II
Tornado
Here are some examples with a spellflag value of 0x00: (working a expected)
Bio III
Blind
Burn
Choke
Flood
Fire III
Freeze
Frost
Stun
The code I am debugging is:
darkstar/src/map/entities/battleentity.cpp ~line 1215 (take all shadows)
I added a bit of code in my environment to help debug and display the spellflag values, so I know which spells are doing what.
I have been specifically testing against tonberry_maledictor mobs.
I am looking for help to identify where spell flags are stored. I know SQL very well, but for the life of me, I can't figure out what sets these values.
I couldn't find an existing bug report and would like to simply understand this.
darkstar/src/map/spell.h
enum SPELLFLAG
{
SPELLFLAG_NONE = 0x00,
SPELLFLAG_HIT_ALL = 0x01, // Hit all targets in range regardless of party
SPELLFLAG_WIPE_SHADOWS = 0x02 // Wipe shadows even if single target and miss/resist (example: Maiden's Virelai)
};
I am trying to identify why so many spells that are cast have a spellflag value of 0x02, where they shouldn't be and correct this either in a database or the code.
Here are some examples with a spellflag value of 0x02:
Aero III
Bind
Burst
Flare
Drain
Drown
Poision II
Quake
Sleep II
Tornado
Here are some examples with a spellflag value of 0x00: (working a expected)
Bio III
Blind
Burn
Choke
Flood
Fire III
Freeze
Frost
Stun
The code I am debugging is:
darkstar/src/map/entities/battleentity.cpp ~line 1215 (take all shadows)
I added a bit of code in my environment to help debug and display the spellflag values, so I know which spells are doing what.
I have been specifically testing against tonberry_maledictor mobs.