Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: classic support #17

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

juemrami
Copy link

@juemrami juemrami commented Apr 17, 2024

Related Issue:

These initial commits are just bare minimum to get the addon running on classic era client.

Todo:

  • hide unused classes, for game version, from config
  • check latest classic ui source for RAID_CLASS_COLORS usage to update the ClassColorsBlizz.lua module
    • PaperDollFrame
      • retail
      • cata
      • dne in classic era
    • Blizzard_RaidUI
      • retail
      • cata/era
    • Blizzard_HeirloomCollection
      • retail
      • cata
      • dne in classic era
    • CompactUnitFrame
      • retail
      • cata/era
    • FriendsFrame_Shared & FriendsFrame (WhoList)
      • retail
      • cata/era
    • ChatFrame
      • retail
      • cata/era
    • LootFrame & GroupLootFrame (MasterLootFrame)
      • retail
      • cata/era
    • LFDFrame
    • LFGFrame
    • LFGList
    • CommunitiesUtil
      • retail
      • cata
      • exists but commented out in era build
    • Blizzard_Communities
      • CommunitiesMemberList
        • retail
        • cata/era
      • CommuntiesChatFrame exist in cata/retail
      • CommunitiesInvitationFrame exist in cata/retail
    • LootHistory
      • retail (retail uses new system. support req)
      • cata/era
    • Blizzard_InspectUI
      • InspectPaperDollFrame only uses color in retail
    • RaidFinder only exist in retail (atm)
    • BossBannerToast only exist in retail

Sorry, something went wrong.

just trying to get the addon to not error out.

Luckily the way the addon is setup to only hook onto blizzard addon code once is loaded makes it so i dont have to manually check that these exist in classic (since they'll never get loaded if they don't exist)
this file will support multiple interface versions with the release of classic 4.4

for now only added 1.15.2 interface version.
This reverts an editor config file accidentally added in commit 1e79618.
`GetNumClasses` returns the the id for the highest valid class in that game client.  For any intermediate id's that are not valid for the current game client, `GetClassInfo` will return `nil`.
@juemrami juemrami marked this pull request as draft April 17, 2024 06:02
Classic ui doesnt add the spec name or color in the format string.

removed conditional check on `StaticPopup_OnUpdate`. confirmed its in all flavors of the game.
This addons calls `SetColor` in every swatchFunc call.

`SetColor` updates the swatch texture color, and it also saves the color to the db **only if the ColorPickerFrame is closed**.

Clicking "Okay" button invokes the swatchFunc callback on both retail and classic

On classic the color picker is hidden before the swatchFunc is called. Howeve, on retail the swatchFunc is called **before** the color picker is hidden.

As a result, in retail the color from the picker is not being saved because the ColorPickerFrame was still open when the swatchFunc was called and invoked `SetColor`.
Support for both classic era and retail.
according to retail client:
- 0: always show
- 1: never show
- 2: respect legacy chat settings (wotlk/classic)
…lassic

fixed by checking its object type, code assumes if its not a button its a fontstring. Id rather it error out when it stops working than to just silently ignore (so that it can be fixed)
Since this addon was not supported for a while, there have been other addons that offer support for forcing colors for certain classes (primarily thinking shaman in classic).

These addons create a `CUSTOM_CLASS_COLORS` table as well and I think it would be wise allow for an existing table.

defaults should still be the blizzard defaults.
@juemrami
Copy link
Author

[39bd15b] resolves the chat window issue mentioned in:

juemrami added 17 commits April 17, 2024 23:09
check object type on `"RaidGroupButtonNClass` as with the `RaidGroupFrame_Update` fix.

Classic uses a button with a text filed instead of a fontString directly.
the base `IsAddonLoaded` is marked as deprecated and will prolly get removed next xpac.
this fix is in relation to the recent changes to allow for pre-existing `CUSTOM_CLASS_COLORS` tables set by other addons.
I feel like there should be a better way of keeping track what frames are expected to warn the user when they should check for/request updates.
…oByID`

`C_CreatureInfo.GetClassInfo` used now. Works on both cata/retail
didnt realize this table existed. Now we dont have to do the work.
specifically `ClassColorLegend`
retail uses a new method for coloring while classic just moved to the API to a `C` namespace
function is on all clients. removing the wrapped conditional.
This is now only used by blizz im guessing.
used by `CommunitiesTicketEntryMixin`
- ChatFrame
- InvitationFrame
- Guild/Club Card tooltip specs

I think alot of these are in need of fixing because of a call to GetClassColor. Im wondering how plausible it is to replace the function without tainting.
both retail n classic.
Alot more code using the same color function as this to go through now :(
also moved `GROUP_INVITE_CONFIRMATION` to use the same method instead of checking OnUpdates.
got an error while playing earlier. Not sure what caused it, maybe another addon calling `WhoList_Update`.
Battlefieldmap needs further testing for retail/cata.
`GetInspectSpecialization` doesnt exist in classic era, but also this text isnt colored in the default UI anyways.
BW packer will generate a file for each release target  if needed.
namely `GetAddonMetadata` and `FillLocalizedClassList`
while not necessary, allows for doubt in presuming taint sourced from modifying the global table. Fool Proof.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant