Arena ClassSpec-Icons appear/mirror friendly/neutral nameplates
3 Attachment(s)
Hello,
I use alot of scripts for pvp and one of the codes is giving me trouble since Shadowlands. Code:
local U = UnitIsUnit; Also I get lua.errors which I couldnt fix myself but I dont think it is related to this problem itself: Code:
Message: Interface\AddOns\RulezPvPScripts\core.lua:21: attempt to index local 'nameplate' (a nil value) It is not my own code so it would be really kind if someone is able to fix it up. For friendly nameplates I use a different code because I need different positioning and Iconsize (smaller nameplates): Code:
local frame = CreateFrame("Frame") and to rewrite the second code with friendly_units but to show spec-icons instead of class-icons (see example) in arenas? Basically friendly and enemy nameplate class-icons outside of arena/pvp (or when :GetSpec isnt working) and turn to friendly/enemy specialization-icons inside arena/pvp (if possible). I know its a mess and alot of work but I usually just put all the stuff mixed together in one addon and I dont have alot of expierence with lua. It would be really helpful and maybe its possible to create a small addon with both functions/codes (friendly, enemy) with the possibility to seperate edit friendly icons from enemy icons in sizes/positioning (no ingame config just simple lua-code). I would also like to share the result to the community if someone get this to work. Thank you for reading. Attachments: Issues (wrong/discplacement_example), Friendly_Nameplates (default_ like usually), Enemy_Nameplates (default_ like usually) The icon on the top of the first image is from BigDebuffs which is bugged too but addon related (already reportet). |
I don't pvp so I didn't get to test the enemy nameplate part but here is a start:
Lua Code:
|
Seems to work perfectly without any issues.
Thank you so much!:) |
So it works fine for friendly nameplates but I noticed that enemy spec-icons doesn't show/switch up in arenas.
I can only see the class-icons for enemy players. Is there a way to fix that? Friendly is fine even in Openworld when warmode is on. I mean with the first code the spec-icons worked fine except the errors and buggs but I dont understand the issue since you put up both friendly and enemy triggers the same way. Gladius and GladiusEx (Addons) have a similar way to detect that. Does that do anything: local isInArena = false |
Spec info for enemy players is not available. All you get is their class, what they look like, and the spells they cast.
|
I am sure it is available at least in closed pvp: arenas and battlegrounds.
You can also get Talents/CD's of Opponents, here some examples from my UI: https://imgur.com/a/EQDNHZZ (GladiusEx and before the game started) https://imgur.com/a/fOeEjvf (old Code in Arenafight) |
Like I said I don't do arenas so I couldn't test that part. I can change it to do the arena opponent specs the original way when I get some time but it may be a few days.
|
Ty, you already helped alot :)
I was just confused because it worked for friendly units but I noticed for enemys it is a bit more tricky. Blizzard gives opportunities to detect specialization in closed PvP areas (skrims, rated arena, normal-, epic-bgs, rated bgs). Something like this worked well with friendly units and some Tooltip Addons use this and Inspect for friendly player specs too: Code:
local specID = GetInspectSpecialization(unit) Code:
|
Most of the extra code is for showing friendly specs and the arena code has still not been tested:
Lua Code:
|
Ok :) I tested it openworld and in arenas (friendly&enemy).
Friendly nameplates show random race-like icons/frame(?) before spec shows up: https://imgur.com/a/GKtbccl Enemy nameplates too but no spec-icon will show up/appear and it looks like this: https://imgur.com/a/8MvPpSG Basically friendly icons will work openworld and in preparation-room(pvp) aside from the race-frame/thing but when the pvp game starts they end up looking like this too: https://imgur.com/a/sCliDLA Also when I inspect players their whole profile/gear-slots appear empty. No errors/other issues. Hope that helps a bit. |
At the moment I use the first code (Vrul/#2) which works fine.
It shows friendly spec-icons and enemie class-icons in closed pvp. Maybe theres a solution for the enemy-specs in the future but the only Addon I found is Plater Nameplates. And since Plater is somehow in correlation with Details it is probably much easier to have these functions working but apart from this I prefer default nameplates. |
All times are GMT -6. The time now is 06:56 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI