Closed XyzKangUI closed 1 year ago
Ah right, I've totally missed party pets as they aren't working in retail at all (so people are using addons/weak auras).
I'll start working on fixing this.
I've just pushed a potential fix for this, but I have limited ability to test this in Wotlk.
Could you try updating to the latest Alpha release and see if it's working? Alternatively you could git clone the repo down if you prefer rather than going through curseforge.
The error is caused by the pet unit, although you seem to have fixed top/middle/bottom sorting when there is a pet frame showing.
Is the pet unit called party1pet or partypet1?
Ok cool, so I think there is just 1 bug left I need to fix to get the pets sorted as well then.
Ok cool, so I think there is just 1 bug left I need to fix to get the pets sorted as well then.
why do you want to sort the pets, they are always attached to the bottom frame. Seems to be the correct behaviour
I was thinking for example if the sorted party is:
party2 party3 party1 player
Then the pets should be:
partypet2 partypet3 partypet1 playerpet
I like the commitment, but I dont think that the average player cares about pets position. It are mostly the PvP'ers who like to sort their frames by unit because of their macro's.
I like the commitment, but I dont think that the average player cares about pets position. It are mostly the PvP'ers who like to sort their frames by unit because of their macro's.
Yeah true, I think I'm so close to having it working so might as well try it anyway.
I believe that the unit names are just the default game units. From the lock PoV his pet will be "pet" and from the priest PoV the lock's pet will be "partypet1". When you convert the party to a raid it will be "raidpet1" for both the lock and priest, but macro's that use "pet" or "partypet1" still remain intact.
Although I guess that it answers your question if I tell you that its partypet..index and raidpet..index, unless you are in a party your own pet ("player") will be "pet" and for others it will be "partypetX"
Yeah I'm guessing this last bug is because i'm doing framesByUnit[partypet1]
but actually the frame unit is framesByUnit[party1pet]
or something like that. Just trying to think of someway to fix this cleanly at the moment.
Here it confirms the statement made above: "player":
from non player pov:
Yep as I suspected the frame name is partypet1
where my GetPets() function is returning party1pet
even though both are valid unit tokens. Just thinking about how to fix this atm.
You can use the SecureButton_GetUnit API to get an unit from a raidframe, e.g. SecureButton_GetUnit(CompactRaidFrame7) will return the unit id attached to it.
I've just pushed a potential fix if you wouldn't mind doing another check? Thanks so much for your help with this, I'm not sure how I could test this on Wotlk other than asking for randoms to join group.
I made like 4 accounts for wrath PTR servers so that I can do tests on. Pretty solid.
Oh I see, nice I'll do the same!
The API mentioned above will gsub and change raid1pet to raidpet1 and so forth, pretty solid. Wouldn't require you to also iterate over units. Could directly convert all frames to their respective unit ids and store that. Anyway it seems to work: when player is top it will set his pet at the top and vice versa when hes bottom sorted his pet will be on the bottom as well.
Oh ok, that sounds like a better approach, I will update to use SecureButton_GetUnit.
Alright I think I've got it working well enough for a release. There might be some more refactoring I can do there which I'll investigate later as it seems I can't quite get away from needing the aliases for pets at the moment.
I am curious if one day you will expand this addon's features to change spacing levels between frames. I am aware you are storing the X and Y values but if it could be used to add an own value on top , e.g. +5 it would be amazing.
I was actually thinking of adding in that feature! It would be pretty easy to add in some +-offsets. I will work on adding this over the next few days. If you have any other ideas/suggestions in the future as well feel free to let me know :)
Issue fixed in v3.2.0.
When party pets are enabled in wrath it will not sort because the GetUnits() function apparently does not account for partypet..i or raidpet..i units. So the amount of units will be less than the frames displayed and return on the LayoutRaid() function.
So I edited the GetUnits function to include pet units and it messes up the sorting creating a gap when you sort 'player' to be on the bottom:
What I've noticed are these issues:
1a.
1b.