A Flamescale Wyrmkin
Join Date: Jan 2024
Posts: 122
|
Hello. Thank you very much for your help. Today I will test this code. I wrote to the creator of addon Events tracker, below is the text of his response. Perhaps his answer will help us understand each other. Once again sorry for the inconvenience.
Hm Trial of the Element (event A) is only one event where i don't calculate from weekly restart.
This event i calculate from Storm Fury (event B)
[8] = { name = "Trial of the Elements",
texture = "VignetteLootElite",
eventRegionOffset = { [1] = 1670342460, [2] = 1670698860, [3] = 1674763260, [4] = 1670698860, [5] = 1670677260,},
eventDuration = 600,
eventInterval = 3600,
enable = true,
sound = false,
voice_before = false,
voice_active = false,
anim = true,
questIDs = {71995},
findEventOnMap = {},
coor = {},
datablock = {
[0] = {name = "Trial of the Elements", enable = false, coor = {2085, 27.91, 25.86},},
[1] = {name = "Trial of the Elements", enable = false, coor = {2085, 27.91, 25.86},},
[2] = {name = "Trial of the Elements", enable = true, coor = {2085, 27.91, 25.86},},
[3] = {name = "Trial of the Elements", enable = true, coor = {2085, 27.91, 25.86},},
[4] = {name = "Trial of the Elements", enable = true, coor = {2085, 27.91, 25.86},}, }, },
In datablock 2x event is disabled, because in this time is Storm Fury active.
Find new active hour :
local index = math.floor(((timeFromFirstStart + (not isEventActive and DefaultConfig.events[self.index].eventInterval or 0)) / DefaultConfig.events[self.index].eventInterval) % (#DefaultConfig.events[self.index].datablock + 1));
By this function i find correct time (if next event is FALSE + evetTime)
index = FindNextEventInDataBlock(self, index)
local function FindNextEventInDataBlock(self, index)
for i = 0, #DefaultConfig.events[self.index].datablock do
if not DefaultConfig.events[self.index].datablock[index].enable then
self.timeTmp = (self.timeTmp or 0) + DefaultConfig.events[self.index].eventInterval;
else return index
end
index = index == #DefaultConfig.events[self.index].datablock and 0 or (index + 1);
end
return index
end
|
Last edited by Hubb777 : 03-14-24 at 10:03 PM.
|