PDA

View Full Version : spell kills mob but no message


LeftRoad
11-06-2008, 06:54 PM
I've noticed that if a spell kills a mob there is no final spell message for the killing blow. So, I cut and pasted code from elsewhere and, in my limited testing, it seems to fix the issue.

In attack.cpp... find this code in the Mob::CommonDamage function, at about line 3617...

if(!IsSaved) {
SetHP(-100);
Death(attacker, damage, spell_id, skill_used);
return;
}

...and change it to...

if(!IsSaved) {
SetHP(-100);

if(attacker && attacker->IsClient()) {
if ((spell_id != SPELL_UNKNOWN) && damage>0) {
char val1[20]={0};
attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName (),ConvertArray(damage,val1));
}
}

Death(attacker, damage, spell_id, skill_used);
return;
}

Can someone else give it a try to confirm it? Thanks :)

seveianrex
11-07-2008, 05:02 PM
Committed.