dandruff / xCT

A light weight scrolling combat text implementation.
53 stars 22 forks source link

Update for SL Pre-patch? #165

Closed NicTerrio closed 3 years ago

NicTerrio commented 3 years ago

Hiya! Any word on when/if this will be updated for SL Pre-patch?

BourgeoisM commented 3 years ago

Do you have any troubles using xct+ on pre-patch ??? i don't have troubles with the 4.5.0 personally..... I reverted changes that i had made to it because it was working :)

erendur81 commented 3 years ago

I have issues when open the configuration and try to move the frames. There are no frames visible and I can not leave the "move frames" mode. The Messagebox stays open.

All the other things are working as before just this part fails for me.

BourgeoisM commented 3 years ago

Okai i'll see that when i'll be back home

erendur81 commented 3 years ago

Thank you! Here some more information maybe this helps.

Go into "move frames" mode

1x xCT+\modules\frames.lua:756: attempt to call method 'SetBackdrop' (a nil value)
[string "@xCT+\modules\frames.lua"]:756: in function `StartConfigMode'
[string "@xCT+\modules\frames.lua"]:946: in function <xCT+\modules\frames.lua:926>
[string "=[C]"]: ?
[string "@AddOnSkins\Libs\Ace3\AceConfig-3.0-3\AceConfigDialog-3.0\AceConfigDialog-3.0-79.lua"]:51: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:49>
[string "@AddOnSkins\Libs\Ace3\AceConfig-3.0-3\AceConfigDialog-3.0\AceConfigDialog-3.0-79.lua"]:843: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:664>
[string "=[C]"]: ?
[string "@AddOnSkins\Libs\Ace3\AceGUI-3.0\AceGUI-3.0-41.lua"]:72: in function <...ddOns\AddOnSkins\Libs\Ace3\AceGUI-3.0\AceGUI-3.0.lua:70>
[string "@AddOnSkins\Libs\Ace3\AceGUI-3.0\AceGUI-3.0-41.lua"]:306: in function `Fire'
[string "@AddOnSkins\Libs\Ace3\AceGUI-3.0-41\widgets\AceGUIWidget-Button.lua"]:22: in function <...Libs\Ace3\AceGUI-3.0\widgets\AceGUIWidget-Button.lua:19>

Try to leave "move frames" mode:

1x xCT+\modules\frames.lua:862: attempt to call method 'SetBackdrop' (a nil value)
[string "@xCT+\modules\frames.lua"]:862: in function `EndConfigMode'
[string "@xCT+\modules\frames.lua"]:1200: in function `OnCancel'
[string "@FrameXML\StaticPopup.lua"]:5162: in function `StaticPopup_OnClick'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>

Locals:
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 general = <table> {
 }
 power = <table> {
 }
 healing = <table> {
 }
 outgoing = <table> {
 }
 critical = <table> {
 }
 procs = <table> {
 }
 loot = <table> {
 }
 class = <table> {
 }
 damage = <table> {
 }
}
(for control) = "general"
framename = "general"
settings = <table> {
 showCombatState = true
 showLowManaHealth = true
 megaDamage = true
 iconsSize = 16
 iconsEnabled = true
 showDispells = true
 enableFontShadow = true
 secondaryFrame = 0
 fontOutline = "2OUTLINE"
 fontShadowOffsetY = -2
 showPartyKills = true
 showDebuffs = true
 Width = 512
 fontJustify = "CENTER"
 font = "PT Sans Narrow"
 enableFade = true
 fontSize = 18
 showRepChanges = true
 showBuffs = true
 customColor = false
 enabledFrame = false
 fontColor = <table> {
 }
 fontShadowColor = <table> {
 }
 insertText = "bottom"
 enableScrollable = false
 enableCustomFade = true
 scrollableLines = 10
 fadeTime = 0.300000
 alpha = 100
 fontShadowOffsetX = 2
 Y = 224
 X = 0
 colors = <table> {
 }
 scrollableInCombat = false
 Height = 128
 visibilityTime = 5
 showInterrupts = true
 showHonorGains = true
}
f = xCT_PlusgeneralFrame {
 0 = <userdata>
 RefreshIfNecessary = <function> defined =[C]:-1
 OnPostShow = <function> defined =[C]:-1
 CalculateLineAlphaValueFromTimestamp = <function> defined =[C]:-1
 GetInsertMode = <function> defined =[C]:-1
 SetTimeVisible = <function> defined =[C]:-1
 hasOwnFontObject = true
 OnFontObjectUpdated = <function> defined =[C]:-1
 GetFading = <function> defined =[C]:-1
 IsTextCopyable = <function> defined =[C]:-1
 Clear = <function> defined =[C]:-1
 shouldFadeAfterInactivity = true
 SetIndentedWordWrap = <function> defined =[C]:-1
 GetTimeVisible = <function> defined =[C]:-1
 MarkLayoutDirty = <function> defined =[C]:-1
 SetFont = <function> defined =[C]:-1
 GetMaxLines = <function> defined =[C]:-1
 BackFillMessage = <function> defined =[C]:-1
 UnpackageEntry = <function> defined =[C]:-1
 FontStringContainer = <unnamed> {
 }
 SetShadowOffset = <function> defined =[C]:-1
 GetFont = <function> defined =[C]:-1
 SetMaxLines = <function> defined =[C]:-1
 CalculateSelectingCharacterIndicesForVisibleLine = <function> defined =[C]:-1
 PackageEntry = <function> defined =[C]:-1
 RefreshDisplay = <function> defined =[C]:-1
 SetFontObject = <function> defined =[C]:-1
 MakeFontObjectCustom = <function> defined =[C]:-1
 SetOnScrollChangedCallback = <function> defined =[C]:-1
 CalculateNumVisibleLines = <function> defined =[C]:-1
 fontObject = table: 000001F89BDAD9D0 {
 }
 overrideFadeTimestamp = 0
 isDisplayDirty = true
 SetInsertMode = <function> defined =[C]:-1
 MarkDisplayDirty = <function> defined =[C]:-1
 settings = <table> {
 }
 frameName = "general"
 ScrollByAmount = <function> defined =[C]:-1
 GetMessageInfo = <function> defined =[C]:-1
 GetOnScrollChangedCallback = <function> defined =[C]:-1
 sizing = xCT_PlusgeneralSizingFrame {
 }
 ScrollDown = <function> defined =[C]:-1
 AtTop = <function> defined =[C]:-1
 GetFontObject = <function> defined =[C]:-1
 isLayoutDirty = true
 SetScrollOffset = <function> defined =[C]:-1
 visibleLines = <table> {
 }
 textIsCopyable = false
 scrollOffset = 0
 fadeDurationSecs = 0.300000
 CanEffectivelyFade = <function> defined =[C]:-1
 timeVisibleSecs = 5
 SetJustifyV = <function> defined =[C]:-1
 insertMode = 2
 AddMessage = <function> defined =[C]:-1
 OnPreSizeChanged = <function> defined =[C]:-1
 GetScaledCursorPosition = <function> defined =[C]:-1
 OnPostMouseUp = <function> defined =[C]:-1
 ResetSelectingText = <function> defined =[C]:-1
 PageUp = <function> defined =[C]:-1
 SetOnDisplayRefreshedCallback = <function> defined =[C]:-1
 GetNumMessages = <function> defined =[C]:-1
 UpdateSelectingText = <function> defined =[C]:-1
 GetTextColor = <function> defined =[C]:-1
 AtBottom = <function> defined =[C]:-1
 ResetAllFadeTimes = <function> defined =[C]:-1
 ScrollToBottom = <function> defined =[C]:-1
 GetScrollOffset = <function> defined =[C]:-1
 GetSpacing = <function> defined =[C]:-1
 OnPreLoad = <function> defined =[C]:-1
 Scrol
BourgeoisM commented 3 years ago

created https://github.com/dandruff/xCT/pull/166#issue-504905968 with fixes

NicTerrio commented 3 years ago

Version 4.4.9 from Twitch/Curse - Game version: 8.0.1

Can't get the "Move Frames" to save (even with the /xct lock) or cancel.

BourgeoisM commented 3 years ago

Version 4.4.9 from Twitch/Curse - Game version: 8.0.1

Can't get the "Move Frames" to save (even with the /xct lock) or cancel.

Check my pull request #166 it should fix the problem

erendur81 commented 3 years ago

Yes, I can configure the frames again. Thank you!

One small error I keep getting randomly:

4x xCT+\modules\combattext.lua:982: attempt to call field 'GetCurrencyInfo' (a nil value)
[string "@xCT+\modules\combattext.lua"]:982: in function `?'
[string "@xCT+\modules\combattext.lua"]:528: in function <xCT+\modules\combattext.lua:511>
BourgeoisM commented 3 years ago

I think it's because Blizzard changes the GetCurrencyInfo function to return an enum instead of direct args. I have tried to patch, but i don't really know how to reproduce the problem :(

dandruff commented 3 years ago

I can try looking at it later tonight. Here is the API doc: https://github.com/ebonyfaye/9.0-Interface/blob/1899ab848ae624b7f10a52302cc66dee0e503b11/interface/addons/blizzard_apidocumentation/currencyinfodocumentation.lua#L300

I honestly don't remember what I actually need from GetCurrencyInfo so it might take me a minute to fix this.

BourgeoisM commented 3 years ago

Actually i had already dealt with currency in bag addons :) But it seems that Cimplex is on a good way to patch ! i did modifications similar to his, but i don't see the currency apear in the frame despite having no error. I think the Getcurencyinfo is not usable as before, and C_CurrencyInfo.GetCurrencyInfoFromLink might be the good choice! Anyway i have to go to sleep so have fun ! Since prepatch quest are not available yet, i may go back to beta to look for spells to merge :) i think the merge_class.lua may need a good cleanup too :S

Cimplex commented 3 years ago

@BourgeoisM I've been on the SL beta for the last hour, trying to get currency to drop but couldn't find an easy location. I also don't think battlegrounds are working or the queue time is pretty insane. Any suggestions?

BourgeoisM commented 3 years ago

@Cimplex Actually, i tried yesterday while leveling an alt in Draenor in retail. I think the easiest method would be going into zones that drop ressources (Garrison ressources (draenor), war ressources bfa, order ressources legion) etc.... Since world quest give you that. and sometimes elites and rares.

I don't know if buying bonus roll coins (for all expac) would trigger the currency text. Coalescing Visions, Corrupted Mementos, Mana pearl could be a good thing but it's not available in beta, and i don't know if it still up in prepatch

I'm at work so i can't really test right now but : https://www.wowhead.com/currencies#0+3-2 A list of currency could help you :) As in Shadowland beta i hardly find any currency......

Toludin commented 3 years ago

Changing line 982 to the following seems to fix the currency issue (for me):

local currencyTable = C_CurrencyInfo.GetCurrencyInfo(tonumber(currencyLink:match("currency:(%d+)"))) local name = currencyTable.name local amountOwned = currencyTable.quantity local texturePath = currencyTable.iconFileID

Might be a cleaner way to do it than that.

I was figuring that the change from the file path (old GetCurrencyInfo) to a file ID would cause issues, but it seems to be working fine.

Cimplex commented 3 years ago

Thanks! Just went with GetCurrencyInfoFromLink incase they decide to change that later... it should be backwards compatible now. This should fix it a9b2e03