- Fixing the pvp issue introduced in the previous build.
This commit is contained in:
+5
-4
@@ -876,7 +876,7 @@ function DF:CreateCoolTip()
|
||||
local func = CoolTip.FunctionsTableMain [self.index]
|
||||
--> passing nil as the first parameter was a design mistake
|
||||
--CoolTip.FunctionsTableMain [self.index] (_, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
local okay, errortext = pcall (func, nil, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
local okay, errortext = pcall (func, CoolTip.Host, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
if (not okay) then
|
||||
print ("Cooltip OnClick Error:", errortext)
|
||||
end
|
||||
@@ -892,7 +892,7 @@ function DF:CreateCoolTip()
|
||||
local parameterTable = CoolTip.ParametersTableSub [self.mainIndex] [self.index]
|
||||
local func = CoolTip.FunctionsTableSub [self.mainIndex] [self.index]
|
||||
--CoolTip.FunctionsTableSub [self.mainIndex] [self.index] (_, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
local okay, errortext = pcall (func, nil, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
local okay, errortext = pcall (func, CoolTip.Host, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
if (not okay) then
|
||||
print ("Cooltip OnClick Error:", errortext)
|
||||
end
|
||||
@@ -2436,7 +2436,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
if (CoolTip.SubIndexes == 0) then
|
||||
if (not indexUp or not leftText) then
|
||||
print ("not indexUp or not leftText")
|
||||
print ("GameCooltip Error: Attempt to add a submenu with a parent")
|
||||
return --> error
|
||||
end
|
||||
end
|
||||
@@ -2444,8 +2444,9 @@ function DF:CreateCoolTip()
|
||||
if (indexUp and leftText) then
|
||||
CoolTip.SubIndexes = CoolTip.SubIndexes + 1
|
||||
CoolTip.IndexesSub [CoolTip.Indexes] = CoolTip.IndexesSub [CoolTip.Indexes] + 1
|
||||
|
||||
elseif (indexUp and not leftText) then
|
||||
print ("indexUp and not leftText")
|
||||
print ("GameCooltip Error: Attempt to add a submenu with a parent")
|
||||
return --> error [leftText can't be nil if indexUp are true]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user