Mercurial > wow > buffalo2
diff Modules/GuildInfo.lua @ 133:86621c60512b v7.3.2-20171222
- Fixed AP calc tooltip appearing while hidden
- Fixed PaperDoll relic tooltips missing nether crucible info
author | Nenue |
---|---|
date | Fri, 22 Dec 2017 20:36:40 -0500 |
parents | 15a7f27b11e6 |
children |
line wrap: on
line diff
--- a/Modules/GuildInfo.lua Mon Nov 20 12:02:18 2017 -0500 +++ b/Modules/GuildInfo.lua Fri Dec 22 20:36:40 2017 -0500 @@ -18,7 +18,7 @@ --self:RegisterEvent('GUILD_ROSTER_UPDATE') --self:RegisterEvent('GUILD_TRADESKILL_UPDATE') - self:RegisterEvent('LFG_LIST_SEARCH_RESULT_UPDATED') + --self:RegisterEvent('LFG_LIST_SEARCH_RESULT_UPDATED') --self:RegisterEvent('LFG_LIST_SEARCH_RESULTS_RECEIVED') --self:RegisterEvent('LFG_LIST_AVAILABILITY_UPDATE') --self:RegisterEvent('LFG_LIST_LOCK_INFO_RECEIVED') @@ -74,12 +74,25 @@ -- cheevos to link local overlaps = { [11781] = 11875, - - + [12002] = 12111, } local cheevos = { - -- Mythic Prog: Tomb + -- Mythic Prog { + -- Antorus + 12002, -- argus + 12001, -- aggramar + 12000, -- coven + 11999, -- barry + 11998, -- kin'garoth + 11997, -- imonar + 11996, -- eonar + 11995, -- portal keeper + 11994, -- high command + 11993, -- doggos + 11992, -- worldbreaker + + -- Tomb of Sargeras 11781, -- kj 11780, -- avatar 11779, -- maiden @@ -90,8 +103,10 @@ 11774, -- di, 11773, -- goroth }, - -- Completion: Tomb + -- Completion { + 12111, -- CE Argus, + 12110, -- AotC Argus, 11875, -- CE KJ 11874, -- AotC KJ 11790 -- Deceiver's Fall, @@ -105,6 +120,7 @@ } } +local invasion = {} local cheev = {} function cheev:OnClick() @@ -119,6 +135,15 @@ end end +function invasion:OnClick() + +end + +function module:UpdateInvasionButtons() + +end + +local listed = {} function module:UpdateAchievementLinks() print('UpdateAchievementLinks()') @@ -134,6 +159,13 @@ for _, id in ipairs(group) do local _, name, points, completed, month, day, year, description, flags, icon = GetAchievementInfo(id) if completed then + + -- if the highest mythic kill + if listed[overlaps[id]] then + break + end + + index = index + 1 --print(index) local block =self.blocks[index] @@ -160,11 +192,36 @@ --print(index, name, icon) lastBlock = block + listed[id] = true break; end end end +--[[ + local areaPOIs = C_WorldMap.GetAreaPOIForMap(GetCurrentMapAreaID(), 1); + if areaPOIs then + + + for i, areaPoiID in ipairs(areaPOIs) do + local poiInfo = C_WorldMap.GetAreaPOIInfo(GetCurrentMapAreaID(), areaPoiID, 1); + + index = index + 1 + --print(index) + local block =self.blocks[index] + if not block then + block = CreateFrame('Button', 'VeneerRosterKunBlock'..index, self, 'VeneerRosterKunBlock') + block:SetScript('OnClick', invasion.OnClick) + block:SetID(index) + self.blocks[index] = block + end + + + + end + end + --]] + --print(index, #self.blocks) if index < #self.blocks then for i = index+1, #self.blocks do @@ -188,6 +245,7 @@ self:UpdateAchievementLinks() end + end function module:SetupGuildUI() self:UnregisterEvent('ADDON_LOADED') @@ -203,3 +261,143 @@ elseif event == 'LFG_LIST_SEARCH_RESULT_UPDATED' then end end + + +VeneerPetBattleActionMixin = {} +VeneerPetBattleInfoMixin = {} +local pb = VeneerPetBattleInfoMixin +local action = VeneerPetBattleActionMixin + + +function pb:OnShow() + self:ClearAllPoints() + self:SetPoint('TOPLEFT', PetBattleFrame.EnemyBuffFrame, 'BOTTOMLEFT', 0, -12) + self:RegisterEvent('PET_BATTLE_PET_ROUND_PLAYBACK_COMPLETE') + self:RegisterEvent('PET_BATTLE_ACTION_SELECTED') + self:RegisterEvent('PET_BATTLE_TURN_STARTED') + print('pet on show') + self:Refresh() +end + +function pb:OnHide() + print('pet on hide') + self:UnregisterAllEvents() +end + +function pb:OnEvent(event) + print('pb event|cFFFF8800', event) + self:Refresh() +end + +function pb:Refresh() + local myPetSlot = C_PetBattles.GetActivePet(1) + local myPetType = C_PetBattles.GetPetType(1, myPetSlot) + + local index = 0 + local nonActiveIndex = 0 + local lastFrame, lastNonActive + for petSlot = 1, C_PetBattles.GetNumPets(2) do + + for abilitySlot = 1,3 do + local _, name, texture, cooldown, tooltip,_, abilityType, noStrongWeakHints = C_PetBattles.GetAbilityInfo(2, petSlot, abilitySlot) + local petHealth = C_PetBattles.GetHealth(2, petSlot) + + if petHealth >= 1 then + local isUsable, currentCooldown, currentLockdown = C_PetBattles.GetAbilityState(2, petSlot, abilitySlot); + --print(index, petSlot, abilitySlot, name, currentCooldown, currentLockdown, cooldown, petHealth) + + index = index + 1 + local frame = self.Abilities[index] + + frame.ownerID = 2 + frame.petIndex = petSlot + frame.abIndex = abilitySlot + frame.tooltip = tooltip + frame.Name:SetText(name) + frame.Icon:SetTexture(texture) + frame.TypeIcon:SetTexture("Interface\\PetBattles\\PetIcon-"..PET_TYPE_SUFFIX[abilityType]) + + + for i = 1,C_PetBattles.GetNumPets(1) do + local myPetType = C_PetBattles.GetPetType(1, i) + if not (myPetType or abilityType) then + frame.BetterIcon[i]:Hide(); + else + local modifier = C_PetBattles.GetAttackModifier(abilityType, myPetType) + if ( noStrongWeakHints or modifier == 1 ) then + frame.BetterIcon[i]:Hide(); + elseif (modifier > 1) then + frame.BetterIcon[i]:SetTexture("Interface\\PetBattles\\BattleBar-AbilityBadge-Strong"); + frame.BetterIcon[i]:Show(); + elseif (modifier < 1) then + frame.BetterIcon[i]:SetTexture("Interface\\PetBattles\\BattleBar-AbilityBadge-Weak"); + frame.BetterIcon[i]:Show(); + end + + end + end + + + if cooldown >= 1 then + frame.Border2:Show() + else + + frame.Border2:Hide() + end + + + currentCooldown = (currentCooldown >= 1) and currentCooldown or 0 + if petHealth == 0 then + frame.Cooldown:SetText(nil) + frame.Cooldown:SetTextColor(1,0,0) + else + if currentLockdown >= 1 and currentLockdown > currentCooldown then + frame.Cooldown:SetTextColor(1,0,0) + else + frame.Cooldown:SetTextColor(1,1,1) + end + frame.Cooldown:SetText((currentCooldown >= 1) and currentCooldown or nil) + end + + frame:ClearAllPoints() + if petSlot == C_PetBattles.GetActivePet(2) then + frame:SetSize(48,48) + frame.Border2:SetSize(72,72) + frame.Icon:SetDesaturated(false) + frame.Name:SetTextColor(1,1,0) + if lastFrame then + frame:SetPoint('TOPLEFT', lastFrame, 'BOTTOMLEFT', 0, -4) + else + frame:SetPoint('TOPLEFT', self, 'TOPLEFT') + end + lastFrame = frame + else + frame:SetSize(24,24) + frame.Border2:SetSize(36,36) + frame.Name:SetTextColor(0.5,0.5,0.5) + frame.Icon:SetDesaturated(true) + if lastNonActive then + frame:SetPoint('TOPLEFT', lastNonActive, 'BOTTOMLEFT', 0, -2) + else + frame:SetPoint('TOPLEFT', self, 'TOPLEFT', 128, 0) + end + lastNonActive = frame + end + frame:Show() + end + end + end + + for i = index + 1, #self.Abilities do + self.Abilities[i]:Hide() + end +end + +function action:OnEnter() + PetBattleAbilityTooltip_SetAbility(self.ownerID, self.petIndex, self.abIndex); + PetBattleAbilityTooltip_Show("TOPRIGHT", self:GetParent(), "TOPLEFT", -5, 0, self.additionalText); +end + +function action:OnLeave() + PetBattlePrimaryAbilityTooltip:Hide(); +end \ No newline at end of file