Skip to content

Commit

Permalink
Merge branch 'feature/v1.0.5-tbc' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
fs86 committed Jul 18, 2021
2 parents 3a30bc5 + dfa6e77 commit 652c525
Show file tree
Hide file tree
Showing 24 changed files with 3,483 additions and 529 deletions.
61 changes: 12 additions & 49 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,18 @@
## v1.0.4d-tbc
# LFG MatchMaker TBC

- Minor Bugfixes (primary for testing automated deployments to curseforge)
[Changelog history](https://github.com/fs86/LFG_MatchMaker_TBC/blob/master/CHANGELOG_HISTORY.md)

## v1.0.4c-tbc
## 1.10.0

- Added more dungeon identifiers
**Technical info:** This release jumps to version number 1.10.0 to better reflect past changes. Many new features have been added that should have resulted in an increase in the minor version number rather than the patch level.

## v1.0.4b-tbc
**Functional changes in this release:**

- Fix for HC filter fix :-)
- Added more HC and boost filter identifiers
- Players guild names are now shown in info / popup dialog
- Added arena 2vs2, 3vs3 and 5vs5 for PvP category
- Added new dungeon identifiers for COT1 and Shadow Lab.
- Possibility to add dungeons that will be released in a future phase. These dungeons will then be shown once the phase is live.
- Changed internal dungeon indexes. **If any LUA errors occur, please delete the SavedVariables file 'LFG_MatchMaker_TBC.lua' in your Account directory.**

## v1.0.4a-tbc

- Bugfix: The HC filter should now work a little more accurately.

## v1.0.4-tbc

- Added mode filter to TBC dungeons (available modes are: none, Heroic, Normal)
Important: Filtering for specific modes is only available for LFG / LFM tab. In addition, the filter is not yet 100% accurate, which means that one or the other message is not displayed as a match. I will try to improve the filter for future versions. For the search for raids the filter should be deactivated (Mode: none).

## v1.0.3a-tbc

- Bugfix: Changed French LFG channel name from "RechercheGroupe" to "RechercheDeGroupe"

## v1.0.3-tbc

- Popup Window: Changed button text from "Ignore" to "Ignore request"
- Added French dungeon identifiers

## v1.0.2-tbc

- Core
- Improved accuracy of boost filter
- Improved accuracy of german dungeon identifiers
- LFG Tab, List Tab
- Added separate dropdown lists (Vanilla, Burning Crusade, PvP)
- LFM Tab
- Added pre-filtering for dungeon selection (Vanilla, Buring Crusade, PvP)
- Settings Tab
- Removed "Hide PvP" Option
- Broadcast window
- Fixed missing texture
- Invite Received Popup
- Added close button

## v1.0.1-tbc

- Added boost filter for LFG and LFM tab (english and german)

## v1.0.0-tbc

- Added support for TBC Classic
- Added TBC dungeons and raids
**What's next?**\
I can't make any promises at this point, but I will try to include role selection for the LFG and LFM tab for one of the next versions.
57 changes: 57 additions & 0 deletions CHANGELOG_HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# LFG MatchMaker TBC

## v1.0.4d-tbc

- Minor Bugfixes (primary for testing automated deployments to curseforge)

## v1.0.4c-tbc

- Added more dungeon identifiers

## v1.0.4b-tbc

- Fix for HC filter fix :-)
- Added more HC and boost filter identifiers

## v1.0.4a-tbc

- Bugfix: The HC filter should now work a little more accurately.

## v1.0.4-tbc

- Added mode filter to TBC dungeons (available modes are: none, Heroic, Normal)
Important: Filtering for specific modes is only available for LFG / LFM tab. In addition, the filter is not yet 100% accurate, which means that one or the other message is not displayed as a match. I will try to improve the filter for future versions. For the search for raids the filter should be deactivated (Mode: none).

## v1.0.3a-tbc

- Bugfix: Changed French LFG channel name from "RechercheGroupe" to "RechercheDeGroupe"

## v1.0.3-tbc

- Popup Window: Changed button text from "Ignore" to "Ignore request"
- Added French dungeon identifiers

## v1.0.2-tbc

- Core
- Improved accuracy of boost filter
- Improved accuracy of german dungeon identifiers
- LFG Tab, List Tab
- Added separate dropdown lists (Vanilla, Burning Crusade, PvP)
- LFM Tab
- Added pre-filtering for dungeon selection (Vanilla, Buring Crusade, PvP)
- Settings Tab
- Removed "Hide PvP" Option
- Broadcast window
- Fixed missing texture
- Invite Received Popup
- Added close button

## v1.0.1-tbc

- Added boost filter for LFG and LFM tab (english and german)

## v1.0.0-tbc

- Added support for TBC Classic
- Added TBC dungeons and raids
14 changes: 13 additions & 1 deletion LFGMM_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,22 @@ function LFGMM_Core_EventHandler(self, event, ...)
-- Parse /who response for player level
elseif (event == "CHAT_MSG_SYSTEM") then
local message = select(1, ...);
local player, level = string.match(message, "%[(.+)%]%ph%s?: [^%s]* (%d*)");
local player, level, guild = string.match(message, "%[(.+)%]%ph%s?: [^%s]* (%d*)");

-- I don't know how to get the guild name with string.match() ...
local guildName = "";
local guildBracketStart = strfind(message, "<");
local guildBrackedEnd = strfind(message, ">");

if (guildBracketStart ~= nil and guildBrackedEnd ~= nil) then
if (guildBracketStart > 0 and guildBrackedEnd > 0) then
guildName = strsub(message, guildBracketStart, guildBrackedEnd);
end
end

if (LFGMM_GLOBAL.MESSAGES[player] ~= nil) then
LFGMM_GLOBAL.MESSAGES[player].PlayerLevel = level;
LFGMM_GLOBAL.MESSAGES[player].GuildName = guildName;

LFGMM_ListTab_Refresh();
LFGMM_ListTab_MessageInfoWindow_Refresh();
Expand Down
10 changes: 5 additions & 5 deletions LFGMM_FrameBackdrops.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FRAME_BACKDROP_DEFAULT_DIALOG = {
bgFile = "Interface\\FriendsFrame\\UI-Toast-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
bgFile = "Interface\\FriendsFrame\\UI-Toast-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true,
tileSize = 28,
edgeSize = 28,
insets = { left = 5, right = 5, top = 5, bottom = 5 }
tileSize = 28,
edgeSize = 28,
insets = { left = 5, right = 5, top = 5, bottom = 5 }
}
18 changes: 10 additions & 8 deletions LFGMM_LfgTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,16 @@ function LFGMM_LfgTab_DungeonsDropDown_OnInitialize_Internal(level, dungeonMap)

-- Dungeon menu items
for _, dungeon in ipairs(entry.List) do
if (dungeon.ParentDungeon == nil) then
if (dungeon.SubDungeons == nil) then
createSingleDungeonItem(dungeon);
else
createMultiDungeonItem(dungeon, buttonIndex);
end
buttonIndex = buttonIndex + 1;
end
if (dungeon.Enabled) then
if (dungeon.ParentDungeon == nil) then
if (dungeon.SubDungeons == nil) then
createSingleDungeonItem(dungeon);
else
createMultiDungeonItem(dungeon, buttonIndex);
end
buttonIndex = buttonIndex + 1;
end
end
end
end
end
Expand Down
16 changes: 9 additions & 7 deletions LFGMM_LfmTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ function LFGMM_LfmTab_DungeonsDropDown_Initialize_Internal(level, dungeonMap)

-- Dungeon menu items
for _, dungeon in ipairs(entry.List) do
if (dungeon.ParentDungeon == nil) then
if (dungeon.SubDungeons == nil) then
createSingleDungeonItem(dungeon);
else
createMultiDungeonItem(dungeon);
end
end
if (dungeon.Enabled) then
if (dungeon.ParentDungeon == nil) then
if (dungeon.SubDungeons == nil) then
createSingleDungeonItem(dungeon);
else
createMultiDungeonItem(dungeon);
end
end
end
end
end
elseif level == 2 then
Expand Down
30 changes: 21 additions & 9 deletions LFGMM_ListTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ function LFGMM_ListTab_Refresh()
playerLevel = " [" .. message.PlayerLevel .. "]";
end

getglobal("LFGMM_ListTab_Entry" .. entryIndex .. "PlayerName"):SetText(message.PlayerClass.Color .. message.Player .. playerLevel);
local guildName = "";
if (message.GuildName ~= nil and message.GuildName ~= "") then
guildName = " " .. message.GuildName;
end

getglobal("LFGMM_ListTab_Entry" .. entryIndex .. "PlayerName"):SetText(message.PlayerClass.Color .. message.Player .. guildName .. playerLevel);

-- Message
local messageText = message.Message;
Expand Down Expand Up @@ -397,13 +402,15 @@ function LFGMM_ListTab_DungeonsDropDown_OnInitialize_Interial(level, categoryCod

-- Dungeon menu items
for _, dungeon in ipairs(entry.List) do
if (dungeon.ParentDungeon == nil) then
if (dungeon.SubDungeons == nil) then
createSingleDungeonItem(dungeon);
else
createMultiDungeonItem(dungeon);
end
end
if (dungeon.Enabled) then
if (dungeon.ParentDungeon == nil) then
if (dungeon.SubDungeons == nil) then
createSingleDungeonItem(dungeon);
else
createMultiDungeonItem(dungeon);
end
end
end
end
end
end
Expand Down Expand Up @@ -712,8 +719,13 @@ function LFGMM_ListTab_MessageInfoWindow_Refresh()

local message = LFGMM_ListTab_MessageInfoWindow.Message;

local guildName = "";
if (message.GuildName ~= nil and message.GuildName ~= "") then
guildName = " " .. message.GuildName;
end

-- Player
LFGMM_ListTab_MessageInfoWindow_PlayerText:SetText(message.PlayerClass.Color .. "[" .. message.Player .. "]:");
LFGMM_ListTab_MessageInfoWindow_PlayerText:SetText(message.PlayerClass.Color .. "[" .. message.Player .. "]" .. guildName .. ":");

-- Message
LFGMM_ListTab_MessageInfoWindow_MessageText:SetText(message.Message);
Expand Down
7 changes: 6 additions & 1 deletion LFGMM_PopupWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ function LFGMM_PopupWindow_Refresh()

local message = LFGMM_PopupWindow.Message;

local guildName = "";
if (message.GuildName ~= nil and message.GuildName ~= "") then
guildName = " " .. message.GuildName;
end

-- Class
LFGMM_PopupWindow_ClassIcon:SetTexCoord(unpack(message.PlayerClass.IconCoordinates));
LFGMM_PopupWindow_ClassText:SetText(message.PlayerClass.Color .. message.PlayerClass.LocalizedName);
Expand All @@ -206,7 +211,7 @@ function LFGMM_PopupWindow_Refresh()
LFGMM_PopupWindow_LevelText:SetText(message.PlayerClass.Color .. (message.PlayerLevel or "?"));

-- Player
LFGMM_PopupWindow_PlayerText:SetText(message.PlayerClass.Color .. "[" .. message.Player .. "]:");
LFGMM_PopupWindow_PlayerText:SetText(message.PlayerClass.Color .. "[" .. message.Player .. "]" .. guildName .. ":");

-- Message
LFGMM_PopupWindow_MessageText:SetText(message.Message);
Expand Down
41 changes: 41 additions & 0 deletions LFGMM_TBC_PhaseHelper.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
function LFGMM_TBC_PhaseHelper_Time(date)
local timeFn = time or os.time;

if date ~= nil then
return timeFn(date);
end

return timeFn();
end

function LFGMM_TBC_PhaseHelper_Difftime(t2, t1)
local difftimeFn = difftime or os.difftime;
return difftimeFn(t2, t1);
end

TBC_PHASES = {
PHASE_1 = "PHASE_1", -- TBC release, Karazhan, Gruul's Lair, Magtheridon's Lair
PHASE_2 = "PHASE_2", -- Serpentshrine Cavern, Tempest Keep
PHASE_3 = "PHASE_3", -- Hyjal, Black Temple
PHASE_4 = "PHASE_4", -- Zul'aman
PHASE_5 = "PHASE_5" -- Sunwell Plateau
}

TBC_PHASE_RELEASE_DATES = {
[TBC_PHASES.PHASE_1] = LFGMM_TBC_PhaseHelper_Time({ month = 6, day = 1, year = 2021 }),
[TBC_PHASES.PHASE_2] = nil,
[TBC_PHASES.PHASE_3] = nil,
[TBC_PHASES.PHASE_4] = nil,
[TBC_PHASES.PHASE_5] = nil,
}

function LFGMM_TBC_PhaseHelper_EnableFor(tbcPhase)
local releaseDate = TBC_PHASE_RELEASE_DATES[tbcPhase];

if (releaseDate == nil) then
return false;
end

local diffInDays = LFGMM_TBC_PhaseHelper_Difftime(LFGMM_TBC_PhaseHelper_Time(), releaseDate) / (24 * 60 * 60);
return diffInDays < 0 and false or true;
end
Loading

0 comments on commit 652c525

Please sign in to comment.