Method: Olib::Item#sell
- Defined in:
- lib/Olib/core/item.rb
#sell ⇒ Object
272 273 274 275 276 277 278 279 280 |
# File 'lib/Olib/core/item.rb', line 272 def sell take case result = dothistimeout("sell ##{@id}", 3, (SOLD | WRONG_SHOP | WORTHLESS)) when SOLD then [:sold, OpenStruct.new(name: self.name, price: $1.to_i)] when WRONG_SHOP then [:wrong_shop, self] when WORTHLESS then [:worthless, self] else [:unhandled_case, result] end end |