… | |
… | |
62 | CLEAR_FLAG (op, FLAG_DAMNED); |
62 | CLEAR_FLAG (op, FLAG_DAMNED); |
63 | CLEAR_FLAG (op, FLAG_CURSED); |
63 | CLEAR_FLAG (op, FLAG_CURSED); |
64 | CLEAR_FLAG (op, FLAG_KNOWN_MAGICAL); |
64 | CLEAR_FLAG (op, FLAG_KNOWN_MAGICAL); |
65 | CLEAR_FLAG (op, FLAG_KNOWN_CURSED); |
65 | CLEAR_FLAG (op, FLAG_KNOWN_CURSED); |
66 | |
66 | |
67 | if (op->env && op->env->type == PLAYER) |
67 | if (object *pl = op->visible_to ()) |
68 | esrv_send_item (op->env, op); |
68 | esrv_update_item (UPD_FLAGS, pl, op); |
69 | } |
69 | } |
70 | } |
70 | } |
71 | |
71 | |
72 | /* did_make_save_item just checks to make sure the item actually |
72 | /* did_make_save_item just checks to make sure the item actually |
73 | * made its saving throw based on the tables. It does not take |
73 | * made its saving throw based on the tables. It does not take |
… | |
… | |
170 | |
170 | |
171 | if ((op = get_archetype (arch))) |
171 | if ((op = get_archetype (arch))) |
172 | { |
172 | { |
173 | if (env) |
173 | if (env) |
174 | { |
174 | { |
175 | op->x = env->x, op->y = env->y; |
175 | op->x = env->x, op->y = env->y; //???? wtf |
176 | insert_ob_in_ob (op, env); |
176 | env->insert (op); |
177 | if (env->contr) |
|
|
178 | esrv_send_item (env, op); |
|
|
179 | } |
177 | } |
180 | else |
178 | else |
181 | { |
179 | { |
182 | op->x = x, op->y = y; |
180 | op->x = x, op->y = y; |
183 | insert_ob_in_map (op, m, originator, 0); |
181 | insert_ob_in_map (op, m, originator, 0); |
… | |
… | |
871 | * debate - 5000 is 5 kg, so arrows, knives, and other light weapons |
869 | * debate - 5000 is 5 kg, so arrows, knives, and other light weapons |
872 | * stick around. |
870 | * stick around. |
873 | */ |
871 | */ |
874 | if (op->weight <= 5000 && tmp->stats.hp >= 0) |
872 | if (op->weight <= 5000 && tmp->stats.hp >= 0) |
875 | { |
873 | { |
876 | tmp = tmp->head_ (); |
874 | tmp->head_ ()->insert (op); |
877 | |
|
|
878 | op->remove (); |
|
|
879 | op = insert_ob_in_ob (op, tmp); |
|
|
880 | |
|
|
881 | if (tmp->type == PLAYER) |
|
|
882 | esrv_send_item (tmp, op); |
|
|
883 | |
|
|
884 | return 1; |
875 | return 1; |
885 | } |
876 | } |
886 | else |
877 | else |
887 | return 0; |
878 | return 0; |
888 | } |
879 | } |
… | |
… | |
1202 | |
1193 | |
1203 | /* High damage acid has better chance of corroding |
1194 | /* High damage acid has better chance of corroding |
1204 | objects */ |
1195 | objects */ |
1205 | if (rndm (0, dam + 4) > random_roll (0, 39, op, PREFER_HIGH) + 2 * tmp->magic) |
1196 | if (rndm (0, dam + 4) > random_roll (0, 39, op, PREFER_HIGH) + 2 * tmp->magic) |
1206 | { |
1197 | { |
1207 | if (op->type == PLAYER) |
|
|
1208 | /* Make this more visible */ |
|
|
1209 | new_draw_info_format (NDI_UNIQUE | NDI_RED, 0, op, |
|
|
1210 | "The %s's acid corrodes your %s!", query_name (hitter), query_name (tmp)); |
|
|
1211 | flag = 1; |
1198 | flag = 1; |
1212 | tmp->magic--; |
1199 | tmp->magic--; |
1213 | if (op->type == PLAYER) |
1200 | |
1214 | esrv_send_item (op, tmp); |
1201 | if (object *pl = tmp->visible_to ()) |
|
|
1202 | { |
|
|
1203 | /* Make this more visible */ |
|
|
1204 | new_draw_info_format (NDI_UNIQUE | NDI_RED, 0, pl, |
|
|
1205 | "The %s's acid corrodes your %s!", query_name (hitter), query_name (tmp)); |
|
|
1206 | |
|
|
1207 | esrv_send_item (op, tmp); //TODO: UPD_NAME should be enough (it's enough in other cases) |
|
|
1208 | } |
1215 | } |
1209 | } |
1216 | } |
1210 | } |
1217 | |
1211 | |
1218 | if (flag) |
1212 | if (flag) |
1219 | op->update_stats (); /* Something was corroded */ |
1213 | op->update_stats (); /* Something was corroded */ |