Mercurial > wow > buffalo2
comparison Templates.lua @ 107:ff00679a7817
- Template config creation includes sub-tables keyed by player guid
| author | Nenue |
|---|---|
| date | Sun, 29 Jan 2017 09:57:09 -0500 |
| parents | 8df154a2bfd6 |
| children | a41f6b74709a |
comparison
equal
deleted
inserted
replaced
| 106:6fa74abd83fd | 107:ff00679a7817 |
|---|---|
| 57 function VeneerHandlerMixin:Reanchor (anchorAll) | 57 function VeneerHandlerMixin:Reanchor (anchorAll) |
| 58 Veneer:DynamicReanchor() | 58 Veneer:DynamicReanchor() |
| 59 end | 59 end |
| 60 function VeneerHandlerMixin:Setup() | 60 function VeneerHandlerMixin:Setup() |
| 61 local configName = self:GetName():gsub('^Veneer', '') | 61 local configName = self:GetName():gsub('^Veneer', '') |
| 62 VeneerData[configName] = VeneerData[configName] or {} | 62 VeneerData[configName] = VeneerData[configName] or self.defaultSettings or {} |
| 63 | 63 |
| 64 -- reconcile any data accumulated before login trigger | 64 -- reconcile any data accumulated before login trigger |
| 65 for k,v in pairs(self.data) do | 65 for k,v in pairs(self.data) do |
| 66 if not VeneerData[configName][k] then | 66 if not VeneerData[configName][k] then |
| 67 print('reconciling pre-data:', k, v) | 67 print('reconciling pre-data:', k, v) |
| 68 VeneerData[configName][k] = v | 68 VeneerData[configName][k] = v |
| 69 end | 69 end |
| 70 end | 70 end |
| 71 | 71 local guid = UnitGUID('player') |
| 72 self.data = VeneerData[configName] | 72 self.data = VeneerData[configName] |
| 73 self.data[guid] = self.data[guid] or {} | |
| 74 self.profile = self.data[guid] | |
| 73 print('data table loaded:', configName) | 75 print('data table loaded:', configName) |
| 74 self.initialized = true | 76 self.initialized = true |
| 75 end | 77 end |
| 76 | 78 |
| 77 function VeneerHandlerMixin:Print(...) | 79 function VeneerHandlerMixin:Print(...) |
