13 Jun, 2009, triskaledia wrote in the 1st comment:
Votes: 0
I was looking through the fight.c for ROM 2.4 (QuickMUD) and I was thinking it appears as if there is not really a
function or declaration that defines who has the final blow in combat, am I incorrect in what I was viewing?
The reason I ask is because:
a) I want to set it up for when pk'ing people will gain pk's when a pet lands the final blow.
b) I have it set up so when a victim dies, they gain X gold depending on the level of the mob instead of the stock load x gold to corpse.
c) I'm sure at some point I'll think of another use for knowing who landed the final blow.

–Silence Tyire of Reanimation
13 Jun, 2009, ATT_Turan wrote in the 2nd comment:
Votes: 0
Things like this are sensibly found in one of two ways - follow the code through its progression (find the code that makes a person swing in combat, follow it through to find the damage functions, etc.) or to search for something unique. For example, you could look up the function that gives someone experience when they kill a mob, since that function obviously knows who killed the mob (and should therefore get the experience). You should find a call to the group_gain function inside the damage function in fight.c. From there, you need simply to see if the killer is an NPC and has a target in their master field to have pets benefit their masters in PK.
Random Picks
0.0/2