vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | -- Gatherer database related routines |
2 | -- |
||
3 | |||
4 | function Gatherer_sanitizeDatabase(db) |
||
5 | -- type: (GathererDb) -> None |
||
6 | for continent, continentData in db do |
||
7 | for zone, zoneData in continentData do |
||
8 | for gather, gatherNodes in zoneData do |
||
9 | for nodeIndex, nodeInfo in gatherNodes do |
||
10 | if not nodeInfo.icon then |
||
11 | -- Due to l10n conflicts in old versions |
||
12 | -- syncs could produce buggy nodes without icon field. |
||
13 | -- Eliminate them. |
||
14 | Gatherer_ChatNotify( |
||
15 | 'Detected empty icon:\n '..tostring(nodeInfo.icon), |
||
16 | Gatherer_ENotificationType.debug |
||
17 | ) |
||
18 | Gatherer_ChatNotify( |
||
19 | 'Decided to remove: '..table.concat({continent, zone, gather, nodeIndex}, ', '), |
||
20 | Gatherer_ENotificationType.debug |
||
21 | ) |
||
22 | db[continent][zone][gather][nodeIndex] = nil |
||
23 | elseif type(nodeInfo.icon) == 'string' then |
||
24 | -- convert to IconIndex |
||
25 | db[continent][zone][gather][nodeIndex].icon = Gatherer_GetDB_IconIndex(nodeInfo.icon, nodeInfo.gtype) |
||
26 | end |
||
27 | end |
||
28 | end |
||
29 | end |
||
30 | end |
||
31 | end |