Log in

View Full Version : Damage Shield Messages - Discussion


Derision
10-17-2008, 12:23 PM
I've been looking at getting the client to display the correct messages when a mob/player with a DS on is hit.

I know how to get the messages displayed. Just send an OP_Damage with a type of:


0xF7 (You are tormented - produced by banshee aura)
0xF8 (Burnt)
0xF9 (Pierced by thorns)
etc.


I've been looking at the spdat.h entries, and I can't see any fields in there which determine the type of damage shield (thorns, fire, etc.), so I thought I'd post here in case any of the experts in looking at spdat could see anything that I can't which could be used to determine what type of damage shield message should be produced.

I could always add a new table, damageshieldtype, with a spellid and type column. If there is no entry for a spell, things would behave as they do now, else an OP_Damage would be sent with the type from this new table.

KLS
10-17-2008, 01:03 PM
Resist type sir. Cold = 0xF7, Fire = 0xF8, Magic = 0xF9.

AndMetal
10-17-2008, 02:13 PM
I think one problem we might run into is that DS are cumulative overall, and only the last spell is used for the effect. I think what might need to happen is to create a counter for each resist (if that would work for all cases), then we shouldn't really even need to look at the spells again to get the resist. I'm not sure if it would be better to just change DamageShield in the Mob class to a DamageShield_Struct, or just add each of them.

Pseudo code:
iterating through spells & whatnot
if resist == magic, + magicDS
if resist == poison, + poisonDS
etc...

Derision
10-17-2008, 02:19 PM
Thanks!

I downloaded the data from Lucy and extracted all the spells with a type 59 (DS) component and sorted by 'Resist'. There are 134 spells which are Unresistable which from their descriptions seem to be mixture of fire shields, bramble shields, etc, so the resist type doesn't seem to be a definitive way to determine which message to put out :(

KLS
10-17-2008, 04:31 PM
You'll just have to pick a shield to send out, either first one in or last one out.

Could you throw some of the non-dispel ones at me, ids of one of each type would be great, the classes seem to all use traditional resists for the most part.

Derision
10-17-2008, 04:50 PM
Here is a random selection of the DS spells Lucy lists as 'Unresistable'. I have only included those that returned a result from #findspell to avoid spells from later expansions:

Spirit of the wood http://lucy.allakhazam.com/spellraw.html?id=3277&source=Live
Malleable Ice http://lucy.allakhazam.com/spellraw.html?id=6558
Barbed Bones http://lucy.allakhazam.com/spellraw.html?id=932
Flickering Fire http://lucy.allakhazam.com/spellraw.html?id=5705
Kindle http://lucy.allakhazam.com/spell.html?id=4011
Aura of Vinitras http://lucy.allakhazam.com/spellraw.html?id=2926

KLS
10-17-2008, 06:00 PM
I'm guessing that if spell resist isn't unresistible then we know how that works. There's probably a special message or way they do it for unresistible trying to see if there's any other pattern.

KLS
10-17-2008, 06:33 PM
To be honest I don't see much of a pattern past the resist type.

Perhaps your idea a simple table:

int32 spellid
int8 type

Could have defaults based on element type and if the table entry exists it overwrites. Default type for an unresistible with no table entry thorns I guess.