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

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.89 by root, Mon Oct 12 14:00:57 2009 UTC vs.
Revision 1.90 by root, Fri Oct 16 00:30:19 2009 UTC

141 */ 141 */
142object * 142object *
143get_archetype_by_object_name (const char *name) 143get_archetype_by_object_name (const char *name)
144{ 144{
145 char tmpname[MAX_BUF]; 145 char tmpname[MAX_BUF];
146 int i;
147 146
148 assign (tmpname, name); 147 assign (tmpname, name);
149 148
150 for (i = strlen (tmpname); i > 0; i--) 149 for (int i = strlen (tmpname); i > 0; i--)
151 { 150 {
152 tmpname[i] = 0; 151 tmpname[i] = 0;
153 152
154 if (archetype *at = find_archetype_by_object_name (tmpname)) 153 if (archetype *at = find_archetype_by_object_name (tmpname))
155 return at->instance (); 154 return at->instance ();
194 return 1; 193 return 1;
195 194
196 /* unpaid is a little more specific */ 195 /* unpaid is a little more specific */
197 if (!strcmp (cp, "unpaid") && QUERY_FLAG (op, FLAG_UNPAID)) 196 if (!strcmp (cp, "unpaid") && QUERY_FLAG (op, FLAG_UNPAID))
198 return 2; 197 return 2;
198
199 if (!strcmp (cp, "cursed") && QUERY_FLAG (op, FLAG_KNOWN_CURSED) && (QUERY_FLAG (op, FLAG_CURSED) || QUERY_FLAG (op, FLAG_DAMNED))) 199 if (!strcmp (cp, "cursed") && QUERY_FLAG (op, FLAG_KNOWN_CURSED) && (QUERY_FLAG (op, FLAG_CURSED) || QUERY_FLAG (op, FLAG_DAMNED)))
200 return 2; 200 return 2;
201 201
202 if (!strcmp (cp, "unlocked") && !QUERY_FLAG (op, FLAG_INV_LOCKED)) 202 if (!strcmp (cp, "unlocked") && !QUERY_FLAG (op, FLAG_INV_LOCKED))
203 return 2; 203 return 2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines