Skip to content

Commit

Permalink
Merge pull request #56 from Slivo-fr/release/v2.1.0
Browse files Browse the repository at this point in the history
Release/v2.1.0
  • Loading branch information
Slivo-fr authored Jun 20, 2021
2 parents c96e245 + 89517a0 commit 7ff04c9
Show file tree
Hide file tree
Showing 20 changed files with 195 additions and 39 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
libs
copy.sh
copy.sh
package.sh
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Please report any issue on github : https://github.com/Slivo-fr/TranqRotate/issu
- Display the frenzy cooldown of each boss
- Optional automatic backup call when incapacitated
- Optional automatic timed backup call
- Prints to chat name and reason of a tranq fail (miss or resist)
- Prints to chat the reason of a tranq fail (miss or resist)
- Show an indicator on hunters that does not use the addon

## Usage
Expand All @@ -49,13 +49,12 @@ You can now just pull the boss and start shooting your tranqshots, TranqRotate w

**Warning** : if all of your hunters does not use the addon, make sure someone with the addon stay within 45m range of hunters without the addon or you won't be able to register their tranqshot. MC and AQ40 tranq encounters might lead to range issues. However, I didn't had any complain about this yet :)

You can use the reset button in the top bar to reset the rotation state if it do not clear itself.
The reset button is also able to resync raid hunters and rotation setup if you need.
You can use the reset button in the top bar to reset the rotation status

You may adds the `/tranq backup` command to a macro that you can use when you are unable to tranq and you need some help,
It will whisper all backup hunters the fail message.

The `/tranq check` command allows you to list version or TranqRotate used by others hunters and others non-hunters players
The `/tranq check` command allows you to list TranqRotate versions used by others players

## Roadmap

Expand Down
4 changes: 2 additions & 2 deletions TranqRotate.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 11307
## Title: TranqRotate |cff00aa002.0.0|r
## Title: TranqRotate |cff00aa002.1.0|r
## Notes: A tranqshot rotation assistant
## Author: Slivo
## Version: 2.0.0
## Version: 2.1.0
## SavedVariables: TranqRotateDb
## OptionalDeps: Ace3

Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## TranqRotate Changelog

#### v2.1.0

- Removes server suffixes from player names everywhere (connected realms)
- Adds an option to re-add shortened or full server suffixes to player names (in case of unlikely namesake)
- Adds rotation reset sync
- Removes the ability to re-sync tranq order from the reset button
- Adds highlighted "next" hunter to the tranq rotation sync

#### v2.0.0

- Fix connected realms sync issues - **BREAKING CHANGES**
Expand Down
14 changes: 12 additions & 2 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ local L = {
["WINDOW_LOCKED"] = "TranqRotate: Window locked",
["WINDOW_UNLOCKED"] = "TranqRotate: Window unlocked",

--- Player names formatting options
["PLAYER_NAME_FORMAT"] = "Player names format",
["PLAYER_NAME_FORMAT_DESC"] = "On connected realms, players from other servers will have a the server suffix hidden by default. If you ever get two hunter with the exact same name, adjust this setting to your needs",
["PLAYER_NAME_ONLY_OPTION_LABEL"] = "Playername",
["SHORTENED_SUFFIX_OPTION_LABEL"] = "Playername-Ser",
["FULL_NAME_OPTION_LABEL"] = "Playername-Server",

["TEST_MODE_HEADER"] = "Test mode",
["ENABLE_ARCANE_SHOT_TESTING"] = "Toggle testing mode",
["ENABLE_ARCANE_SHOT_TESTING_DESC"] =
Expand Down Expand Up @@ -101,14 +108,17 @@ local L = {
["BROADCAST_ROTATION_PREFIX"] = "Rotation",
["BROADCAST_BACKUP_PREFIX"] = "Backup",

--- Blind icon tooltip
-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "This player does not use TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Or runs an outdated version below 1.6.0",
["TOOLTIP_DISABLE_SETTINGS"] = "(You can disable this icon and/or this tooltip in the settings)",

--- Available update
-- Available update
["UPDATE_AVAILABLE"] = "A new TranqRotate version is available, update to get latest features",
["BREAKING_UPDATE_AVAILABLE"] = "A new BREAKING TranqRotate update is available, you MUST update AS SOON AS possible! TranqRotate may not work properly with up-to-date version users.",

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",
}

TranqRotate.L = L
14 changes: 12 additions & 2 deletions locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ local L = {
["WINDOW_LOCKED"] = "TranqRotate: Fenêtre verrouillée",
["WINDOW_UNLOCKED"] = "TranqRotate: Fenêtre déverrouillée",

--- Player names formatting options
["PLAYER_NAME_FORMAT"] = "Format des noms des joueurs",
["PLAYER_NAME_FORMAT_DESC"] = "Le suffixe serveur des joueurs appartement à d'autre serveurs sont masqué par défaut. Si par malchance deux chasseur ont exactement le même nom, vous pouvez ajuster ce paramètre",
["PLAYER_NAME_ONLY_OPTION_LABEL"] = "Nomdujoueur",
["SHORTENED_SUFFIX_OPTION_LABEL"] = "Nomdujoueur-Ser",
["FULL_NAME_OPTION_LABEL"] = "Nomdujoueur-Serveur",

["TEST_MODE_HEADER"] = "Test mode",
["ENABLE_ARCANE_SHOT_TESTING"] = "Activer/désactiver le mode test",
["ENABLE_ARCANE_SHOT_TESTING_DESC"] =
Expand Down Expand Up @@ -103,14 +110,17 @@ local L = {
["BROADCAST_ROTATION_PREFIX"] = "Rotation",
["BROADCAST_BACKUP_PREFIX"] = "Backup",

--- Blind icon tooltip
-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "Ce joueur n'utilise pas TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Ou possède une version obsolète inférieure à 1.6.0",
["TOOLTIP_DISABLE_SETTINGS"] = "(Il est possible de désactiver l'icone et/ou l'infobulle dans les options)",

--- Available update
-- Available update
["UPDATE_AVAILABLE"] = "Une nouvelle version est disponible, faites la mise à jour pour profiter des derniers ajouts",
["BREAKING_UPDATE_AVAILABLE"] = "Une nouvelle version MAJEURE est disponible, vous DEVEZ faire la mise à jour le plus rapidement possible! Votre version pourrait ne pas fonctionner correctement avec celle des utilisateurs disposant de la mise à jour.",

-- Rotation reset
["RESET_UNAUTHORIZED"] = "Vous devez être assistant raid pour réinitialiser la rotation",
}

TranqRotate.L = L
14 changes: 12 additions & 2 deletions locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ local L = {
["WINDOW_LOCKED"] = "TranqRotate: Окно закреплено",
["WINDOW_UNLOCKED"] = "TranqRotate: Окно откреплено",

--- Player names formatting options
["PLAYER_NAME_FORMAT"] = "Player names format",
["PLAYER_NAME_FORMAT_DESC"] = "On connected realms, players from other servers will have a the server suffix hidden by default. If you ever get two hunter with the exact same name, adjust this setting to your needs",
["PLAYER_NAME_ONLY_OPTION_LABEL"] = "Playername",
["SHORTENED_SUFFIX_OPTION_LABEL"] = "Playername-Ser",
["FULL_NAME_OPTION_LABEL"] = "Playername-Server",

["TEST_MODE_HEADER"] = "Тестовый режим",
["ENABLE_ARCANE_SHOT_TESTING"] = "Тестовый режим",
["ENABLE_ARCANE_SHOT_TESTING_DESC"] =
Expand Down Expand Up @@ -103,14 +110,17 @@ local L = {
["BROADCAST_ROTATION_PREFIX"] = "Очередность",
["BROADCAST_BACKUP_PREFIX"] = "Запасные",

--- Blind icon tooltip
-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "Этот игрок не использует TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Или используется версия ниже 1.6.0",
["TOOLTIP_DISABLE_SETTINGS"] = "(Вы можете отключить этот значок и/или эту подсказку в настройках)",

--- Available update
-- Available update
["UPDATE_AVAILABLE"] = "A new TranqRotate version is available, update to get latest features",
["BREAKING_UPDATE_AVAILABLE"] = "A new BREAKING TranqRotate update is available, you MUST update AS SOON AS possible! TranqRotate may not work properly with up-to-date version users.",

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",
}

TranqRotate.L = L
14 changes: 12 additions & 2 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ local L = {
["WINDOW_LOCKED"] = "TranqRotate: 窗口已隐藏",
["WINDOW_UNLOCKED"] = "TranqRotate: 窗口已锁定",

--- Player names formatting options
["PLAYER_NAME_FORMAT"] = "Player names format",
["PLAYER_NAME_FORMAT_DESC"] = "On connected realms, players from other servers will have a the server suffix hidden by default. If you ever get two hunter with the exact same name, adjust this setting to your needs",
["PLAYER_NAME_ONLY_OPTION_LABEL"] = "Playername",
["SHORTENED_SUFFIX_OPTION_LABEL"] = "Playername-Ser",
["FULL_NAME_OPTION_LABEL"] = "Playername-Server",

["TEST_MODE_HEADER"] = "测试模式",
["ENABLE_ARCANE_SHOT_TESTING"] = "切换测试模式",
["ENABLE_ARCANE_SHOT_TESTING_DESC"] =
Expand Down Expand Up @@ -103,14 +110,17 @@ local L = {
["BROADCAST_ROTATION_PREFIX"] = "循环",
["BROADCAST_BACKUP_PREFIX"] = "替补",

--- Blind icon tooltip
-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "此玩家没有使用TranqRotate插件",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "或者运行低于1.6.0的过时版本",
["TOOLTIP_DISABLE_SETTINGS"] = "(您可以在设置中禁用此图标或此工具提示)",

--- Available update
-- Available update
["UPDATE_AVAILABLE"] = "A new TranqRotate version is available, update to get latest features",
["BREAKING_UPDATE_AVAILABLE"] = "A new BREAKING TranqRotate update is available, you MUST update AS SOON AS possible! TranqRotate may not work properly with up-to-date version users.",

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",
}

TranqRotate.L = L
14 changes: 12 additions & 2 deletions locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ local L = {
["WINDOW_LOCKED"] = "TranqRotate: 窗口已隱藏",
["WINDOW_UNLOCKED"] = "TranqRotate: 窗口已鎖定",

--- Player names formatting options
["PLAYER_NAME_FORMAT"] = "Player names format",
["PLAYER_NAME_FORMAT_DESC"] = "On connected realms, players from other servers will have a the server suffix hidden by default. If you ever get two hunter with the exact same name, adjust this setting to your needs",
["PLAYER_NAME_ONLY_OPTION_LABEL"] = "Playername",
["SHORTENED_SUFFIX_OPTION_LABEL"] = "Playername-Ser",
["FULL_NAME_OPTION_LABEL"] = "Playername-Server",

["TEST_MODE_HEADER"] = "測試模式",
["ENABLE_ARCANE_SHOT_TESTING"] = "切換測試模式",
["ENABLE_ARCANE_SHOT_TESTING_DESC"] =
Expand Down Expand Up @@ -103,14 +110,17 @@ local L = {
["BROADCAST_ROTATION_PREFIX"] = "循環",
["BROADCAST_BACKUP_PREFIX"] = "替補",

--- Blind icon tooltip
-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "This player does not use TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Or runs an outdated version below 1.6.0",
["TOOLTIP_DISABLE_SETTINGS"] = "(You can disable this icon and/or this tooltip in the settings)",

--- Available update
-- Available update
["UPDATE_AVAILABLE"] = "A new TranqRotate version is available, update to get latest features",
["BREAKING_UPDATE_AVAILABLE"] = "A new BREAKING TranqRotate update is available, you MUST update AS SOON AS possible! TranqRotate may not work properly with up-to-date version users.",

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",
}

TranqRotate.L = L
42 changes: 39 additions & 3 deletions src/comms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ function TranqRotate.OnCommReceived(prefix, data, channel, sender)
TranqRotate:receiveSyncRequest(prefix, message, channel, sender)
elseif (message.type == TranqRotate.constants.commsTypes.backupRequest) then
TranqRotate:receiveBackupRequest(prefix, message, channel, sender)
elseif (message.type == TranqRotate.constants.commsTypes.reset) then
TranqRotate:receiveResetRequest(prefix, message, channel, sender)
end
end
end
Expand Down Expand Up @@ -90,6 +92,11 @@ function TranqRotate:sendSyncOrder(whisper, name)
['addonVersion'] = TranqRotate.version,
}

local nextHunter = TranqRotate:getHighlightedHunter()
if (nil ~= nextHunter) then
message.nextHunter = nextHunter.GUID
end

if (whisper) then
TranqRotate:sendWhisperAddonMessage(message, name)
else
Expand All @@ -112,7 +119,7 @@ end
function TranqRotate:sendBackupRequest(name)

-- todo: translation
TranqRotate:printPrefixedMessage('Sending backup request to ' .. name)
TranqRotate:printPrefixedMessage('Sending backup request to ' .. TranqRotate:formatPlayerName(name))

local message = {
['type'] = TranqRotate.constants.commsTypes.backupRequest,
Expand All @@ -121,6 +128,16 @@ function TranqRotate:sendBackupRequest(name)
TranqRotate:sendWhisperAddonMessage(message, name)
end

-- Broadcast a reset of the rotation to other players
function TranqRotate:sendResetBroadcast()

local message = {
['type'] = TranqRotate.constants.commsTypes.reset,
}

TranqRotate:sendRaidAddonMessage(message)
end

-----------------------------------------------------------------------------------------------------------------------
-- INPUT
-----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -154,8 +171,13 @@ function TranqRotate:receiveSyncOrder(prefix, message, channel, sender)
TranqRotate.syncLastSender = sender

-- todo : translation
TranqRotate:printPrefixedMessage('Received new rotation configuration from ' .. sender)
TranqRotate:printPrefixedMessage('Received new rotation configuration from ' .. TranqRotate:formatPlayerName(sender))
TranqRotate:applyRotationConfiguration(message.rotation)

local nextHunter = TranqRotate:getHunter(message.nextHunter)
if (nil ~= nextHunter) then
TranqRotate:setNextTranq(nextHunter)
end
end

TranqRotate:updatePlayerAddonVersion(sender, message.addonVersion)
Expand All @@ -170,6 +192,20 @@ end
-- Received a backup request
function TranqRotate:receiveBackupRequest(prefix, message, channel, sender)
-- todo: translations
TranqRotate:printPrefixedMessage(sender .. ' asked for backup !')
TranqRotate:printPrefixedMessage(TranqRotate:formatPlayerName(sender) .. ' asked for backup !')
TranqRotate:throwTranqAlert()
end

-- Received a rotation reset request
function TranqRotate:receiveResetRequest(prefix, message, channel, sender)

if (not TranqRotate:isUnitAllowedToManageRotation(sender)) then
return
end

if (TranqRotate.lastRotationReset < GetTime() - 2) then
-- todo: translations
TranqRotate:printPrefixedMessage(TranqRotate:formatPlayerName(sender) .. ' has reset the rotation.')
TranqRotate:resetRotation()
end
end
7 changes: 7 additions & 0 deletions src/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TranqRotate.constants = {
['syncOrder'] = 'sync-order',
['syncRequest'] = 'sync-request',
['backupRequest'] = 'backup-request',
['reset'] = 'reset',
},

['printPrefix'] = 'TranqRotate - ',
Expand Down Expand Up @@ -79,4 +80,10 @@ TranqRotate.constants = {
23311, -- Chromaggus Time lapse
29685, -- Gluth fear
},

["playerNameFormats"] = {
["SHORT"] = "SHORT",
["PLAYER_NAME_ONLY"] = "PLAYER_NAME",
["FULL_NAME"] = "FULL_NAME",
}
}
1 change: 1 addition & 0 deletions src/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function TranqRotate:LoadDefaults()
timedBackupAlertDelay = 3,
showIconOnHunterWithoutTranqRotate = true,
showBlindIconTooltip = true,
playerNameFormatting = TranqRotate.constants.playerNameFormats.PLAYER_NAME_ONLY,
},
}
end
2 changes: 1 addition & 1 deletion src/dragdrop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,5 @@ end

-- Update drag and drop status to match player status
function TranqRotate:updateDragAndDrop()
TranqRotate:toggleListSorting(TranqRotate:isPlayerAllowedToSortHunterList())
TranqRotate:toggleListSorting(TranqRotate:isPlayerAllowedToManageRotation())
end
5 changes: 4 additions & 1 deletion src/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ function TranqRotate:COMBAT_LOG_EVENT_UNFILTERED()
elseif (event == "SPELL_AURA_REMOVED" and TranqRotate:isBossFrenzy(spellName, sourceGUID)) then
TranqRotate.frenzy = false
elseif (event == "UNIT_DIED" and TranqRotate:isTranqableBoss(destGUID)) then
TranqRotate:resetRotation()
if (TranqRotate:isPlayerAllowedToManageRotation()) then
TranqRotate:resetRotation()
TranqRotate:sendResetBroadcast()
end
TranqRotate.mainFrame.frenzyFrame:Hide()
end
end
Expand Down
10 changes: 3 additions & 7 deletions src/frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ function TranqRotate:createButtons()
},
{
['texture'] = 'Interface/Buttons/UI-RefreshButton',
['callback'] = function()
TranqRotate:updateRaidStatus()
TranqRotate:resetRotation()
TranqRotate:sendSyncOrderRequest()
end
['callback'] = TranqRotate.handleResetButton
},
{
['texture'] = 'Interface/Buttons/UI-GuildButton-MOTD-Up',
Expand Down Expand Up @@ -153,13 +149,13 @@ function TranqRotate:createHunterFrame(hunter, parentFrame)
hunter.frame.text = hunter.frame:CreateFontString(nil, "ARTWORK")
hunter.frame.text:SetFont(TranqRotate:getPlayerNameFont(), 12)
hunter.frame.text:SetPoint("LEFT",5,0)
hunter.frame.text:SetText(strsplit("-", hunter.name))
hunter.frame.text:SetText(TranqRotate:formatPlayerName(hunter.name))

TranqRotate:createCooldownFrame(hunter)
TranqRotate:createBlindIconFrame(hunter)
TranqRotate:configureHunterFrameDrag(hunter)

TranqRotate:toggleHunterFrameDragging(hunter, TranqRotate:isPlayerAllowedToSortHunterList())
TranqRotate:toggleHunterFrameDragging(hunter, TranqRotate:isPlayerAllowedToManageRotation())
end

-- Create the cooldown frame
Expand Down
1 change: 1 addition & 0 deletions src/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function TranqRotate:drawList(hunterList, parentFrame)
TranqRotate:createHunterFrame(hunter, parentFrame)
else
hunter.frame:SetParent(parentFrame)
hunter.frame.text:SetText(TranqRotate:formatPlayerName(hunter.name))
end

hunter.frame:ClearAllPoints()
Expand Down
Loading

0 comments on commit 7ff04c9

Please sign in to comment.