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

Comparing deliantra/server/common/item.C (file contents):
Revision 1.43 by root, Sun Apr 13 20:21:50 2008 UTC vs.
Revision 1.46 by root, Sun Apr 20 22:03:21 2008 UTC

419 */ 419 */
420const char * 420const char *
421query_weight (const object *op) 421query_weight (const object *op)
422{ 422{
423 static char buf[10]; 423 static char buf[10];
424 sint32 i = (op->nrof ? op->nrof : 1) * op->weight + op->carrying; 424 sint32 i = op->total_weight ();
425 425
426 if (op->weight < 0) 426 if (op->weight < 0)
427 return " "; 427 return " ";
428 428
429 if (i % 1000) 429 if (i % 1000)
590 if (op->stats.food % coin->value == 0) 590 if (op->stats.food % coin->value == 0)
591 break; 591 break;
592 592
593 sint32 coins = op->stats.food / coin->value; 593 sint32 coins = op->stats.food / coin->value;
594 594
595 buf.printf ("drop %d %s", coins, coins == 1 ? &coin->name : &coin->name_pl); 595 buf.printf ("drop %d %s (or equivalent)", coins, coins == 1 ? &coin->name : &coin->name_pl);
596 596
597 if (wrap) buf << ']'; 597 if (wrap) buf << ']';
598 } 598 }
599 break; 599 break;
600 600
1194} 1194}
1195 1195
1196void 1196void
1197examine (object *op, object *tmp) 1197examine (object *op, object *tmp)
1198{ 1198{
1199 std::string s = tmp->describe (op); 1199 std::string info = tmp->describe (op);
1200 1200 op->contr->infobox (MSG_CHANNEL ("examine"), info.c_str ());
1201 new_draw_info (NDI_UNIQUE, 0, op, s.c_str ());
1202} 1201}
1203 1202
1204/* 1203/*
1205 * inventory prints object's inventory. If inv==NULL then print player's 1204 * inventory prints object's inventory. If inv==NULL then print player's
1206 * inventory. 1205 * inventory.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines