View Single Post
  #1  
Old 11-06-2008, 06:54 PM
LeftRoad
Sarnak
 
Join Date: Aug 2005
Location: Maine
Posts: 38
Default spell kills mob but no message

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...
Code:
if(!IsSaved) {
     SetHP(-100);
     Death(attacker, damage, spell_id, skill_used);
     return;
}
...and change it to...
Code:
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
Reply With Quote