Module:XC2 quest rewards

-- FLD_QuestReward -- ID,Gold,EXP,Sp,Coin,DevelopZone,DevelopPoint,TrustPoint,MercenariesPoint,IdeaCategory,IdeaValue,ItemID1,ItemNumber1,ItemID2,ItemNumber2,ItemID3,ItemNumber3,ItemID4,ItemNumber4 local rewards_table = mw.loadData("Module:XC2 quest rewards/data")

local xc2_quest_rewards = {}

function xc2_quest_rewards.getQuestRewardData(frame) id = tonumber(frame.args[1]) rewardEntry = rewards_table[id] if rewardEntry then -- this is probably better actually than trying to make a loop out of it		return rewardEntry[1]..","..rewardEntry[2]..","..rewardEntry[3]..","..rewardEntry[4]..","..rewardEntry[5]..","..rewardEntry[6]..","..rewardEntry[7]..","..rewardEntry[8]..","..rewardEntry[9]..","..rewardEntry[10]..","..rewardEntry[11]..","..rewardEntry[12]..","..rewardEntry[13]..","..rewardEntry[14]..","..rewardEntry[15]..","..rewardEntry[16]..","..rewardEntry[17]..","..rewardEntry[18] else return "undefinedReward["..id.."]" end end

return xc2_quest_rewards