ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/reseller.ext
(Generate patch)

Comparing deliantra/maps/perl/reseller.ext (file contents):
Revision 1.6 by elmex, Tue Aug 15 06:20:41 2006 UTC vs.
Revision 1.7 by elmex, Tue Aug 15 16:51:59 2006 UTC

163 } 163 }
164 } else { 164 } else {
165 $value = $what->query_cost ($who, cf::F_SELL | cf::F_SHOP) / ($what->nrof || 1); 165 $value = $what->query_cost ($who, cf::F_SELL | cf::F_SHOP) / ($what->nrof || 1);
166 } 166 }
167 167
168 if ($value < 0) {
169 $what->insert_ob_in_ob ($who);
170 $who->message ("The shopkeeper says: You can't sell something for a negative value: $value", cf::NDI_BROWN);
171 return 1;
172 }
173
168 my $fee = $value / 100; # 1% selling fee 174 my $fee = $value / 100; # 1% selling fee
169 175
170 unless ($who->pay_amount ($fee)) { 176 unless ($who->pay_amount ($fee)) {
171 $who->message ( 177 $who->message (
172 "The shopkeeper says: You need " . cf::cost_string_from_value ($fee) . " to pay the 1% fee for this item", 178 "The shopkeeper says: You need " . cf::cost_string_from_value ($fee) . " to pay the 1% fee for this item",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines