Mercurial > wow > cyborg-mmo7
comparison CyborgMMO7.lua @ 51:fb81254bd7b8
Clarified the distinction between data (what is actually saved) and the objects (which store the data, but also have methods and other attributes).
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Fri, 03 May 2013 23:24:04 +0000 |
parents | 40892c6b6075 |
children | c9706291c141 |
comparison
equal
deleted
inserted
replaced
50:7cbd32de1fdd | 51:fb81254bd7b8 |
---|---|
90 CyborgMMO7SaveData = {} | 90 CyborgMMO7SaveData = {} |
91 end | 91 end |
92 return CyborgMMO7SaveData | 92 return CyborgMMO7SaveData |
93 end | 93 end |
94 | 94 |
95 function CyborgMMO_SetRatSaveData(data) | 95 function CyborgMMO_SetRatSaveData(objects) |
96 assert(VarsLoaded) | 96 assert(VarsLoaded) |
97 local saveData = {} | 97 local data = {} |
98 for mode=1,RAT7.MODES do | 98 for mode=1,RAT7.MODES do |
99 saveData[mode] = {} | 99 data[mode] = {} |
100 for button=1,RAT7.BUTTONS do | 100 for button=1,RAT7.BUTTONS do |
101 if data[mode][button] then | 101 if objects[mode][button] then |
102 saveData[mode][button] = data[mode][button]:SaveData() | 102 data[mode][button] = objects[mode][button]:SaveData() |
103 end | 103 end |
104 end | 104 end |
105 end | 105 end |
106 CyborgMMO_GetSaveData().Rat = saveData | 106 CyborgMMO_GetSaveData().Rat = data |
107 end | |
108 | |
109 function CyborgMMO_GetRatSaveData() | |
110 return CyborgMMO_GetSaveData().Rat | |
107 end | 111 end |
108 | 112 |
109 local function GetSpellID(name) | 113 local function GetSpellID(name) |
110 local link = GetSpellLink(name) | 114 local link = GetSpellLink(name) |
111 if link then | 115 if link then |