Mercurial > wow > devian
comparison Devian.lua @ 67:137b8c55a593
character profile wasn't being created
| author | Nenue |
|---|---|
| date | Wed, 09 Mar 2016 19:29:23 -0500 |
| parents | 516ceb31703d |
| children | e89244da507b |
comparison
equal
deleted
inserted
replaced
| 66:516ceb31703d | 67:137b8c55a593 |
|---|---|
| 128 movement_translation_y = 25, | 128 movement_translation_y = 25, |
| 129 } | 129 } |
| 130 | 130 |
| 131 D.console = {} | 131 D.console = {} |
| 132 D.max_channel = 0 | 132 D.max_channel = 0 |
| 133 | |
| 134 D.InWorkspace = function () | |
| 135 return db.profiles[db.current_profile].workspace | |
| 136 end | |
| 133 | 137 |
| 134 D.Profile = function (id, name) | 138 D.Profile = function (id, name) |
| 135 | 139 |
| 136 if name and not id and db.profilesName[name] then | 140 if name and not id and db.profilesName[name] then |
| 137 id = db.profilesName[name] | 141 id = db.profilesName[name] |
| 255 db.current_profile = list_id | 259 db.current_profile = list_id |
| 256 scan_func = D.Load | 260 scan_func = D.Load |
| 257 else | 261 else |
| 258 return D:PrintHelp() | 262 return D:PrintHelp() |
| 259 end | 263 end |
| 264 if not db.profiles[list_id].char[playerRealm] then | |
| 265 db.profiles[list_id].char[playerRealm] = {} | |
| 266 end | |
| 267 | |
| 260 targetGlobal = db.profiles[list_id].global | 268 targetGlobal = db.profiles[list_id].global |
| 261 targetChar = db.profiles[list_id].char[playerRealm] | 269 targetChar = db.profiles[list_id].char[playerRealm] |
| 270 | |
| 262 | 271 |
| 263 if scan_func then | 272 if scan_func then |
| 264 for id, name, enableState, globalState in D.Addons() do | 273 for id, name, enableState, globalState in D.Addons() do |
| 265 scan_func(id, name, enableState, globalState) | 274 scan_func(id, name, enableState, globalState) |
| 266 end | 275 end |
| 361 -- The first argument describes the channel to output on, and the remaining arguments are concatenated in a manner similar to default print() | 370 -- The first argument describes the channel to output on, and the remaining arguments are concatenated in a manner similar to default print() |
| 362 -- This becomes the print handler when development mode is active. The original print() function is assigned to oldprint(). | 371 -- This becomes the print handler when development mode is active. The original print() function is assigned to oldprint(). |
| 363 -- @param Tag, signature, or numeric index of the channel to output on. Defaults to primary channel. | 372 -- @param Tag, signature, or numeric index of the channel to output on. Defaults to primary channel. |
| 364 -- @param ... Output contents. | 373 -- @param ... Output contents. |
| 365 function D.Message(prefix, ...) | 374 function D.Message(prefix, ...) |
| 366 if currentProfile.workspace then | 375 if not currentProfile.workspace then |
| 367 return D.oldprint(prefix, ...) | 376 return D.oldprint(prefix, ...) |
| 368 end | 377 end |
| 369 prefix = tostring(prefix) | 378 prefix = tostring(prefix) |
| 370 if prefix == nil then | 379 if prefix == nil then |
| 371 prefix = 'nil*' | 380 prefix = 'nil*' |
