Giter Site home page Giter Site logo

grimsbain / nplates Goto Github PK

View Code? Open in Web Editor NEW
16.0 7.0 4.0 278 KB

Nameplates for NeavUI or standalone.

Home Page: https://wow.curseforge.com/projects/nplates-2-0

License: MIT License

Lua 100.00%
nameplates unit-frames world-of-warcraft-addon

nplates's People

Contributors

eke00372 avatar grimsbain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nplates's Issues

buff spacing

2017-04-11

EDIT: actually I guess this does cause same error sorry argh

but now that friendly not being modified the self buffs are wonky again... spaced so far away from bar
that part is changeable, i made a small addon to remove that space
it just changes baseYOffset and does not taint
perhaps you could add something similar?
edit: and maybe adjust or add option for z/layer/strata of player bar too if possible? i guess not
thanks!

-- http://www.mmo-champion.com/threads/2003404-Question-about-the-Legion-center-screen-HP-resource-bar

-- small name font
local frame = CreateFrame("FRAME", "RagePlateFrame");
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
local function eventHandler(self, event, ...)
 DefaultCompactNamePlateFrameSetUpOptions.useLargeNameFont = false;
end
frame:SetScript("OnEvent", eventHandler);

-- position buffs & debuffs
local function fn(...)
	for _,v in pairs(C_NamePlate.GetNamePlates()) do
		local bf = v.UnitFrame.BuffFrame;
		bf.baseYOffset = 0;
		bf:UpdateAnchor();
	end
	-- for _,v in pairs(C_NamePlate.GetNamePlateForUnit("target")) do
	-- 	local df = v.TargetFrame.BuffFrame;
	-- 	df.baseYOffset = 0;
	-- 	df:UpdateAnchor();
	-- end
end
NamePlateDriverFrame:HookScript("OnEvent", fn);

-- show debuffs
-- local gn = UnitAura;
-- local function fn(...)
-- 	local a = {gn(...)};
-- 	a[15] = a[6] ~= nil and abs(a[6] - 31) < 31;
-- 	return unpack(a);
-- end
-- UnitAura=fn;

--/run local b={196608,126896};local gn=UnitAura;local function fn(...)local a={gn(...)};a[15]=a[6]~=nil and not tContains(b,a[11])and abs(a[6]-31)<31;return unpack(a);end UnitAura=fn;


Enabling Execute Coloring and Moving the slider causes errors.

nPlates\config.lua:132: in function <nPlates\config.lua:130>

Locals:
self = ExecuteSlider {
 0 = <userdata>
 text = ExecuteSliderText {
 }
 minValue = 0
 maxValue = 35
 textLow = ExecuteSliderLow {
 }
 High = ExecuteSliderHigh {
 }
 textHigh = ExecuteSliderHigh {
 }
 Low = ExecuteSliderLow {
 }

Taint!

I've been going through the addons I use one at a time trying to work out what is the root cause of the occasional errors I find, I know something is causing taint somewhere and then other mods are getting the blame.
I enabled the taint log and I've been going through one addon at a time, current I've only got nPlates enabled and I got this in the taint.log file.

2/26 13:37:18.637  Global variable nPlates_OnEvent tainted by nPlates - Interface\AddOns\nPlates\core.lua:17
2/26 13:37:18.637  Global variable SLASH_nplates1 tainted by nPlates - Interface\AddOns\nPlates\slash.lua:35

This was just logging in and then logging out, there were no visible name plates on the screen.

Health Text showing on RaidFrame

As of the latest update, health text from this addon is also appearing on raid frames.

Think you're just missing this in the UpdateStatusText hook

if ( not frame.isNameplate ) then return end

NeavUI

What happened to your release?

Protected Function

1x [ADDON_ACTION_BLOCKED] AddOn 'nPlates' tried to call the protected function 'SetTargetClampingInsets()'.
!BugGrabber\BugGrabber.lua:519: in function <!BugGrabber\BugGrabber.lua:519>
[C]: in function `SetTargetClampingInsets'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:273: in function `SetupClassNameplateBars'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:96: in function `OnNamePlateAdded'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:51: in function <...eBlizzard_NamePlates\Blizzard_NamePlates.lua:42>

Locals:
InCombatSkipped

I don't exactly know when this error occurs. Probably when entering/leaving combat.

Can't change the font

Not really an issue since it's not a feature but it would be nice since I can't set the font to my frames font.

Defaul Auras (buffs/debuffs) frame glith

Hey, enabling nPlates I have noticed that there is pretty annoying visual gap between Nameplate and default Auras frame (see screenshot).

The issue is not present on not selected nameplates.

WoWScrnShot_012821_145958

Player resource bar corruption

In core.lua 412-414:

frame.healthBar:SetPoint("BOTTOMLEFT", frame.castBar, "TOPLEFT", 0, 4.2)
frame.healthBar:SetPoint("BOTTOMRIGHT", frame.castBar, "TOPRIGHT", 0, 4.2)
frame.healthBar:SetHeight(12)

This causes corruption by trying to attach to a castbar that does not exist with the player resource bar.

This causes many things to fail: Tooltips, buff stack text, health amount text.

nPlates

Here is some quick-n-dirty code that fixes this. This replaces the hook on line 406, though you may know of a more effective option.

hooksecurefunc("DefaultCompactNamePlateFrameAnchorInternal", function(frame, setupOptions)
    if ( frame:IsForbidden() ) then return end
    if ( not frame.isNameplate ) then return end

    -- Healthbar

    local pframe = C_NamePlate.GetNamePlateForUnit("player", issecure())

    if pframe then
        if frame.BuffFrame.unit ~= pframe.namePlateUnitToken then
            frame.healthBar:SetPoint("BOTTOMLEFT", frame.castBar, "TOPLEFT", 0, 4.2)
            frame.healthBar:SetPoint("BOTTOMRIGHT", frame.castBar, "TOPRIGHT", 0, 4.2)
        end
    else
        frame.healthBar:SetPoint("BOTTOMLEFT", frame.castBar, "TOPLEFT", 0, 4.2)
        frame.healthBar:SetPoint("BOTTOMRIGHT", frame.castBar, "TOPRIGHT", 0, 4.2)
    end

    frame.healthBar:SetHeight(12)

        -- Castbar

    frame.castBar.Icon:SetSize(24, 24)
    frame.castBar.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
    frame.castBar.Icon:ClearAllPoints()
    frame.castBar.Icon:SetPoint("BOTTOMLEFT", frame.castBar, "BOTTOMRIGHT", 4.9, 0)

        -- Hide Border Shield

    frame.castBar.BorderShield:ClearAllPoints()
end)

Cheers.

nTooltip Error

Message: Interface\AddOns\nTooltip\core.lua:87: Attempt to access forbidden object from code tainted by an AddOn
Time: 07/08/17 15:36:17
Count: 3203
Stack: Interface\AddOns\nTooltip\core.lua:87: Attempt to access forbidden object from code tainted by an AddOnInterface\SharedXML\SharedBasicControls.lua:204: in function <Interface\SharedXML\SharedBasicControls.lua:203>
[C]: ?
[C]: in function `SetBackdropColor'
Interface\AddOns\nTooltip\core.lua:87: in function <Interface\AddOns\nTooltip\core.lua:86>
[C]: ?

Locals: errorMessage = "Interface\AddOns\nTooltip\core.lua:87: Attempt to access forbidden object from code tainted by an AddOn"
DisplayMessageInternal = defined @interface\SharedXML\SharedBasicControls.lua:187
MESSAGE_TYPE_ERROR = 0

Error friendly nameplates

When I turn on friendly nameplates I get errors?

  • Tried after disable all other addons.
  • Tried after deleting Cache & Interface & Wtf.

Message: Interface\AddOns\nPlates\core.lua:395: Attempt to access forbidden object from code tainted by an AddOn
Time: 04/07/17 10:09:26
Count: 4
Stack: [C]: in function SetHeight' Interface\AddOns\nPlates\core.lua:395: in function <Interface\AddOns\nPlates\core.lua:394> [C]: in function DefaultCompactNamePlateFrameSetupInternal'
Interface\FrameXML\CompactUnitFrame.lua:1750: in function <Interface\FrameXML\CompactUnitFrame.lua:1732>
[C]: in function DefaultCompactNamePlateFrameSetup' Interface\FrameXML\CompactUnitFrame.lua:1754: in function func'
Interface\FrameXML\CompactUnitFrame.lua:201: in function CompactUnitFrame_SetUpFrame' ...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:108: in function ApplyFrameOptions'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:84: in function `OnNamePlateAdded'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:44: in function <...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:35>

Locals: (*temporary) = {
otherHealPrediction = {
}
overAbsorbGlow = {
}
myHealAbsorbLeftShadow = {
}
border = {
}
barTexture = {
}
totalAbsorb = {
}
myHealAbsorb = {
}
myHealPrediction = {
}
myHealAbsorbRightShadow = {
}
0 =
background = {
}
overHealAbsorbGlow = {
}
totalAbsorbOverlay = {
}
}
(*temporary) = 12

Latest nPlates

When looking at NPCs

Message: Interface\AddOns\nPlates\core.lua:203: attempt to index field 'healthString' (a nil value)
Time: 08/02/16 07:53:56
Count: 1
Stack: Interface\AddOns\nPlates\core.lua:203: in function <Interface\AddOns\nPlates\core.lua:191>
[C]: in function CompactUnitFrame_UpdateStatusText' Interface\FrameXML\CompactUnitFrame.lua:294: in functionCompactUnitFrame_UpdateAll'
Interface\FrameXML\CompactUnitFrame.lua:171: in function CompactUnitFrame_SetUnit' ...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:270: in functionOnAdded'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:59: in function `OnNamePlateAdded'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:24: in function <...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:18>

Locals: frame = NamePlate1UnitFrame {
otherHealPrediction = {
}
LoseAggroAnim = {
}
selectionHighlight = {
}
myHealAbsorb = {
}
classificationIndicator = {
}
myHealAbsorbLeftShadow = {
}
maxDebuffs = 0
unit = "nameplate1"
RaidTargetFrame = {
}
maxDispelDebuffs = 0
disableMouse = true
inVehicle = false
0 =
statusText = {
}
ClassificationFrame = {
}
castBar = {
}
displayedUnit = "nameplate1"
unitExists = true
optionTable =

{
}
overAbsorbGlow = {
}
maxBuffs = 0
BuffFrame = {
}
healthBar = {
}
totalAbsorbOverlay = {
}
totalAbsorb = {
}
name = {
}
aggroHighlight = {
}
myHealPrediction = {
}
myHealAbsorbRightShadow = {
}
overHealAbsorbGlow = {
}
newUnit = true
}
(_temporary) = nil
(_temporary) = nil
(_temporary) = "nameplate"
(_temporary) = "nameplate"
(_temporary) = nil
(_temporary) = nil
(_temporary) = nil
(_temporary) = nil
(*temporary) = "attempt to index field 'healthString' (a nil value)"
FormatValue = defined @interface\AddOns\nPlates\core.lua:74

10.1 Broke

Hi,

Config Menu no longer opens and addon throwing out lua errors

Message: Interface/AddOns/nPlates/Settings.lua:41: attempt to call global 'GetAddOnMetadata' (a nil value)

Time: Mon May 8 00:13:37 2023

Count: 1

Stack: Interface/AddOns/nPlates/Settings.lua:41: attempt to call global 'GetAddOnMetadata' (a nil value)

[string "@Interface/AddOns/nPlates/Settings.lua"]:41: in function

Locals: self = nPlatesOptions {

SaveProfileBackup = defined @Interface/AddOns/nPlates/Settings.lua:58

OnLoad = defined @Interface/AddOns/nPlates/Settings.lua:34

SaveChanges = defined @Interface/AddOns/nPlates/Settings.lua:62

controls = {

}

RightSide = nPlatesOptionsRightSide {

}

OnEvent = defined @Interface/AddOns/nPlates/Settings.lua:50

CancelChanges = defined @Interface/AddOns/nPlates/Settings.lua:77

UpdatePanel = defined @Interface/AddOns/nPlates/Settings.lua:94

LeftSide = nPlatesOptionsLeftSide {

}

profileBackup =

{
}

RestoreDefaults = defined @Interface/AddOns/nPlates/Settings.lua:86

ShouldUpdate = defined @Interface/AddOns/nPlates/Settings.lua:70

0 =

Init = defined @Interface/AddOns/nPlates/Settings.lua:102

}

(*temporary) = nil

(*temporary) = "nPlates"

(*temporary) = "Title"

(*temporary) = "attempt to call global 'GetAddOnMetadata' (a nil value)"

addon = "nPlates"

Nameplates after death

When you die nameplate(healthbar) under your character ingame gets bugg and dissapear, only with reload it reworks.

Personal resource position error

Hello Grimsbain,

i have a little error at the looking of the personal resource nPlates. As you can see on the attached screen, i'm not in a raid or group. The PR is on the bottom left screen and no the nPlate design.

I can't get it away with /rl in or out of combat. If i die (f.e.) it will reset it. It will happen also on windows or mac client.

Can a do something that this is not gona happen?

Greetings,
Daneras

bildschirmfoto 2017-09-11 um 11 37 01

"Display Level" enhancement

This is just a personal opinion, but I think displaying level of everyone who is max level is unnecessary, but it's still an option I'd want enabled to see 1. mob levels 2. Someone under max level

This can be achieved easily on line 304 in core.lua:

if ( targetLevel == -1 ) or ( targetLevel == MAX_PLAYER_LEVEL_TABLE[GetAccountExpansionLevel()] and UnitIsPlayer(frame.displayedUnit) ) then

a suboption in the menu might be better: "Hide max-level player levels."

Cheers.

TBC version

Hello,

Do you plan to make a version for TBC Classic ? Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.