diff --git a/boot.lua b/boot.lua index fef5d907..3a61046a 100644 --- a/boot.lua +++ b/boot.lua @@ -94,6 +94,15 @@ Details222.GarbageCollector = {} Details222.BreakdownWindow = {} + Details222.PlayerStats = {} + + ---add a statistic, log, or any other data to the player stat table + ---@param statName string + ---@param value number + function Details222.PlayerStats:AddStat(statName, value) + Details.player_stats[statName] = (Details.player_stats[statName] or 0) + value + end + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --initialization stuff local _ diff --git a/classes/container_actors.lua b/classes/container_actors.lua index 62a5d4c9..33cada0f 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -532,6 +532,8 @@ end --read the actor flag local readActorFlag = function(actorObject, ownerActorObject, actorSerial, actorFlags, actorName) if (actorFlags) then + local _, zoneType = GetInstanceInfo() + --this is player actor if (bitBand(actorFlags, OBJECT_TYPE_PLAYER) ~= 0) then if (not Details.ignore_nicktag) then @@ -549,7 +551,7 @@ end end end - if (Details.all_players_are_group or Details.immersion_enabled) then + if (zoneType ~= "arena" and (Details.all_players_are_group or Details.immersion_enabled)) then actorObject.grupo = true end @@ -583,7 +585,7 @@ end end end - if (Details.is_in_arena) then + if (zoneType == "arena") then --local my_team_color = GetBattlefieldArenaFaction and GetBattlefieldArenaFaction() or 0 --my team @@ -958,7 +960,7 @@ end if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player if (bitBand (actorFlags, REACTION_HOSTILE ) ~= 0) then --is hostile - novo_objeto.enemy = true --print(nome.." EH UM INIMIGO -> " .. engRace) + novo_objeto.enemy = true end --try to guess his class diff --git a/functions/profiles.lua b/functions/profiles.lua index 635c4841..2e0b9f86 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1142,6 +1142,8 @@ local default_player_data = { last_coach_name = false, }, + player_stats = {}, + combat_log = { inverse_deathlog_raid = false, inverse_deathlog_mplus = false,