--- deliantra/server/socket/request.C 2008/08/10 16:31:18 1.136 +++ deliantra/server/socket/request.C 2008/10/02 16:08:19 1.140 @@ -835,7 +835,7 @@ AddIfShort (ns->last_stats.Cha, ob->stats.Cha, CS_STAT_CHA); for (int s = 0; s < NUM_SKILLS; s++) - if (object *skill = opl->last_skill_ob[s]) + if (object *skill = opl->last_skill_ob [s]) if (skill->stats.exp != ns->last_skill_exp [s]) { ns->last_skill_exp [s] = skill->stats.exp; @@ -914,7 +914,6 @@ pl->ns->last_weight = weight; pl->ns->send_packet (sl); - SET_FLAG (pl->ob, FLAG_CLIENT_SENT); } /****************************************************************************** @@ -1331,8 +1330,9 @@ if (update_space (sl, socket, ms, lastcell, 1)) mask |= 0x2; - if (ms.player () == ob - && (ob->invisible & (ob->invisible < 50 ? 1 : 7))) + if (ob->invisible + && ob->invisible & (ob->invisible < 50 ? 1 : 7) + && ms.player () == ob) { // force player to be visible to himself if invisible if (lastcell.faces[0] != ob->face) @@ -1438,7 +1438,7 @@ sl << "replyinfo skill_info\n"; for (int i = 1; i < NUM_SKILLS; i++) - sl.printf ("%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names[i]); + sl.printf ("%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names [i]); if (sl.length () > MAXSOCKBUF) { @@ -1566,14 +1566,8 @@ /* figure out which skill it uses, if it uses one */ if (spell->skill) - { - for (i = 1; i < NUM_SKILLS; i++) - if (!strcmp (spell->skill, skill_names[i])) - { - skill = i + CS_STAT_SKILLINFO; - break; - } - } + if (object *tmp = pl->find_skill (spell->skill)) + skill = tmp->subtype + CS_STAT_SKILLINFO; // spells better have a face if (!spell->face)