--- deliantra/server/server/skill_util.C 2007/04/30 04:25:30 1.33 +++ deliantra/server/server/skill_util.C 2007/04/30 05:54:14 1.34 @@ -47,6 +47,7 @@ #include const uint8_t skill_flags[NUM_SKILLS] = { + 0, // SK_NONE # define def(uc, flags) flags, # include "skillinc.h" # undef def @@ -252,16 +253,15 @@ if (who->type != PLAYER) return 0; - if (who->chosen_skill && who->chosen_skill == new_skill) - { - //who->contr->combat_skill = who->chosen_skill; - return 1; - } + player *pl = who->contr; + + if (pl->ranged_skill && pl->ranged_skill == new_skill) + return 1; if (!new_skill) { - if (who->chosen_skill) - apply_special (who, who->chosen_skill, AP_UNAPPLY); + if (pl->ranged_skill) + apply_special (who, pl->ranged_skill, AP_UNAPPLY); /* Only goal in this case was to unapply a skill */ return 0;