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.201 by root, Mon Oct 12 14:00:58 2009 UTC vs.
Revision 1.204 by root, Mon Oct 19 21:48:49 2009 UTC

1008 } 1008 }
1009 1009
1010 // already applied == open on ground, or open in inv, or active in inv 1010 // already applied == open on ground, or open in inv, or active in inv
1011 if (sack->flag [FLAG_APPLIED]) 1011 if (sack->flag [FLAG_APPLIED])
1012 { 1012 {
1013 if (op->container == sack) 1013 if (op->container_ () == sack)
1014 { 1014 {
1015 // open on ground or inv, so close 1015 // open on ground or inv, so close
1016 op->close_container (); 1016 op->close_container ();
1017 return 1; 1017 return 1;
1018 } 1018 }
1551 return; 1551 return;
1552 } 1552 }
1553 1553
1554 if (!tmp->msg) 1554 if (!tmp->msg)
1555 { 1555 {
1556 op->failmsg (format ("You open the %s and find it empty.", &tmp->name)); 1556 op->failmsg (format ("The %s contains nothing but meaningless gibberish. H<There is nothing interesting to read here.>", &tmp->name));
1557 return; 1557 return;
1558 } 1558 }
1559 1559
1560 /* need a literacy skill to read stuff! */ 1560 /* need a literacy skill to read stuff! */
1561 skill_ob = find_skill_by_name (op, tmp->skill); 1561 skill_ob = find_skill_by_name (op, tmp->skill);
2586 if (INVOKE_OBJECT (APPLY, op, ARG_OBJECT (who))) 2586 if (INVOKE_OBJECT (APPLY, op, ARG_OBJECT (who)))
2587 return RESULT_INT (0); 2587 return RESULT_INT (0);
2588 2588
2589 switch (op->type) 2589 switch (op->type)
2590 { 2590 {
2591 case CF_HANDLE: 2591 case T_HANDLE:
2592 who->play_sound (sound_find ("turn_handle")); 2592 who->play_sound (sound_find ("turn_handle"));
2593 who->statusmsg ("You turn the handle."); 2593 who->statusmsg ("You turn the handle.");
2594 op->value = op->value ? 0 : 1; 2594 op->value = op->value ? 0 : 1;
2595 SET_ANIMATION (op, op->value); 2595 SET_ANIMATION (op, op->value);
2596 update_object (op, UP_OBJ_FACE); 2596 update_object (op, UP_OBJ_FACE);
2844 * we don't use a corrupt pointer for the next object, so we get the 2844 * we don't use a corrupt pointer for the next object, so we get the
2845 * next object in the stack before applying. This is can only be a 2845 * next object in the stack before applying. This is can only be a
2846 * problem if player_apply() has a bug in that it uses the object but does 2846 * problem if player_apply() has a bug in that it uses the object but does
2847 * not return a proper value. 2847 * not return a proper value.
2848 */ 2848 */
2849 for (object *next, *tmp = pl->container ? pl->container->inv : pl->below; tmp; tmp = next) 2849 for (object *next, *tmp = pl->container_ () ? pl->container_ ()->inv : pl->below; tmp; tmp = next)
2850 { 2850 {
2851 next = tmp->below; 2851 next = tmp->below;
2852 2852
2853 if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) 2853 if (QUERY_FLAG (tmp, FLAG_IS_FLOOR))
2854 floors++; 2854 floors++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines