Skip to content

Commit

Permalink
Classic TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
Resike committed Jul 1, 2021
1 parent 0fd6741 commit e465fe1
Show file tree
Hide file tree
Showing 26 changed files with 84 additions and 65 deletions.
5 changes: 5 additions & 0 deletions ZPerl/!Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**6.2.4**
* Fixed 10y range finder in BCC.
* Party pet related fixes.
* LibHealComm workaround for non-english clients.

**6.2.3**
* Totem frame fix (again).
* Bump LibHealComm.
Expand Down
37 changes: 21 additions & 16 deletions ZPerl/Libs/LibHealComm-4.0/LibHealComm-4.0.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then return end

local major = "LibHealComm-4.0"
local minor = 93
local minor = 94
assert(LibStub, format("%s requires LibStub.", major))

local HealComm = LibStub:NewLibrary(major, minor)
Expand Down Expand Up @@ -756,8 +756,12 @@ end

local CalculateHealing, GetHealTargets, AuraHandler, CalculateHotHealing, ResetChargeData, LoadClassData

local function getBaseHealAmount(spellData, spellName, spellRank)
spellData = spellData[spellName]
local function getBaseHealAmount(spellData, spellName, spellID, spellRank)
if spellID == 37563 then
spellData = spellData["37563"]
else
spellData = spellData[spellName]
end
local average = spellData.averages[spellRank]
if type(average) == "number" then
return average
Expand Down Expand Up @@ -856,7 +860,7 @@ if( playerClass == "DRUID" ) then
-- Calculate hot heals
CalculateHotHealing = function(guid, spellID)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local healAmount = getBaseHealAmount(hotData, spellName, spellRank)
local healAmount = getBaseHealAmount(hotData, spellName, spellID, spellRank)
local spellPower = GetSpellBonusHealing()
local healModifier, spModifier = playerHealModifier, 1
local bombAmount, totalTicks
Expand Down Expand Up @@ -941,7 +945,7 @@ if( playerClass == "DRUID" ) then
-- Calcualte direct and channeled heals
CalculateHealing = function(guid, spellID)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local healAmount = getBaseHealAmount(spellData, spellName, spellRank)
local healAmount = getBaseHealAmount(spellData, spellName, spellID, spellRank)
local spellPower = GetSpellBonusHealing()
local healModifier, spModifier = playerHealModifier, 1

Expand Down Expand Up @@ -1072,7 +1076,7 @@ if( playerClass == "PALADIN" ) then

CalculateHealing = function(guid, spellID, unit)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local healAmount = getBaseHealAmount(spellData, spellName, spellRank)
local healAmount = getBaseHealAmount(spellData, spellName, spellID, spellRank)
local spellPower = GetSpellBonusHealing()
local healModifier, spModifier = playerHealModifier, 1

Expand Down Expand Up @@ -1133,7 +1137,7 @@ if( playerClass == "PRIEST" ) then
local CureDisease = GetSpellInfo(528)
local BindingHeal = GetSpellInfo(32546) or "Binding Heal"
local EmpoweredHealing = GetSpellInfo(33158) or "Empowered Healing"
local Renewal = GetSpellInfo(37563) or "Renewal" -- T4 bonus
local Renewal = GetSpellInfo(37563) and "37563" -- T4 bonus

hotData[Renew] = {coeff = 1, interval = 3, ticks = 5, levels = {8, 14, 20, 26, 32, 38, 44, 50, 56, 60, 65, 70}, averages = {
45, 100, 175, 245, 315, 400, 510, 650, 810, 970, 1010, 1110 }}
Expand Down Expand Up @@ -1213,7 +1217,7 @@ if( playerClass == "PRIEST" ) then

CalculateHotHealing = function(guid, spellID)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local healAmount = getBaseHealAmount(hotData, spellName, spellRank)
local healAmount = getBaseHealAmount(hotData, spellName, spellID, spellRank)
local spellPower = GetSpellBonusHealing()
local healModifier, spModifier = playerHealModifier, 1
local totalTicks
Expand Down Expand Up @@ -1255,7 +1259,7 @@ if( playerClass == "PRIEST" ) then
-- If only every other class was as easy as Paladins
CalculateHealing = function(guid, spellID)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local healAmount = getBaseHealAmount(spellData, spellName, spellRank)
local healAmount = getBaseHealAmount(spellData, spellName, spellID, spellRank)
local spellPower = GetSpellBonusHealing()
local healModifier, spModifier = playerHealModifier, 1

Expand Down Expand Up @@ -1355,7 +1359,7 @@ if( playerClass == "SHAMAN" ) then
-- If only every other class was as easy as Paladins
CalculateHealing = function(guid, spellID, unit)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local healAmount = getBaseHealAmount(spellData, spellName, spellRank)
local healAmount = getBaseHealAmount(spellData, spellName, spellID, spellRank)
local spellPower = GetSpellBonusHealing()
local healModifier, spModifier = playerHealModifier, 1

Expand Down Expand Up @@ -1424,11 +1428,11 @@ if( playerClass == "HUNTER" ) then

CalculateHealing = function(guid, spellID)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local amount = getBaseHealAmount(spellData, spellName, spellRank)
local healAmount = getBaseHealAmount(spellData, spellName, spellID, spellRank)

if( equippedSetCache["Giantstalker"] >= 3 ) then amount = amount * 1.1 end
if( equippedSetCache["Giantstalker"] >= 3 ) then healAmount = healAmount * 1.1 end

return CHANNEL_HEALS, ceil(amount / spellData[spellName].ticks), spellData[spellName].ticks, spellData[spellName].interval
return CHANNEL_HEALS, ceil(healAmount / spellData[spellName].ticks), spellData[spellName].ticks, spellData[spellName].interval
end
end
end
Expand All @@ -1450,11 +1454,11 @@ if( playerClass == "WARLOCK" ) then

CalculateHealing = function(guid, spellID)
local spellName, spellRank = GetSpellInfo(spellID), SpellIDToRank[spellID]
local amount = getBaseHealAmount(spellData, spellName, spellRank)
local healAmount = getBaseHealAmount(spellData, spellName, spellID, spellRank)

amount = amount * (1 + talentData[ImpHealthFunnel].current)
healAmount = healAmount * (1 + talentData[ImpHealthFunnel].current)

return CHANNEL_HEALS, ceil(amount / spellData[spellName].ticks), spellData[spellName].ticks, spellData[spellName].interval
return CHANNEL_HEALS, ceil(healAmount / spellData[spellName].ticks), spellData[spellName].ticks, spellData[spellName].interval
end
end
end
Expand Down Expand Up @@ -1539,6 +1543,7 @@ HealComm.healingModifiers = HealComm.healingModifiers or {
[28440] = 0.25, -- Veil of Shadow
[13583] = 0.50, -- Curse of the Deadwood
[23230] = 0.50, -- Blood Fury
[31977] = 1.50, -- Curse of Infinity
}

HealComm.healingStackMods = HealComm.healingStackMods or {
Expand Down
45 changes: 27 additions & 18 deletions ZPerl/ZPerl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,15 @@ XPerl_AnchorList = {"TOP", "LEFT", "BOTTOM", "RIGHT"}
-- FindABandage()
local function FindABandage()
local bandages = {
[173192] = true, -- Shrouded Cloth Bandage
[173191] = true, -- Heavy Shrouded Cloth Bandage
[158382] = true, -- Deep Sea Bandage
[158381] = true, -- Tidespray Linen Bandage
[142332] = true, -- Feathered Luffa
[136653] = true, -- Silvery Salve
[133942] = true, -- Silkweave Splint
[133940] = true, -- Silkweave Bandage
[115497] = true, -- Ashran Bandage
[111603] = true, -- Antiseptic Bandage
[72986] = true, -- Heavy Windwool Bandage
[72985] = true, -- Windwool Bandage
Expand Down Expand Up @@ -430,32 +439,32 @@ local function DoRangeCheck(unit, opt)
elseif (opt.interact == 3) then -- 10y
if UnitCanAssist("player", unit) then
-- Sparrowhawk Net (10y)
range = IsItemInRange(not IsClassic and 32321 or 21866 --[[Alterac Ram Collar DND]], unit)
range = IsItemInRange(not IsVanillaClassic and 32321 or 17689 --[[Stormpike Training Collar]], unit)
if range == nil then
-- Fallback (8y) (Classic = 10 yards)
range = CheckInteractDistance(unit, not IsClassic and 2 or 1)
-- Fallback (8y) (BCC = 8y) (Vanilla = 10 yards)
range = CheckInteractDistance(unit, IsVanillaClassic and 1 or 2)
end
else
-- Sparrowhawk Net (10y)
range = IsItemInRange(not IsClassic and 32321 or 9618 --[[Wildkin Muisek Vessel]], unit)
range = IsItemInRange(not IsVanillaClassic and 32321 or 9618 --[[Wildkin Muisek Vessel]], unit)
if range == nil then
-- Fallback (8y) (Classic = 10 yards)
range = CheckInteractDistance(unit, not IsClassic and 2 or 1)
-- Fallback (8y) (BCC = 8y) (Vanilla = 10 yards)
range = CheckInteractDistance(unit, IsVanillaClassic and 1 or 2)
end
end
elseif (opt.interact == 2) then -- 20y
if UnitCanAssist("player", unit) then
-- Mistletoe (20y)
range = IsItemInRange(21519, unit)
if range == nil then
-- Fallback (28y) (Classic = 21 yards)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
else
-- Gnomish Death Ray (20y)
range = IsItemInRange(not IsClassic and 10645 or 1191 --[[Bag of Marbles]], unit)
if range == nil then
-- Fallback (28y) (Classic = 21 yards)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
end
Expand All @@ -464,39 +473,39 @@ local function DoRangeCheck(unit, opt)
-- Handful of Snowflakes (30y)
range = IsItemInRange(not IsClassic and 34191 or 1180 --[[Scroll of Stamina]], unit)
if range == nil then
-- Fallback (28y) (Classic = 21 yards)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
else
-- Handful of Snowflakes (30y)
range = IsItemInRange(not IsClassic and 34191 or 835 --[[Large Rope Net]], unit)
if range == nil then
-- Fallback (28y) (Classic = 21 yards)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
end
end
-- CheckInteractDistance
-- 1 = Inspect = 28 yards (Classic = 10 yards)
-- 2 = Trade = 8 yards (Classic = 11 yards)
-- 3 = Duel = 7 yards (Classic = 10 yards)
-- 4 = Follow = 28 yards (Classic = 21 yards)
-- 5 = ??? = 7 yards (Classic = 10 yards)
-- 1 = Inspect = 28 yards (BCC = 28y) (Vanilla = 10 yards)
-- 2 = Trade = 8 yards (BCC = 8y) (Vanilla = 11 yards)
-- 3 = Duel = 7 yards (BCC = 7y) (Vanilla = 10 yards)
-- 4 = Follow = 28 yards (BCC = 28y) (Vanilla = 21 yards)
-- 5 = ??? = 7 yards (BCC = 7y) (Vanilla = 10 yards)
elseif (opt.spell) then
if UnitCanAssist("player", unit) then
range = IsSpellInRange(opt.spell, unit)
if range == nil then
-- Fallback (28y)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
elseif UnitCanAttack("player", unit) then
range = IsSpellInRange(opt.spell, unit)
if range == nil then
-- Fallback (28y)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
else
-- Fallback (28y)
-- Fallback (28y) (BCC = 28y) (Vanilla = 21 yards)
range = CheckInteractDistance(unit, 4)
end
elseif (opt.item and UnitCanAssist("player", unit)) then
Expand Down
4 changes: 2 additions & 2 deletions ZPerl/ZPerl.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 90005
## Version: 6.2.3
## Interface: 11307
## Version: 6.2.4
## Author: Resike
## Title: Z-Perl UnitFrames
## Title-itIT: Z-Perl UnitFrames
Expand Down
2 changes: 0 additions & 2 deletions ZPerl/localization.frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ if (GetLocale() == "frFR") then
XPERL_KEY_NOTICE_RAID_DEBUFFS = "Montrer les debuffs du raid"
XPERL_KEY_NOTICE_RAID_NOBUFFS = "Ne pas montrer les debuffs du raid"

XPerl_DefaultRangeSpells.ANY = {item = "Bandage \195\169pais en \195\169toffe runique"}

XPERL_RAID_TOOLTIP_WITHBUFF = "Avec buffs: (%s)"
XPERL_RAID_TOOLTIP_WITHOUTBUFF = "Sans buffs: (%s)"
XPERL_RAID_TOOLTIP_BUFFEXPIRING = "%s's %s expires dans %s" -- Name, buff name, time to expire
Expand Down
2 changes: 0 additions & 2 deletions ZPerl/localization.koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,5 @@ if (GetLocale() == "koKR") then
XPERL_RAID_TOOLTIP_WITHOUTBUFF = "버프없음: (%s)"
XPERL_RAID_TOOLTIP_BUFFEXPIRING = "%s의 %s %s 이내 사라짐" -- Name, buff name, time to expire

XPerl_DefaultRangeSpells.ANY = {item = "두꺼운 황천매듭 붕대"}

XPERL_NEW_VERSION_DETECTED = "새로운 버전이 발견되었습니다."
end
12 changes: 6 additions & 6 deletions ZPerl/localization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,36 +237,36 @@ end
-- Default spells for range checking in the healer visual out-of-range cues.
if IsClassic then
XPerl_DefaultRangeSpells = {
DRUID = {spell = GetSpellInfo(774)}, --Rejuvenation
DRUID = {spell = GetSpellInfo(774)}, -- Rejuvenation
PALADIN = {spell = GetSpellInfo(19750)}, -- Flash of Light
PRIEST = {spell = GetSpellInfo(2061)}, -- Flash Heal
SHAMAN = {spell = GetSpellInfo(8004)}, -- Healing Surge
MAGE = {spell = GetSpellInfo(475)}, -- Remove Lesser Curse
ROGUE = {spell = GetSpellInfo(57934)}, -- Trick of the Trade
WARLOCK = {spell = GetSpellInfo(5697)}, -- Unending Breath
ANY = {item = GetItemInfo(111603)} -- Antiseptic Bandage
ANY = {item = GetItemInfo(1251)} -- Linen Bandage
}
elseif IsBCClassic then
XPerl_DefaultRangeSpells = {
DRUID = {spell = GetSpellInfo(774)}, --Rejuvenation
DRUID = {spell = GetSpellInfo(774)}, -- Rejuvenation
PALADIN = {spell = GetSpellInfo(19750)}, -- Flash of Light
PRIEST = {spell = GetSpellInfo(2061)}, -- Flash Heal
SHAMAN = {spell = GetSpellInfo(8004)}, -- Healing Surge
MAGE = {spell = GetSpellInfo(475)}, -- Remove Lesser Curse
ROGUE = {spell = GetSpellInfo(57934)}, -- Trick of the Trade
WARLOCK = {spell = GetSpellInfo(5697)}, -- Unending Breath
ANY = {item = GetItemInfo(111603)} -- Antiseptic Bandage
ANY = {item = GetItemInfo(1251)} -- Linen Bandage
}
else
XPerl_DefaultRangeSpells = {
DRUID = {spell = GetSpellInfo(774)}, --Rejuvenation
DRUID = {spell = GetSpellInfo(774)}, -- Rejuvenation
PALADIN = {spell = GetSpellInfo(19750)}, -- Flash of Light
PRIEST = {spell = GetSpellInfo(2061)}, -- Flash Heal
SHAMAN = {spell = GetSpellInfo(8004)}, -- Healing Surge
--MAGE = {spell = GetSpellInfo(475)}, -- Remove Lesser Curse
ROGUE = {spell = GetSpellInfo(57934)}, -- Trick of the Trade
WARLOCK = {spell = GetSpellInfo(5697)}, -- Unending Breath
ANY = {item = GetItemInfo(111603)} -- Antiseptic Bandage
ANY = {item = GetItemInfo(173191)} -- Heavy Shrouded Cloth Bandage
}
end

Expand Down
2 changes: 0 additions & 2 deletions ZPerl/localization.zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ if (GetLocale() == "zhCN") then
XPERL_CONFIG_LIST = "配置列表:"
XPERL_CONFIG_CURRENT = " (当前)"

XPerl_DefaultRangeSpells.ANY = {item = "厚灵纹布绷带"}

XPERL_RAID_TOOLTIP_WITHBUFF = "有该buff的成员: (%s)"
XPERL_RAID_TOOLTIP_WITHOUTBUFF = "无该buff的成员: (%s)"
XPERL_RAID_TOOLTIP_BUFFEXPIRING = "%s的%s将在%s后过期" -- Name, buff name, time to expire
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_ArcaneBar/ZPerl_ArcaneBar.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90005
## Interface: 11307
## Author: Resike
## Title: Z-Perl |cffeda55fArcane Bars|r
## Title-itIT: Z-Perl |cffeda55fBarre Arcane|r
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_CustomHighlight/ZPerl_CustomHighlight.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90005
## Interface: 11307
## Author: Resike
## Title: Z-Perl |cffeda55fCustom Highlight|r
## Title-itIT: Z-Perl |cffeda55fEvidenziazioni Personalizzate|r
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_Options/ZPerl_Options.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90005
## Interface: 11307
## Author: Resike
## Title: Z-Perl |cffeda55fOptions|r |cFF40FF40(LoadOnDemand)|r
## Title-itIT: Z-Perl |cffeda55fOpzioni|r |cFF40FF40(Caricabile su richiesta)|r
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_Party/ZPerl_Party.lua
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ local function XPerl_Party_UpdatePVP(self)
end

-- XPerl_Party_UpdateCombat
function XPerl_Party_UpdateCombat(self)
local function XPerl_Party_UpdateCombat(self)
local partyid = self.partyid
if (UnitIsVisible(partyid)) then
if (UnitAffectingCombat(partyid)) then
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_Party/ZPerl_Party.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90005
## Interface: 11307
## Author: Resike
## Title: Z-Perl |cffeda55fParty|r
## Title-itIT: Z-Perl |cffeda55fGruppo|r
Expand Down
6 changes: 6 additions & 0 deletions ZPerl_PartyPet/ZPerl_PartyPet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function XPerl_Party_Pet_OnLoadEvents(self)
"UNIT_FLAGS",
IsClassic and "UNIT_HEALTH_FREQUENT" or "UNIT_HEALTH",
"UNIT_MAXHEALTH",
"UNIT_PET",
"PLAYER_ENTERING_WORLD",
"PET_BATTLE_OPENING_START",
"PET_BATTLE_CLOSE",
Expand Down Expand Up @@ -73,6 +74,9 @@ function XPerl_Party_Pet_UpdateGUIDs()
--del(guids)
--guids = new()
guids = { }
if pconf.showPlayer then
guids[UnitGUID("player")] = PartyPetFrames["pet"]
end
for i = 1, GetNumSubgroupMembers() do
local id = "partypet"..i
if (UnitExists(id)) then
Expand Down Expand Up @@ -512,6 +516,7 @@ function XPerl_Party_Pet_OnEvent(self, event, unit, ...)
local pet = string.gsub(unit, "(%a+)(%d+)", "%1pet%2")
local f = PartyPetFrames[pet]
if f then
local owner
local unitID = f.partyid
if unitID == "pet" or unitID == "playerpet" then
owner = "player"
Expand Down Expand Up @@ -575,6 +580,7 @@ end
function XPerl_Party_Pet_Events:UNIT_NAME_UPDATE()
XPerl_Party_Pet_UpdateGUIDs()
XPerl_Party_Pet_UpdateName(self)
XPerl_Party_Pet_UpdateHealth(self)
end

-- UNIT_FACTION
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_PartyPet/ZPerl_PartyPet.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90005
## Interface: 11307
## Author: Resike
## Title: Z-Perl |cffeda55fParty Pet|r
## Title-itIT: Z-Perl |cffeda55fFamigli Gruppo|r
Expand Down
2 changes: 1 addition & 1 deletion ZPerl_PartyPet/ZPerl_PartyPet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
</Anchors>
</Button>

<Frame name="XPerl_Party_Pet_EventFrame" inherits="XPerlBackdropTemplate" hidden="true">
<Frame name="XPerl_Party_Pet_EventFrame">
<Scripts>
<OnLoad function="XPerl_Party_Pet_OnLoadEvents"/>
</Scripts>
Expand Down
Loading

0 comments on commit e465fe1

Please sign in to comment.