Skip to content

Commit

Permalink
Nicktag reverted; more fixes for combatlog changes on 10.2 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Nov 10, 2023
1 parent 89b84ce commit 60819b9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 2 additions & 6 deletions Libs/NickTag-1.0/NickTag-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Libs/NickTag-1.0/NickTag-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90002
## Interface: 100200
## Title: NickTag-1.0
## Notes: Standalone version of the NickTag library.

Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 9 additions & 6 deletions classes/container_actors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -821,15 +824,15 @@ 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)
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)
Expand Down
3 changes: 2 additions & 1 deletion core/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 60819b9

Please sign in to comment.