-Added in some pet spells.

-Pet CD Guessing is complete
-Bumped version to 1.0RC1
This commit is contained in:
Relintai 2016-05-06 16:08:08 +02:00
parent f72f0d9ea5
commit 51c96da543
7 changed files with 592 additions and 543 deletions

130
Vect.lua
View File

@ -1,11 +1,4 @@
--TODOS:
--Option to show pet cds on possible master (eg spell lock on all locks)
--document the db these will be needed:
--silence, gapcloser, defensive, potion, nuke, anticc, cc, stun, disarm, cdreset, shield, uncategorized
--db-> class, type, isPet
--"Globals"
local aceDB = LibStub("AceDB-3.0");
local aceCDialog = LibStub("AceConfigDialog-3.0");
@ -42,6 +35,7 @@ Vect.defaults = {
allCDebug = false,
selfCDRegister = false,
specdetection = false,
petcdguessing = true,
target = {
enabled = true,
size = 27,
@ -92,78 +86,78 @@ Vect.defaults = {
drnumsize = 14,
drnumposition = 1
},
colors = {
["gapcloser"] = {
["a"] = 1,
["b"] = 0,
["g"] = 0.8117647058823529,
["r"] = 1,
color = {
gapcloser = {
a = 1,
b = 0,
g = 0.8117647058823529,
r = 1,
},
["anticc"] = {
["a"] = 1,
["b"] = 0.796078431372549,
["g"] = 1,
["r"] = 0,
anticc = {
a = 1,
b = 0.796078431372549,
g = 1,
r = 0,
},
["disarm"] = {
["a"] = 1,
["b"] = 0.9647058823529412,
["g"] = 1,
["r"] = 0,
disarm = {
a = 1,
b = 0.9647058823529412,
g = 1,
r = 0,
},
["defensive"] = {
["a"] = 1,
["b"] = 0.08627450980392157,
["g"] = 1,
["r"] = 0.2,
defensive = {
a = 1,
b = 0.08627450980392157,
g = 1,
r = 0.2,
},
["nuke"] = {
["a"] = 1,
["b"] = 0,
["g"] = 0,
["r"] = 1,
nuke = {
a = 1,
b = 0,
g = 0,
r = 1,
},
["shield"] = {
["a"] = 1,
["b"] = 0.3333333333333333,
["g"] = 1,
["r"] = 0.8901960784313725,
shield = {
a = 1,
b = 0.3333333333333333,
g = 1,
r = 0.8901960784313725,
},
["potion"] = {
["a"] = 1,
["b"] = 0.6313725490196078,
["g"] = 0.7372549019607844,
["r"] = 1,
potion = {
a = 1,
b = 0.6313725490196078,
g = 0.7372549019607844,
r = 1,
},
["cdreset"] = {
["a"] = 1,
["b"] = 1,
["g"] = 0,
["r"] = 0.6274509803921569,
cdreset = {
a = 1,
b = 1,
g = 0,
r = 0.6274509803921569,
},
["silence"] = {
["a"] = 1,
["b"] = 1,
["g"] = 0.03529411764705882,
["r"] = 0.1882352941176471,
silence = {
a = 1,
b = 1,
g = 0.03529411764705882,
r = 0.1882352941176471,
},
["stun"] = {
["a"] = 1,
["b"] = 1,
["g"] = 0.07450980392156863,
["r"] = 0.9137254901960784,
stun = {
a = 1,
b = 1,
g = 0.07450980392156863,
r = 0.9137254901960784,
},
["uncategorized"] = {
["a"] = 1,
["b"] = 1,
["g"] = 0.9058823529411765,
["r"] = 0.9607843137254902,
uncategorized = {
a = 1,
b = 1,
g = 0.9058823529411765,
r = 0.9607843137254902,
},
["cc"] = {
["a"] = 1,
["b"] = 0.3686274509803922,
["g"] = 0.3568627450980392,
["r"] = 0.3764705882352941,
cc = {
a = 1,
b = 0.3686274509803922,
g = 0.3568627450980392,
r = 0.3764705882352941,
},
},
cdtypesortorder = {

View File

@ -6,7 +6,7 @@
## DefaultState: Enabled
## OptionalDeps: Ace3
## SavedVariables: VectDB
## Version: 0.9
## Version: 1.0RC1
embeds.xml
data\global.lua

View File

@ -56,7 +56,9 @@ function Vect:AddCd(srcGUID, spellID)
if not Vect.cds[srcGUID] then
Vect.cds[srcGUID] = {}
Vect.cds[srcGUID]["spec"] = 1;
Vect.cds[srcGUID]["spec"] = {};
Vect.cds[srcGUID]["spec"][1] = 1;
Vect.cds[srcGUID]["spec"][2] = "";
end
local specchange = false;
@ -66,9 +68,16 @@ function Vect:AddCd(srcGUID, spellID)
end
end
local spec = Vect.cds[srcGUID]["spec"];
local spec = Vect.cds[srcGUID]["spec"][1];
local class, isPet = Vect.spells[spellID][7], Vect.spells[spellID][9];
local cd, reset, spellCategory = Vect.spells[spellID][spec], Vect.spells[spellID][2], Vect.spells[spellID][8];
if db["petcdguessing"] then
if (Vect.cds[srcGUID]["spec"][2] == "") and class then
Vect.cds[srcGUID]["spec"][2] = class;
end
end
if specchange and (not cd) then
if self.targets["target"] == srcGUID then
self:ReassignCds("target");
@ -94,6 +103,22 @@ function Vect:AddCd(srcGUID, spellID)
spellCategory
}
--add it to every class of the same type
if db["petcdguessing"] and isPet then
for k, v in pairs(Vect.cds) do
if (v["spec"][2] == class) then
Vect.cds[k][spellID] = {
currentTime,
endTime,
cd,
spellIcon,
spellID,
spellCategory
}
end
end
end
--self:Print(Vect.cds[srcGUID][spellID][1] .. " " .. Vect.cds[srcGUID][spellID][2] .. " " .. Vect.cds[srcGUID][spellID][3]);
if reset then
@ -103,11 +128,11 @@ function Vect:AddCd(srcGUID, spellID)
--self:Print(self.targets["target"]);
--self:Print(s
if self.targets["target"] == srcGUID then
if self.targets["target"] == srcGUID or isPet then
self:ReassignCds("target");
end
if self.targets["focus"] == srcGUID then
if self.targets["focus"] == srcGUID or isPet then
self:ReassignCds("focus");
end
end
@ -116,7 +141,7 @@ function Vect:DetectSpec(srcGUID, spellID)
local spec = Vect.spells[spellID][6];
if spec == 0 then return false end;
if Vect.cds[srcGUID]["spec"] == spec then return false end;
if Vect.cds[srcGUID]["spec"][1] == spec then return false end;
--self:Print("spec found: " .. spec);
Vect:RemapSpecCDs(srcGUID, spec);
return true;

View File

@ -2,7 +2,7 @@
Vect = LibStub("AceAddon-3.0"):NewAddon("Vect", "AceConsole-3.0", "AceEvent-3.0")
Vect.appName = "Vect"
Vect.dbName = "VectDB"
Vect.version = "0.9"
Vect.version = "1.0RC1"
function Vect:HideFrames()
for i = 1, 23 do

View File

@ -118,6 +118,16 @@ function Vect:setCDTypeSortingEnable(v)
self:ReassignCds("focus");
end
function Vect:getPetCDGuessing()
local db = Vect.db.profile;
return db["petcdguessing"];
end
function Vect:setPetCDGuessing(v)
local db = Vect.db.profile;
db["petcdguessing"] = v;
end
--lock
function Vect:isLocked()
return Vect.db.profile["locked"];

View File

@ -414,9 +414,9 @@ function Vect:getGlobalOptions()
type = "toggle", name = "Pet CD Guessing",
desc = "Enable/Disable Pet Cd Guessing, this will show pet cds on all possible masters, since there is no reasonable way of determining who's pet it is from combatlog events and GUIDs, this will be really inaccurate if there are 2-3 lock for example.",
order = 12,
get = function() return Vect:isSpecDetectionEnabled() end,
get = function() return Vect:getPetCDGuessing() end,
set = function(_, v)
Vect:setSpecDetectionEnabledorDisabled(v);
Vect:setPetCDGuessing(v);
end
},
globalcdtypesortHeader = {

File diff suppressed because it is too large Load Diff