ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/apply.C
(Generate patch)

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.169 by root, Sun Sep 7 21:31:23 2008 UTC vs.
Revision 1.172 by root, Mon Sep 29 10:32:50 2008 UTC

1306 ns->play_sound (sign->sound); 1306 ns->play_sound (sign->sound);
1307 else if (autoapply) 1307 else if (autoapply)
1308 ns->play_sound (sound_find ("msg_voice")); 1308 ns->play_sound (sound_find ("msg_voice"));
1309 1309
1310 if (ns->can_msg) 1310 if (ns->can_msg)
1311 op->contr->infobox (MSG_CHANNEL ("examine"), format ("T<%s>\n\n\n\n%s", &sign->name, &sign->msg)); 1311 op->contr->infobox (MSG_CHANNEL ("examine"), format ("T<%s>\n\n%s", &sign->name, &sign->msg));
1312 else 1312 else
1313 { 1313 {
1314 readable_message_type *msgType = get_readable_message_type (sign); 1314 readable_message_type *msgType = get_readable_message_type (sign);
1315 const char *somemsg = format ("%u %s", autoapply ? 1 : 0, &sign->msg); 1315 const char *somemsg = format ("%u %s", autoapply ? 1 : 0, &sign->msg);
1316 draw_ext_info (NDI_UNIQUE | NDI_NAVY, 0, op, msgType->message_type, msgType->message_subtype, somemsg, &sign->msg); 1316 draw_ext_info (NDI_UNIQUE | NDI_NAVY, 0, op, msgType->message_type, msgType->message_subtype, somemsg, &sign->msg);
1627 readable_message_type *msgType = get_readable_message_type (tmp); 1627 readable_message_type *msgType = get_readable_message_type (tmp);
1628 1628
1629 if (player *pl = op->contr) 1629 if (player *pl = op->contr)
1630 if (client *ns = pl->ns) 1630 if (client *ns = pl->ns)
1631 if (ns->can_msg) 1631 if (ns->can_msg)
1632 pl->infobox (MSG_CHANNEL ("book"), format ("T<%s>\n\n\n\n%s", (char *)long_desc (tmp, op), &tmp->msg)); 1632 pl->infobox (MSG_CHANNEL ("book"), format ("T<%s>\n\n%s", (char *)long_desc (tmp, op), &tmp->msg));
1633 else 1633 else
1634 draw_ext_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, 1634 draw_ext_info_format (NDI_UNIQUE | NDI_NAVY, 0, op,
1635 msgType->message_type, msgType->message_subtype, 1635 msgType->message_type, msgType->message_subtype,
1636 "You open the %s and start reading.\n%s", (char *)"%s\n%s", 1636 "You open the %s and start reading.\n%s", (char *)"%s\n%s",
1637 long_desc (tmp, op), &tmp->msg); 1637 long_desc (tmp, op), &tmp->msg);
1965 if (op->destroyed () || tmp->destroyed ()) 1965 if (op->destroyed () || tmp->destroyed ())
1966 break; 1966 break;
1967 } 1967 }
1968 1968
1969 if (!tmp->destroyed () && !tmp->inv) 1969 if (!tmp->destroyed () && !tmp->inv)
1970 tmp->decrease (); 1970 tmp->decrease (true);
1971} 1971}
1972 1972
1973/** 1973/**
1974 * op eats food. 1974 * op eats food.
1975 * If player, takes care of messages and dragon special food. 1975 * If player, takes care of messages and dragon special food.
3572 /* If we generated an object and put it in this object inventory, 3572 /* If we generated an object and put it in this object inventory,
3573 * move it to the parent object as the current object is about 3573 * move it to the parent object as the current object is about
3574 * to disappear. An example of this item is the random_* stuff 3574 * to disappear. An example of this item is the random_* stuff
3575 * that is put inside other objects. 3575 * that is put inside other objects.
3576 */ 3576 */
3577 for (tmp = op->inv; tmp; tmp = tmp2)
3578 {
3579 tmp2 = tmp->below;
3580 tmp->remove ();
3581
3582 if (op->env) 3577 if (op->env)
3583 insert_ob_in_ob (tmp, op->env); 3578 while (op->inv)
3584 else 3579 op->env->insert (op->inv);
3585 tmp->destroy ();
3586 }
3587 3580
3588 op->destroy (); 3581 op->destroy ();
3589 break; 3582 break;
3590 } 3583 }
3591 3584

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines