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.15 by pippijn, Mon Jan 15 21:06:20 2007 UTC vs.
Revision 1.16 by pippijn, Thu Mar 1 12:28:16 2007 UTC

71remove_party (partylist *target_party) 71remove_party (partylist *target_party)
72{ 72{
73 partylist *tmpparty; 73 partylist *tmpparty;
74 partylist *previousparty; 74 partylist *previousparty;
75 partylist *nextparty; 75 partylist *nextparty;
76 player *pl;
77 76
78 if (firstparty == NULL) 77 if (firstparty == NULL)
79 { 78 {
80 LOG (llevError, "remove_party(): I was asked to remove party %s, but no parties are defined", target_party->partyname); 79 LOG (llevError, "remove_party(): I was asked to remove party %s, but no parties are defined", target_party->partyname);
81 return; 80 return;
139/* Remove unused parties, this could be made to scale a lot better. */ 138/* Remove unused parties, this could be made to scale a lot better. */
140void 139void
141obsolete_parties (void) 140obsolete_parties (void)
142{ 141{
143 int player_count; 142 int player_count;
144 player *pl;
145 partylist *party; 143 partylist *party;
146 partylist *next = NULL; 144 partylist *next = NULL;
147 145
148 if (!firstparty) 146 if (!firstparty)
149 return; /* we can't obsolete parties if there aren't any */ 147 return; /* we can't obsolete parties if there aren't any */
230} 228}
231 229
232void 230void
233send_party_message (object *op, char *msg) 231send_party_message (object *op, char *msg)
234{ 232{
235 player *pl;
236
237 for_all_players (pl) 233 for_all_players (pl)
238 if (pl->ob->contr->party == op->contr->party && pl->ob != op) 234 if (pl->ob->contr->party == op->contr->party && pl->ob != op)
239 new_draw_info (NDI_WHITE, 0, pl->ob, msg); 235 new_draw_info (NDI_WHITE, 0, pl->ob, msg);
240} 236}
241 237
364 } 360 }
365 361
366 if (strncmp (params, "form ", 5) == 0) 362 if (strncmp (params, "form ", 5) == 0)
367 { 363 {
368 int player_count; 364 int player_count;
369 player *pl;
370 365
371 params += 5; 366 params += 5;
372 if (op->contr->party) 367 if (op->contr->party)
373 oldparty = op->contr->party; 368 oldparty = op->contr->party;
374 else 369 else
425 return 1; 420 return 1;
426 } 421 }
427 422
428 if (strcmp (params, "who") == 0) 423 if (strcmp (params, "who") == 0)
429 { 424 {
430 player *pl;
431
432 tmpparty = op->contr->party; 425 tmpparty = op->contr->party;
433 if (op->contr->party == NULL) 426 if (op->contr->party == NULL)
434 { 427 {
435 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party."); 428 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
436 return 1; 429 return 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines