Code organization
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
local CONST_CLIENT_LANGUAGE = DF.ClientLanguage
|
||||
|
||||
local GetSpellTexture = C_Spell.GetSpellTexture or GetSpellTexture
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
|
||||
@@ -421,10 +423,11 @@ end
|
||||
--read the actor flag
|
||||
local readActorFlag = function(actorObject, ownerActorObject, actorSerial, actorFlags, actorName)
|
||||
if (actorFlags) then
|
||||
local _, zoneType, difficultyId = GetInstanceInfo()
|
||||
local _, zoneType, instanceDifficultyId = GetInstanceInfo()
|
||||
|
||||
--this is player actor
|
||||
--if the actor is a player
|
||||
if (bitBand(actorFlags, OBJECT_TYPE_PLAYER) ~= 0) then
|
||||
--display name
|
||||
if (not Details.ignore_nicktag) then
|
||||
local actorNameAmbiguated = Ambiguate(actorName, "none")
|
||||
local nickname = Details:GetNickname(actorNameAmbiguated, false, true)
|
||||
@@ -433,6 +436,7 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--the actor does not have a nickname, use the character name instead
|
||||
if (not actorObject.displayName) then
|
||||
if (Details.remove_realm_from_name) then
|
||||
actorObject.displayName = actorName:gsub(("%-.*"), "")
|
||||
@@ -441,11 +445,13 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--group attributions
|
||||
if (zoneType ~= "arena" and (Details.all_players_are_group or Details.immersion_enabled)) then
|
||||
actorObject.grupo = true
|
||||
end
|
||||
|
||||
--special spells to add into the group view - they are set within the parser.lua file
|
||||
--special spells that Details! converted them in actor, add them to the group view. the list of these spells are set within the parser.lua file
|
||||
--they are added into the group view as they are considered important imformation
|
||||
local spellId = Details.SpecialSpellActorsName[actorObject.nome]
|
||||
if (spellId) then
|
||||
actorObject.grupo = true
|
||||
@@ -453,21 +459,23 @@ end
|
||||
end
|
||||
|
||||
--check if this actor can be flagged as a unit in the player's group
|
||||
if ((bitBand(actorFlags, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or Details:IsInCache(actorSerial)) then
|
||||
local bIsValidGroupMember = bitBand(actorFlags, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER"
|
||||
if (bIsValidGroupMember or Details:IsInCache(actorSerial)) then
|
||||
actorObject.grupo = true
|
||||
|
||||
if (difficultyId == 205) then
|
||||
--/dump Details:GetCurrentCombat():GetActor(1, "Captain Garrick").grupo
|
||||
if (instanceDifficultyId == 205) then
|
||||
dungeonFollowersNpcs[actorName] = true
|
||||
end
|
||||
|
||||
--/dump Details:GetCurrentCombat():GetActor(1, "Captain Garrick").grupo
|
||||
--check if this actor is a tank (player)
|
||||
if (Details:IsATank(actorSerial)) then
|
||||
actorObject.isTank = true
|
||||
end
|
||||
else
|
||||
--if this is a pvp segment (combat) and the option to show pvp players as group is enabled
|
||||
if (Details.pvp_as_group and (Details.tabela_vigente and Details.tabela_vigente.is_pvp) and Details.is_in_battleground) then
|
||||
--if this is a pvp combat and the option to show pvp players as group is enabled
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
if (Details.pvp_as_group and currentCombat.is_pvp and Details.is_in_battleground) then
|
||||
actorObject.grupo = true
|
||||
end
|
||||
end
|
||||
@@ -562,8 +570,8 @@ end
|
||||
actorObject.displayName = actorName
|
||||
end
|
||||
|
||||
local npcId = Details:GetNpcIdFromGuid(actorSerial)
|
||||
local petCustomname = Details222.Pets.GetPetNameFromCustomSpells(actorObject.displayName, spellId, npcId)
|
||||
--local npcId = Details:GetNpcIdFromGuid(actorSerial)
|
||||
--local petCustomname = Details222.Pets.GetPetNameFromCustomSpells(actorObject.displayName, spellId, npcId)
|
||||
else
|
||||
--anything else that isn't a player or a pet
|
||||
actorObject.displayName = actorName
|
||||
@@ -587,7 +595,7 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
if (difficultyId == 205) then
|
||||
if (instanceDifficultyId == 205) then
|
||||
if (dungeonFollowersNpcs[actorName]) then
|
||||
actorObject.grupo = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user