Ignore:
Timestamp:
12/07/09 01:18:44 (10 years ago)
Author:
b0rland_parpg
Message:

Ticket #226: patch by b0rland

  • fixing the inventory display bug
  • fixed the exception which occurs when an empty index of a slot is queried
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/inventory.py

    r424 r435  
    8383            raise(ValueError,"%s: No such slot" % slot) 
    8484        if index != None: 
    85             if index < len(self.items[slot].items) : 
    86                 return self.items[slot].items[index] 
    87             else : 
    88                 return None 
    89         return copy.copy(self.items[slot].items) 
     85            return self.items[slot].items.get(index) 
     86        else: 
     87            return copy.copy(self.items[slot].items) 
    9088 
    9189    def isSlotEmpty(self, slot): 
Note: See TracChangeset for help on using the changeset viewer.