--- deliantra/server/common/living.C 2010/04/15 04:56:46 1.119 +++ deliantra/server/common/living.C 2010/04/30 21:00:39 1.122 @@ -872,7 +872,8 @@ */ if ((tmp->flag [FLAG_APPLIED] && tmp->type != CONTAINER - && tmp->type != CLOSE_CON) + && tmp->type != CLOSE_CON + && tmp->type != SPELL) || (tmp->type == SKILL && tmp->subtype == SK_PRAYING)) { if (type == PLAYER) @@ -917,9 +918,9 @@ else if (tmp->type != POTION) for (int i = 0; i < NROFATTACKS; i++) if (tmp->resist[i] > 0) - prot[i] += ((100 - prot[i]) * tmp->resist[i]) / 100; + prot[i] += (100 - prot[i]) * tmp->resist[i] / 100; else if (tmp->resist[i] < 0) - vuln[i] += ((100 - vuln[i]) * -tmp->resist[i]) / 100; + vuln[i] += (100 - vuln[i]) * -tmp->resist[i] / 100; /* There may be other things that should not adjust the attacktype */ if (tmp->type != SYMPTOM) @@ -940,7 +941,7 @@ //TODO: copy_flags? if (tmp->flag [FLAG_MAKE_INVIS]) { - this->set_flag (FLAG_MAKE_INVIS); + set_flag (FLAG_MAKE_INVIS); invisible = 1; } @@ -1650,7 +1651,7 @@ * flag is what to do if the player doesn't have the skill: */ static void -add_player_exp (object *op, sint64 exp, const char *skill_name, int flag) +add_player_exp (object *op, sint64 exp, shstr_tmp skill_name, int flag) { object *skill_obj; sint64 limit, exp_to_add; @@ -1774,7 +1775,7 @@ * a postive number. */ static void -subtract_player_exp (object *op, sint64 exp, const char *skill, int flag) +subtract_player_exp (object *op, sint64 exp, shstr_tmp skill, int flag) { float fraction = (float) exp / (float) op->stats.exp; object *tmp; @@ -1783,7 +1784,7 @@ for (tmp = op->inv; tmp; tmp = tmp->below) if (tmp->type == SKILL && tmp->stats.exp) { - if (flag == SK_SUBTRACT_SKILL_EXP && skill && !strcmp (&tmp->skill, skill)) + if (flag == SK_SUBTRACT_SKILL_EXP && skill && tmp->skill == skill) { del_exp = check_exp_loss (tmp, exp); tmp->stats.exp -= del_exp; @@ -1794,7 +1795,7 @@ /* only want to process other skills if we are not trying * to match a specific skill. */ - del_exp = check_exp_loss (tmp, (sint64) (tmp->stats.exp * fraction)); + del_exp = check_exp_loss (tmp, tmp->stats.exp * fraction); tmp->stats.exp -= del_exp; player_lvl_adj (op, tmp); } @@ -1818,7 +1819,7 @@ * these last two values are only used for players. */ void -change_exp (object *op, sint64 exp, const char *skill_name, int flag) +change_exp (object *op, sint64 exp, shstr_tmp skill_name, int flag) { #ifdef EXP_DEBUG LOG (llevDebug, "change_exp() called for %s, exp = %" PRId64 "\n", query_name (op), exp);