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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines