EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   spell kills mob but no message (https://www.eqemulator.org/forums/showthread.php?t=26716)

LeftRoad 11-06-2008 06:54 PM

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 :)

seveianrex 11-07-2008 05:02 PM

Committed.


All times are GMT -4. The time now is 08:28 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.