Mercurial > wow > wowdb-profiler
comparison Main.lua @ 71:8ff44f76e844 1.0
Add temporary checks to disable the AddOn if ran on a 4.3.4 server.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Tue, 14 Aug 2012 15:50:15 -0500 |
parents | 27549237b4d8 |
children | 06daf4cb1cf9 |
comparison
equal
deleted
inserted
replaced
70:b085df332056 | 71:8ff44f76e844 |
---|---|
405 | 405 |
406 ----------------------------------------------------------------------- | 406 ----------------------------------------------------------------------- |
407 -- Methods. | 407 -- Methods. |
408 ----------------------------------------------------------------------- | 408 ----------------------------------------------------------------------- |
409 function WDP:OnInitialize() | 409 function WDP:OnInitialize() |
410 -- TODO: Remove this once 5.0.4 hits Live. | |
411 if private.wow_version == "4.3.4" then | |
412 return | |
413 end | |
410 db = LibStub("AceDB-3.0"):New("WoWDBProfilerData", DATABASE_DEFAULTS, "Default").global | 414 db = LibStub("AceDB-3.0"):New("WoWDBProfilerData", DATABASE_DEFAULTS, "Default").global |
411 | 415 |
412 local raw_db = _G["WoWDBProfilerData"] | 416 local raw_db = _G["WoWDBProfilerData"] |
413 | |
414 local build_num = tonumber(private.build_num) | 417 local build_num = tonumber(private.build_num) |
415 | 418 |
416 -- TODO: Un-comment this when MoP goes live. | 419 -- TODO: Un-comment this when MoP goes live. |
417 -- if raw_db.build_num and raw_db.build_num < build_num then | 420 -- if raw_db.build_num and raw_db.build_num < build_num then |
418 -- for entry in pairs(DATABASE_DEFAULTS.global) do | 421 -- for entry in pairs(DATABASE_DEFAULTS.global) do |
423 raw_db.version = DB_VERSION | 426 raw_db.version = DB_VERSION |
424 end | 427 end |
425 | 428 |
426 | 429 |
427 function WDP:OnEnable() | 430 function WDP:OnEnable() |
431 -- TODO: Remove this once 5.0.4 hits Live. | |
432 if private.wow_version == "4.3.4" then | |
433 return | |
434 end | |
435 | |
428 for event_name, mapping in pairs(EVENT_MAPPING) do | 436 for event_name, mapping in pairs(EVENT_MAPPING) do |
429 self:RegisterEvent(event_name, (_G.type(mapping) ~= "boolean") and mapping or nil) | 437 self:RegisterEvent(event_name, (_G.type(mapping) ~= "boolean") and mapping or nil) |
430 end | 438 end |
431 durability_timer_handle = self:ScheduleRepeatingTimer("ProcessDurability", 30) | 439 durability_timer_handle = self:ScheduleRepeatingTimer("ProcessDurability", 30) |
432 target_location_timer_handle = self:ScheduleRepeatingTimer("UpdateTargetLocation", 0.5) | 440 target_location_timer_handle = self:ScheduleRepeatingTimer("UpdateTargetLocation", 0.5) |