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

Comparing deliantra/server/server/gods.C (file contents):
Revision 1.26 by root, Mon Jun 4 13:04:00 2007 UTC vs.
Revision 1.27 by root, Tue Jun 5 13:05:02 2007 UTC

49 godlink *gl; 49 godlink *gl;
50 50
51 for (gl = first_god; gl; gl = gl->next) 51 for (gl = first_god; gl; gl = gl->next)
52 if (!strncmp (name, gl->name, MIN ((size_t) strlen (gl->name), nmlen))) 52 if (!strncmp (name, gl->name, MIN ((size_t) strlen (gl->name), nmlen)))
53 break; 53 break;
54
54 if (gl) 55 if (gl)
55 godnr = gl->id; 56 godnr = gl->id;
56 } 57 }
58
57 return godnr; 59 return godnr;
58} 60}
59 61
60/** 62/**
61 * Returns pointer to specified god's object through pntr_to_god_obj.. 63 * Returns pointer to specified god's object through pntr_to_god_obj..
123 godnr = rndm (1, gl->id); 125 godnr = rndm (1, gl->id);
124 while (gl) 126 while (gl)
125 { 127 {
126 if (gl->id == godnr) 128 if (gl->id == godnr)
127 break; 129 break;
130
128 gl = gl->next; 131 gl = gl->next;
129 } 132 }
133
130 op->title = gl->name; 134 op->title = gl->name;
131 } 135 }
132 136
133 return op->title; 137 return op->title;
134 } 138 }
169 else if (s2 == NULL) 173 else if (s2 == NULL)
170 return 0; 174 return 0;
171 else 175 else
172 return strcmp (s1, s2) == 0; 176 return strcmp (s1, s2) == 0;
173} 177}
174
175 178
176/** 179/**
177 * Checks for any occurrence of the given 'item' in the inventory of 'op' (recursively). 180 * Checks for any occurrence of the given 'item' in the inventory of 'op' (recursively).
178 * Any matching items in the inventory are deleted, and a 181 * Any matching items in the inventory are deleted, and a
179 * message is displayed to the player. 182 * message is displayed to the player.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines