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

Comparing deliantra/server/server/c_object.C (file contents):
Revision 1.39 by root, Sat Feb 10 21:01:10 2007 UTC vs.
Revision 1.40 by pippijn, Fri Mar 2 12:14:57 2007 UTC

1041 } 1041 }
1042 1042
1043 return 0; 1043 return 0;
1044} 1044}
1045 1045
1046
1047/* op should be a player, params is any params.
1048 * If no params given, we print out the currently marked object.
1049 * otherwise, try to find a matching object - try best match first.
1050 */
1051int
1052command_mark (object *op, char *params)
1053{
1054 if (!op->contr)
1055 return 1;
1056
1057 if (!params)
1058 {
1059 object *mark = find_marked_object (op);
1060
1061 if (!mark)
1062 new_draw_info (NDI_UNIQUE, 0, op, "You have no marked object.");
1063 else
1064 new_draw_info_format (NDI_UNIQUE, 0, op, "%s is marked.", query_name (mark));
1065 }
1066 else
1067 {
1068 object *mark1 = find_best_object_match (op, params);
1069
1070 if (!mark1)
1071 {
1072 new_draw_info_format (NDI_UNIQUE, 0, op, "Could not find an object that matches %s", params);
1073 return 1;
1074 }
1075 else
1076 {
1077 op->contr->mark = mark1;
1078 new_draw_info_format (NDI_UNIQUE, 0, op, "Marked item %s", query_name (mark1));
1079 return 0;
1080 }
1081 }
1082
1083 return 0; /*shouldnt get here */
1084}
1085
1086
1087/* op is the player 1046/* op is the player
1088 * tmp is the monster being examined. 1047 * tmp is the monster being examined.
1089 */ 1048 */
1090void 1049void
1091examine_monster (object *op, object *tmp) 1050examine_monster (object *op, object *tmp)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines