Moving ClassNameplate
Hello everyone!
At the moment I try to move the new class nameplate (health, power & ressources) coming with Legion. My problem is that I have not yet found approach, how I can move the whole unit or assign a fixed position. Don't get me wrong, the new nameplates are perfect. However, players display moves, depending on the camera position in impossible places, which follow the display can be more complex than useful. If someone had a starting for me, with whom I could start working, I would be pleased to hear about this. Thanks in advance for alle help :) greetz liquid |
Quote:
|
Don't do this. Just look into the Blizzard Interface files and find the function you need to hook.
https://github.com/tomrus88/Blizzard...ard_NamePlates https://github.com/tomrus88/Blizzard...tUnitFrame.lua https://github.com/tomrus88/Blizzard...rame.lua#L1752 Lua Code:
|
Quote:
That is was I searched for. I think I have it overseen in the Blizzardfiles. |
Tested the function with some changes and a problem occur. The entire nameplate-script is here (@line 286 & @line 317). Changes I had made are:
outfight with target: Code:
NamePlate1 NamePlate1UnitFrame Code:
NamePlate2 NamePlate2UnitFrame Code:
1x [ADDON_ACTION_BLOCKED] AddOn 'DuffedUI' tried to call the protected function 'NamePlate2:ClearAllPoints()'. |
Quote:
|
Quote:
Code:
if not UnitIsUnit(frame.displayedUnit, "player") then return end That's the reason why I mentioned that repositing is protected infight. Infight the class nameplate moves with the cameraposition and do no stay at my prevered position (bottom, 0, 370). |
The code above was a drycode to give you an idea.
If you have troubles applying the setpoint to the nameplate parent try to apply it to the frame instead. It is possible that you may not succeed if all the frames are protected. |
I know that it was a dry code with pretty good functionalty. At the moment I work on it, to find a solution.
Problem is here I can only add textures or colors to the frame, but moving cause a taint for health or energy bar (not tried with resources). |
Wouldn't it be simpler to just create your own frame and inherit the same template?
|
Quote:
However, if it turns out that you can not edit the Class Name Plates I will probably stay with the current model. |
All times are GMT -6. The time now is 12:57 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI