My line number is next to the .h or .c file. This will change a little from the standard if there are multiple edits, but its close enough to follow along. Including previous portion of code for searching/matching purposes.
act_wiz.c:1374
case (WEAPON_POLEARM):
send_to_char ("polearm\n\r", ch);
break;
case (WEAPON_FIREARM):
send_to_char ("firearm\n\r", ch);
break;
const.c:84
{"polearm", OBJ_VNUM_SCHOOL_POLEARM, WEAPON_POLEARM, &gsn_polearm},
{"firearm", OBJ_VNUM_SCHOOL_FIREARM, WEAPON_FIREARM, &gsn_firearm},
You'll have to assign it to something in your const.c file or no one can actually use the skill. I put mine in warrior (which I now call soldier) basics.
const.c:1579
{
"polearm", {1, 1, 1, 1}, {6, 6, 3, 1},
spell_null, TAR_IGNORE, POS_FIGHTING,
&gsn_polearm, SLOT (0), 0, 0,
"", "!Polearm!", ""},
{
"firearm", {20, 20, 1, 1}, {6, 6, 2, 1},
spell_null, TAR_IGNORE, POS_FIGHTING,
&gsn_firearm, SLOT (0), 0, 0,
"shot", "!Firearm!", ""},
db.c:135
sh_int gsn_whip;
sh_int gsn_firearm;
handler.c:430
|| sn == gsn_polearm
|| sn == gsn_firearm)
handler.c:487
case (WEAPON_POLEARM):
sn = gsn_polearm;
break;
case (WEAPON_FIREARM):
sn = gsn_firearm;
magic.c:3453
case (WEAPON_POLEARM):
send_to_char ("polearm.\n\r", ch);
break;
case (WEAPON_FIREARM):
send_to_char ("firearm.\n\r", ch);
break;
The definition on 1176 was what I was missing. It doesn't know to look for that element in the table if you don't define it here.
merc.h:139
#define MAX_SKILL 151 /* Unsure if needed. It should be. */
merc.h:1053
#define OBJ_VNUM_SCHOOL_POLEARM 3722
#define OBJ_VNUM_SCHOOL_FIREARM 2500
merc.h:1176
#define WEAPON_POLEARM 8
#define WEAPON_FIREARM 9
merc.h:2047
extern sh_int gsn_whip;
extern sh_int gsn_firearm;
tables.c:619
{"polearm", WEAPON_POLEARM, TRUE},
{"firearm", WEAPON_FIREARM, TRUE},
|