Mercurial > wow > cyborg-mmo7
comparison RatPageView.lua @ 34:6ce173840e68
Reworked the whole "wow object" system:
- Only save what is strictly necessary.
- Save appropriate persistent information for all objects (like spellIDs instead of spellBook+spellIndex).
- Fixed Battle Pets objects (non-combat pets in pre-MoP).
- Fixed item objects.
- Cleaned and simplified most objects implementation.
- Moved the settings and button profile to the root of the saved data, rather than in a per-character sub-table (that data is already tagged as saved per character).
This should fix most issues with objects changing without user interaction on diverse occasions.
Old profiles are not converted to the new system. This will come soon.
Some issues persist due to the asynchronous loading of some informations:
- Pet icons are never properly loaded from saved data.
- Items are not properly loaded the first time the UI is started (a "/reload ui" or disconnect/connect cycle fixes this problem).
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Thu, 25 Apr 2013 01:31:31 +0000 |
parents | cccc7661a2e6 |
children |
comparison
equal
deleted
inserted
replaced
33:1c0af1810e06 | 34:6ce173840e68 |
---|---|
80 | 80 |
81 self.Update = function(data, activeMode) | 81 self.Update = function(data, activeMode) |
82 local icon = _G[self:GetName().."Icon"] | 82 local icon = _G[self:GetName().."Icon"] |
83 if data[activeMode][self.Id] then | 83 if data[activeMode][self.Id] then |
84 self:SetChecked(true) | 84 self:SetChecked(true) |
85 icon:SetTexture(data[activeMode][self.Id].Texture) | 85 icon:SetTexture(data[activeMode][self.Id].texture) |
86 else | 86 else |
87 icon:SetTexture(nil) | 87 icon:SetTexture(nil) |
88 self:SetChecked(false) | 88 self:SetChecked(false) |
89 end | 89 end |
90 | 90 |
105 self.Update = function(data, activeMode) | 105 self.Update = function(data, activeMode) |
106 local icon = _G[self:GetName().."Icon"] | 106 local icon = _G[self:GetName().."Icon"] |
107 if data[activeMode][self.Id] then | 107 if data[activeMode][self.Id] then |
108 self:SetChecked(true) | 108 self:SetChecked(true) |
109 | 109 |
110 icon:SetTexture(data[activeMode][self.Id].Texture) | 110 icon:SetTexture(data[activeMode][self.Id].texture) |
111 icon:SetAlpha(.5) | 111 icon:SetAlpha(.5) |
112 else | 112 else |
113 icon:SetTexture(nil) | 113 icon:SetTexture(nil) |
114 self:SetChecked(false) | 114 self:SetChecked(false) |
115 end | 115 end |