572
edits
(_getPurchaseType: Fix for pets) |
(Pet description support) |
||
Line 6: | Line 6: | ||
local Items = require('Module:Items') | local Items = require('Module:Items') | ||
local Icons = require('Module:Icons') | local Icons = require('Module:Icons') | ||
local Pets = require('Module:Pets') | |||
-- Overrides for various items, mostly relating to icon overrides | -- Overrides for various items, mostly relating to icon overrides | ||
Line 96: | Line 97: | ||
end | end | ||
if purch.contains.petID ~= nil then | if purch.contains.petID ~= nil then | ||
local pet = | local pet = Pets.getPetByID(purch.contains.petID) | ||
if pet ~= nil then | if pet ~= nil then | ||
return pet.name | return pet.name | ||
Line 113: | Line 114: | ||
if purch.contains.modifiers ~= nil then | if purch.contains.modifiers ~= nil then | ||
return Constants.getModifiersText(purch.contains.modifiers, false) | return Constants.getModifiersText(purch.contains.modifiers, false) | ||
elseif purch.contains.petID ~= nil then | |||
local pet = Pets.getPetByID(purch.contains.petID) | |||
return Pets._getPetEffect(pet) | |||
elseif purch.contains.items ~= nil and Shared.tableCount(purch.contains.items) == 1 then | elseif purch.contains.items ~= nil and Shared.tableCount(purch.contains.items) == 1 then | ||
item = Items.getItemByID(purch.contains.items[1].id) | item = Items.getItemByID(purch.contains.items[1].id) |
edits