Commit 3b85049c authored by Ivaria's avatar Ivaria
Browse files

Upgraded NickTag-1.0 library dependency to minor 14

parent 9f45927b
...@@ -25,6 +25,8 @@ externals: ...@@ -25,6 +25,8 @@ externals:
Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0 Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0
Libs/LibCustomGlow-1.0: Libs/LibCustomGlow-1.0:
url: https://github.com/Stanzilla/LibCustomGlow url: https://github.com/Stanzilla/LibCustomGlow
Libs/NickTag-1.0:
url: https://github.com/Tercioo/NickTag-1.0
VuhDoOptions/Libs/ChatThrottleLib: svn://svn.wowace.com/wow/chatthrottlelib/mainline/trunk VuhDoOptions/Libs/ChatThrottleLib: svn://svn.wowace.com/wow/chatthrottlelib/mainline/trunk
......
MIT License
Copyright (c) 2019 Tercio Jose
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This diff is collapsed.
## Interface: 80200
## Title: NickTag-1.0
## Notes: Standalone version of the NickTag library.
NickTag-1.0.xml
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file="NickTag-1.0.lua"/>
</Ui>
NickTag is a library that allows the player to set a nickname, addons using this library can get the nickname and use it instead of the player name.
The nickname is shared among guild members and used instead of the regular player name.
Installing:
Install NickTag as you install any other library, but make sure to load NickTag after AceComm-3.0, AceSerializer-3.0, AceTimer-3.0 and CallbackHandler-1.0.
As an alternative you may use: _G.LibStub("NickTag-1.0"):Embed(YourAddonObject)
Cache Setup:
- After install, set a cache to store nicknames data received from others guild members.
- For this, call YourAddonObject:NickTagSetCache ( MyTable ), where "MyTable" is any table within your SavedVariablesPerCharacter.
- Is important to call NickTagSetCache right after your addon loads saved variables data.
Handle Player Nicknames:
- YourAddonObject:SetNickname(string), returns true if the string is a valid nickname.
The nickname must follow some rules:
- Can't be large then 12 characters.
- Isn't allowed numbers and others special characters.
- Can't repeat more then 2 times the same characters in a row.
- Can't have more then 2 spaces.
- Nickname is formated to fit title case, for instance, "SussY HArLey" is automatically formated to "Sussy Harley", "frank roger" to "Frank Roger".
- Trim.
Player Avatars:
The library also has support for player avatar and avatar background, see the example:
--this function runs when the player hit the okay button on the avatar pick frame
local avatarCallback = function (avatarTexture, avatarTextureTexCoord, avatarBackground, avatarBackgroundTexCoord, avatarBackgroundColor)
YourAddonObject:SetNicknameBackground (avatarBackground, avatarBackgroundTexCoord, avatarBackgroundColor)
YourAddonObject:SetNicknameAvatar (avatarTexture, avatarTextureTexCoord)
_G.AvatarPickFrame.callback = nil
end
--set the callback function
_G.AvatarPickFrame.callback = AvatarCallBack
--show the atatar pick frame
_G.AvatarPickFrame:Show()
Getting Nicknames and Avatars:
- @playerGUID: target player GUID.
- @default: a default if the player does not has a nickname
- @silent: show no errors if something goes wrong.
YourAddonObject:GetNickname (playerGUID, default, silent)
- @playerGUID: target player GUID.
- @default: a default texture if the player does not has an avatar, can be an empty string for no avatars.
- @silent: show no errors if something goes wrong.
YourAddonObject:GetNicknameAvatar (playerGUID, default, silent)
- @playerGUID: target player GUID.
- @defaultPath: returns this value texture path if no background is found.
- @defaultTexCoord: returns this value texture path if no background is found.
- @defaultColor: returns this value texture path if no background is found.
- @silent: show no errors if something goes wrong.
YourAddonObject:GetNicknameBackground (playerGUID, defaultPath, defaultTexCoord, defaultColor, silent)
...@@ -19,6 +19,7 @@ Bugfixes: ...@@ -19,6 +19,7 @@ Bugfixes:
Improvements: Improvements:
-- Added Hunter 'Primal Fury' debuff 'Fatigued' to default ignore list -- Added Hunter 'Primal Fury' debuff 'Fatigued' to default ignore list
-- Added additional default custom debuffs for Castle Nathria encounters -- Added additional default custom debuffs for Castle Nathria encounters
-- Upgraded NickTag-1.0 library dependency to minor 14
-------------------------------------------------------------- --------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment