Inventory List Bug

For everything NOT server specific support. Do NOT ask for connectivity help here!.

Moderator: Moderators

Message
Author
setsunaseiei
Human
Human
Posts: 38
Joined: 17 May 2011, 07:09
Noob?: No

Inventory List Bug

#1 Post by setsunaseiei »

I am having errors in using 7820's inventory command "i". The items don't get classified as usable, equippable, etc.
All my items are shown under Non-usable. Here's the code from the src/Commands.pm

Code: Select all

		foreach my $item (@{$char->inventory->getItems()}) {
			if ($item->{usable}) {
				push @useable, $item->{invIndex};
			} elsif ($item->{equippable}) {
				my %eqp;
				$eqp{index} = $item->{index};
				$eqp{binID} = $item->{invIndex};
				$eqp{name} = $item->{name};
				$eqp{equipped} = ($item->{type} == 10 || $item->{type} == 16 || $item->{type} == 17 || $item->{type} == 19) ? $item->{amount} . " left" : $equipTypes_lut{$item->{equipped}};
				$eqp{type} = $itemTypes_lut{$item->{type}};
				$eqp{equipped} .= " ($item->{equipped})";
				# Translation Comment: Mark to tell item not identified
				$eqp{identified} = " -- " . T("Not Identified") if !$item->{identified};
				if ($item->{equipped}) {
					push @equipment, \%eqp;
				} else {
					push @uequipment, \%eqp;
				}
			} else {
				push @non_useable, $item->{invIndex};
			}
		}
I know my source files are updated as of 7820 version. What could be causing this?
Hypothesis: My Kore misses a function similar to identifying items->{type} values upon obtaining from inventory->getItems(), then sort then display.
Solution: /?
オペンコレ!

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Inventory List Bug

#2 Post by EternalHarvest »

setsunaseiei wrote:Here's the code from the src/Commands.pm

Code: Select all

			if ($item->{usable}) {
..
			} elsif ($item->{equippable}) {
Something is wrong with your Commands.pm, as "usable" and "equippable" are (and used as) methods, not properties.

Post Reply