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

Comparing deliantra/server/server/c_party.C (file contents):
Revision 1.9 by root, Thu Dec 21 23:37:05 2006 UTC vs.
Revision 1.10 by root, Mon Dec 25 11:25:49 2006 UTC

80 { 80 {
81 LOG (llevError, "remove_party(): I was asked to remove party %s, but no parties are defined", target_party->partyname); 81 LOG (llevError, "remove_party(): I was asked to remove party %s, but no parties are defined", target_party->partyname);
82 return; 82 return;
83 } 83 }
84 84
85 for (pl = first_player; pl != NULL; pl = pl->next) 85 for_all_players (pl)
86 if (pl->party == target_party) 86 if (pl->party == target_party)
87 pl->party = NULL; 87 pl->party = NULL;
88 88
89 /* special case-ism for parties at the beginning and end of the list */ 89 /* special case-ism for parties at the beginning and end of the list */
90 if (target_party == firstparty) 90 if (target_party == firstparty)
150 return; /* we can't obsolete parties if there aren't any */ 150 return; /* we can't obsolete parties if there aren't any */
151 for (party = firstparty; party != NULL; party = next) 151 for (party = firstparty; party != NULL; party = next)
152 { 152 {
153 next = party->next; 153 next = party->next;
154 player_count = 0; 154 player_count = 0;
155 for (pl = first_player; pl != NULL; pl = pl->next) 155 for_all_players (pl)
156 if (pl->party == party) 156 if (pl->party == party)
157 player_count++; 157 player_count++;
158 if (player_count == 0) 158 if (player_count == 0)
159 remove_party (party); 159 remove_party (party);
160 } 160 }
233void 233void
234send_party_message (object *op, char *msg) 234send_party_message (object *op, char *msg)
235{ 235{
236 player *pl; 236 player *pl;
237 237
238 for (pl = first_player; pl != NULL; pl = pl->next) 238 for_all_players (pl)
239 if (pl->ob->contr->party == op->contr->party && pl->ob != op) 239 if (pl->ob->contr->party == op->contr->party && pl->ob != op)
240 new_draw_info (NDI_WHITE, 0, pl->ob, msg); 240 new_draw_info (NDI_WHITE, 0, pl->ob, msg);
241} 241}
242 242
243int 243int
439 { 439 {
440 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party."); 440 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
441 return 1; 441 return 1;
442 } 442 }
443 new_draw_info_format (NDI_UNIQUE, 0, op, "Members of party: %s.", op->contr->party->partyname); 443 new_draw_info_format (NDI_UNIQUE, 0, op, "Members of party: %s.", op->contr->party->partyname);
444 for (pl = first_player; pl != NULL; pl = pl->next) 444 for_all_players (pl)
445 if (pl->ob->contr->party == op->contr->party) 445 if (pl->ob->contr->party == op->contr->party)
446 { 446 {
447 if (settings.set_title == TRUE) 447 if (settings.set_title == TRUE)
448 { 448 {
449 if (pl->ob->contr->own_title[0] != '\0') 449 if (pl->ob->contr->own_title[0] != '\0')

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines