Forensic Evaluation & LastDamageInfo

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.

Moderators: POL Developer, Distro Developer

Locked
User avatar
ELSoft
Journeyman Poster
Posts: 61
Joined: Sun Jun 18, 2006 7:45 pm

Forensic Evaluation & LastDamageInfo

Post by ELSoft » Tue Aug 25, 2009 12:40 pm

Hi to all, today i was reviewing the forensic evaluation scripts in 095 and i found a little problem with the LastDamageInfo system. The SetLastDamageInfo function in damage.inc does not save if the damage was caused by a spell ( and what spell ) or by a weapon or by a poisoned weapon. This is because the SetLastDamageInfo is called by ApplyRawDamageEX and ApplyDamageEX, and both are a very generic functions.
In 095 the method to save the last hit is very ugly but the point is that this is called outside the 095 versions of ApplyRawDamageEX and ApplyDamageEX .

I think that the way to solve this is improve the SetLastDamageInfo and call it behind of ApplyRawDamageEX or ApplyDamageEX, in the CombatHook, damage spells and poison.

Any other idea to solve this?
Dark Dungeons Scripter

User avatar
MuadDib
POL Expert
Posts: 1087
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: Forensic Evaluation & LastDamageInfo

Post by MuadDib » Tue Aug 25, 2009 3:00 pm

Yes, 098 does need to have it implemeted directory into the damages for that to store it for scripts that will need it
POL Developer - The Penguin Scripter

User avatar
ELSoft
Journeyman Poster
Posts: 61
Joined: Sun Jun 18, 2006 7:45 pm

Re: Forensic Evaluation & LastDamageInfo

Post by ELSoft » Wed Aug 26, 2009 7:35 am

Maybe, it could be used the source argument to pass a structure with a reference of the attacker and the weapon or the spell or the poison level.
Dark Dungeons Scripter

Locked