Nicktag reverted; more fixes for combatlog changes on 10.2 patch
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
-- 14: added support for chinese and russian
|
||||
|
||||
local major, minor = "NickTag-1.0", 15
|
||||
local major, minor = "NickTag-1.0", 16
|
||||
local NickTag, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
if (not NickTag) then
|
||||
@@ -585,11 +585,7 @@ end
|
||||
--here we format the text to match titles, e.g converts name like "JASON NICKSHOW" into "Jason Nickshow".
|
||||
name = name:gsub ("(%a)([%w_']*)", titlecase)
|
||||
|
||||
local playerName, realmName = UnitFullName ("player")
|
||||
|
||||
if(select(4, GetBuildInfo()) >= 100200) then
|
||||
playerName = playerName .. '-' .. realmName
|
||||
end
|
||||
local playerName = UnitName ("player")
|
||||
|
||||
--get the full nick table.
|
||||
local nickTable = NickTag:GetNicknameTable (playerName)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 90002
|
||||
## Interface: 100200
|
||||
## Title: NickTag-1.0
|
||||
## Notes: Standalone version of the NickTag library.
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
local addonName, Details222 = ...
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
Details.build_counter = 12028
|
||||
Details.alpha_build_counter = 12028 --if this is higher than the regular counter, use it instead
|
||||
Details.build_counter = 12029
|
||||
Details.alpha_build_counter = 12029 --if this is higher than the regular counter, use it instead
|
||||
Details.dont_open_news = true
|
||||
Details.game_version = version
|
||||
Details.userversion = version .. " " .. Details.build_counter
|
||||
|
||||
@@ -524,10 +524,13 @@ end
|
||||
if (actorFlags) then
|
||||
local _, zoneType = GetInstanceInfo()
|
||||
|
||||
--on retail post 100200 patch, actorName is formatted as "name-realm"
|
||||
|
||||
--this is player actor
|
||||
if (bitBand(actorFlags, OBJECT_TYPE_PLAYER) ~= 0) then
|
||||
if (not Details.ignore_nicktag) then
|
||||
actorObject.displayName = checkValidNickname(Details:GetNickname(actorName, false, true), actorName) --defaults to player name
|
||||
local actorNameAmbiguated = Ambiguate(actorName, "none")
|
||||
actorObject.displayName = checkValidNickname(Details:GetNickname(actorNameAmbiguated, false, true), actorName) --defaults to player name
|
||||
if (Details.remove_realm_from_name) then
|
||||
actorObject.displayName = actorObject.displayName:gsub(("%-.*"), "")
|
||||
end
|
||||
@@ -606,7 +609,7 @@ end
|
||||
local amountOpponents = GetNumArenaOpponentSpecs and GetNumArenaOpponentSpecs() or 5
|
||||
local found = false
|
||||
for i = 1, amountOpponents do
|
||||
local name = GetUnitName("arena" .. i, true)
|
||||
local name = Details:GetFullName("arena" .. i)
|
||||
if (name == actorName) then
|
||||
local spec = GetArenaOpponentSpec and GetArenaOpponentSpec(i)
|
||||
if (spec) then
|
||||
@@ -793,7 +796,7 @@ end
|
||||
|
||||
if (self.tipo == container_damage) then --containerType damage
|
||||
local shouldScanOnce = getActorClass(newActor, actorName, actorFlags, actorSerial)
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName, "damage")
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName)
|
||||
|
||||
if (petOwnerObject) then
|
||||
AddUnique(petOwnerObject.pets, actorName)
|
||||
@@ -809,7 +812,7 @@ end
|
||||
|
||||
elseif (self.tipo == container_heal) then --containerType healing
|
||||
local shouldScanOnce = getActorClass(newActor, actorName, actorFlags, actorSerial)
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName, "heal")
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName)
|
||||
|
||||
if (petOwnerObject) then
|
||||
AddUnique(petOwnerObject.pets, actorName)
|
||||
@@ -821,7 +824,7 @@ end
|
||||
|
||||
elseif (self.tipo == container_energy) then --containerType resources
|
||||
local shouldScanOnce = getActorClass(newActor, actorName, actorFlags, actorSerial)
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName, "energy")
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName)
|
||||
|
||||
if (petOwnerObject) then
|
||||
AddUnique(petOwnerObject.pets, actorName)
|
||||
@@ -829,7 +832,7 @@ end
|
||||
|
||||
elseif (self.tipo == container_misc) then --containerType utility
|
||||
local shouldScanOnce = getActorClass(newActor, actorName, actorFlags, actorSerial)
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName, "misc")
|
||||
readActorFlag(newActor, petOwnerObject, actorSerial, actorFlags, actorName)
|
||||
|
||||
if (petOwnerObject) then
|
||||
AddUnique(petOwnerObject.pets, actorName)
|
||||
|
||||
+2
-1
@@ -977,10 +977,11 @@
|
||||
end
|
||||
|
||||
--attempt to get the arena unitId for an actor
|
||||
--this function is called from containerActors while reading the actor flag and parser when managing deathlog
|
||||
function Details:GuessArenaEnemyUnitId(unitName)
|
||||
for i = 1, 5 do
|
||||
local unitId = "arena" .. i
|
||||
local enemyName = _G.GetUnitName(unitId, true)
|
||||
local enemyName = Details:GetFullName(unitId)
|
||||
if (enemyName == unitName) then
|
||||
_detalhes.arena_enemies[enemyName] = unitId
|
||||
return unitId
|
||||
|
||||
Reference in New Issue
Block a user