Changeset 440


Ignore:
Timestamp:
12/08/09 09:09:23 (9 years ago)
Author:
b0rland_parpg
Message:

Ticket #231: patch by b0rland

  • Fixed the exceptions and misbehaviour occuring when one item is replaced by the other in a backpack.
File:
1 edited

Legend:

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

    r439 r440  
    7373        except ValueError: 
    7474            if index == None : 
    75                 self.takeOff(self.items[slot].items[0]) 
     75                offending_item = self.items[slot].items[0] 
    7676            else : 
    77                 self.takeOff(self.items[slot].items[index]) 
     77                offending_item = self.items[slot].items[index] 
     78            self.items[slot].takeItem(offending_item) 
    7879            self.items[slot].placeItem(item, index) 
     80            self.placeItem(offending_item) 
    7981        self.item_lookup[item.ID] = slot 
    8082      
Note: See TracChangeset for help on using the changeset viewer.