line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::BackpackTF::Item; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
24
|
use 5.014000; |
|
2
|
|
|
|
|
4
|
|
4
|
2
|
|
|
2
|
|
6
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
29
|
|
5
|
2
|
|
|
2
|
|
5
|
use warnings; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
292
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.002'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new{ |
9
|
0
|
|
|
0
|
0
|
|
my ($class, $name, $content) = @_; |
10
|
0
|
|
|
|
|
|
$content->{name} = $name; |
11
|
0
|
|
|
|
|
|
bless $content, $class |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
1
|
|
sub name { shift->{name} } |
15
|
0
|
0
|
|
0
|
1
|
|
sub defindex { wantarray ? @{shift->{defindex}} : shift->{defindex}->[0] } |
|
0
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub price { |
17
|
0
|
|
|
0
|
1
|
|
my ($self, $quality, $tradable, $craftable, $priceindex) = (@_, 6, 1, 1); |
18
|
0
|
0
|
|
|
|
|
$tradable = $tradable ? 'Tradable' : 'Non-Tradable'; |
19
|
0
|
0
|
|
|
|
|
$craftable = $craftable ? 'Craftable' : 'Non-Craftable'; |
20
|
0
|
|
|
|
|
|
my $price = shift->{prices}->{$quality}->{$tradable}->{$craftable}; |
21
|
0
|
0
|
|
|
|
|
defined $priceindex ? $price->{$priceindex} : $price->[0] |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |