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.25 by root, Fri Jul 11 21:41:38 2008 UTC vs.
Revision 1.26 by root, Sun Sep 7 21:31:23 2008 UTC

185 185
186 if (!params) 186 if (!params)
187 params = (char *)""; 187 params = (char *)"";
188 188
189 if (!strcmp (params, "help")) 189 if (!strcmp (params, "help"))
190 buf << "To form a party type: C<party form> <partyname>\n\n" 190 buf << " - To form a party type: C<party form> <partyname>\n"
191 "To join a party type: C<party join> <partyname>\n\n" 191 " - To join a party type: C<party join> <partyname>\n"
192 "If the party has a passwd, it will you prompt you for it.\n\n" 192 " - If the party has a passwd, it will you prompt you for it.\n"
193 "For a list of current parties type: C<party list>\n\n" 193 " - For a list of current parties type: C<party list>\n"
194 "To leave a party type: C<party leave>\n\n" 194 " - To leave a party type: C<party leave>\n"
195 "To change a passwd for a party type: C<party passwd> <password>\n\n" 195 " - To change a passwd for a party type: C<party passwd> <password>\n"
196 "There is an 8 character max\n\n" 196 " - There is an 8 character max\n"
197 "To talk to party members type: C<party say> <msg>\n\n" 197 " - To talk to party members type: C<party say> <msg>\n"
198 "To see who is in your party: C<party who>\n\n" 198 " - To see who is in your party: C<party who>\n"
199 "To see what you've killed, type: C<party kills>"; 199 " - To see what you've killed, type: C<party kills>\n";
200 else if (strncmp (params, "form ", 5) == 0) 200 else if (strncmp (params, "form ", 5) == 0)
201 { 201 {
202 params += 5; 202 params += 5;
203 203
204 if (party) 204 if (party)
287 buf << "You haven't killed anything yet."; 287 buf << "You haven't killed anything yet.";
288 else 288 else
289 { 289 {
290 int max = min (party->kills - 1, PARTY_KILL_LOG - 1); 290 int max = min (party->kills - 1, PARTY_KILL_LOG - 1);
291 291
292 buf << "Killed | Killer| Exp\n\n" 292 buf << " Killed | Killer| Exp\n"
293 << "----------------+----------------+--------\n\n"; 293 << " ----------------+----------------+--------\n";
294 294
295 for (int i = 0; i <= max; i++) 295 for (int i = 0; i <= max; i++)
296 { 296 {
297 sint64 exp = party->party_kills[i].exp; 297 sint64 exp = party->party_kills[i].exp;
298 char suffix = ' '; 298 char suffix = ' ';
305 { 305 {
306 exp /= 1000; 306 exp /= 1000;
307 suffix = 'k'; 307 suffix = 'k';
308 } 308 }
309 309
310 buf.printf ("%16s|%16s|%6.1f%c\n\n", party->party_kills[i].dead, party->party_kills[i].killer, (double)exp, suffix); 310 buf.printf (" %16s|%16s|%6.1f%c\n", party->party_kills[i].dead, party->party_kills[i].killer, (double)exp, suffix);
311 } 311 }
312 312
313 buf << "----------------+----------------+--------\n\n"; 313 buf << " ----------------+----------------+--------\n";
314 314
315 { 315 {
316 sint64 exp = party->total_exp; 316 sint64 exp = party->total_exp;
317 char suffix = ' '; 317 char suffix = ' ';
318 318
325 { 325 {
326 exp /= 1000; 326 exp /= 1000;
327 suffix = 'k'; 327 suffix = 'k';
328 } 328 }
329 329
330 buf.printf ("Totals: %d kills, %.1f%c exp", party->kills, (double)exp, suffix); 330 buf.printf (" Totals: %d kills, %.1f%c exp", party->kills, (double)exp, suffix);
331 } 331 }
332 } 332 }
333 } 333 }
334 else if (strncmp (params, "say ", 4) == 0) 334 else if (strncmp (params, "say ", 4) == 0)
335 { 335 {
352 op->contr->party = 0; 352 op->contr->party = 0;
353 obsolete_parties (); 353 obsolete_parties ();
354 } 354 }
355 else if (strcmp (params, "who") == 0) 355 else if (strcmp (params, "who") == 0)
356 { 356 {
357 buf << "Members of party " << party->partyname << ".\n\n"; 357 buf << "Members of party " << party->partyname << ".\n";
358 358
359 for_all_players (pl) 359 for_all_players (pl)
360 if (pl->ob->contr->party == party) 360 if (pl->ob->contr->party == party)
361 buf.printf ("%s/%d %s\n\n", &pl->ob->name, pl->ob->level, 361 buf.printf (" - %s/%d %s\n\n", &pl->ob->name, pl->ob->level,
362 *pl->ob->contr->own_title ? pl->ob->contr->own_title : pl->ob->contr->title); 362 *pl->ob->contr->own_title ? pl->ob->contr->own_title : pl->ob->contr->title);
363 } 363 }
364 else if (strncmp (params, "passwd ", 7) == 0) 364 else if (strncmp (params, "passwd ", 7) == 0)
365 { 365 {
366 params += 7; 366 params += 7;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines