Skip to content

Commit

Permalink
New event found dialog updates
Browse files Browse the repository at this point in the history
  • Loading branch information
serkanyazicioglu committed Aug 20, 2024
1 parent 7e54778 commit 13c3ffe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
22 changes: 18 additions & 4 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ function Core:ToggleWindow()
if (CalendarFrame) then
HideUIPanel(CalendarFrame);
end
StaticPopup_Hide("NEW_EVENT_FOUND");

Core:RefreshApplication();
containerFrame:Show();
end
Expand Down Expand Up @@ -1455,10 +1457,8 @@ function Core:CheckEventInvites()
for i = 1, ns.UPCOMING_EVENTS.totalEvents do
local upcomingEvent = ns.UPCOMING_EVENTS.events[i];

Core:Debug("Checking event: " .. upcomingEvent.titleWithKey);

if (guildName == upcomingEvent.guild and realmName == upcomingEvent.guildRealmNormalized and regionId == upcomingEvent.guildRegionId) then
--Core:Debug("Event found for guild: " .. upcomingEvent.titleWithKey);
Core:Debug("Event found for guild: " .. upcomingEvent.titleWithKey);

if (not processedEvents:contains(upcomingEvent.titleWithKey)) then
local eventIndex = Core:searchForEvent(upcomingEvent);
Expand Down Expand Up @@ -1512,7 +1512,21 @@ function Core:CheckEventInvites()
if (containerFrame:IsShown()) then
Core:CreateUpcomingEvents();
else
if (processedEvents:count() < ns.UPCOMING_EVENTS.totalEvents) then
local currentGuildEventsCount = 0;

if (ns.UPCOMING_EVENTS.totalEvents > 0) then
for i = 1, ns.UPCOMING_EVENTS.totalEvents do
local upcomingEvent = ns.UPCOMING_EVENTS.events[i];

if (guildName == upcomingEvent.guild and realmName == upcomingEvent.guildRealmNormalized and regionId == upcomingEvent.guildRegionId) then
currentGuildEventsCount = currentGuildEventsCount + 1;
end
end
end

Core:Debug("Current guild events count: " .. currentGuildEventsCount);

if (processedEvents:count() < currentGuildEventsCount) then
Core:OpenDialog("NEW_EVENT_FOUND");
end
end
Expand Down
2 changes: 1 addition & 1 deletion GuildsOfWoW-Cata.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Guilds of WoW guild herald for Classic Progression servers
## X-Website: https://guildsofwow.com
## Author: Nhea
## Version: 1.5.4
## Version: 1.5.5
## SavedVariables: GoWDB
## IconTexture: Interface\Icons\vas_guildfactionchange

Expand Down
2 changes: 1 addition & 1 deletion GuildsOfWoW-Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Guilds of WoW guild herald for Classic Era servers
## X-Website: https://guildsofwow.com
## Author: Nhea
## Version: 1.5.4
## Version: 1.5.5
## SavedVariables: GoWDB

embed.xml
Expand Down
2 changes: 1 addition & 1 deletion GuildsOfWoW.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Guilds of WoW guild herald for retail World of Warcraft
## X-Website: https://guildsofwow.com
## Author: Nhea
## Version: 1.5.4
## Version: 1.5.5
## SavedVariables: GoWDB
## OptionalDeps: AstralKeys
## AddonCompartmentFunc: GuildsOfWow_OnAddonButtonClick
Expand Down

0 comments on commit 13c3ffe

Please sign in to comment.