- Hotfix an initialization issue caused by a stealth patch in the client addon API.
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
local CONST_CLOUD_DATARC = "CE"
|
||||
local CONST_CLOUD_EQUALIZE = "EQ"
|
||||
|
||||
local CONST_PVP_ENEMY = "PP"
|
||||
|
||||
local CONST_ROGUE_SR = "SR" --soul rip from akaari's soul (LEGION ONLY)
|
||||
|
||||
_detalhes.network.ids = {
|
||||
@@ -60,6 +62,8 @@
|
||||
|
||||
["GUILD_SYNC"] = CONST_GUILD_SYNC,
|
||||
|
||||
["PVP_ENEMY"] = CONST_PVP_ENEMY,
|
||||
|
||||
["MISSDATA_ROGUE_SOULRIP"] = CONST_ROGUE_SR, --soul rip from akaari's soul (LEGION ONLY)
|
||||
}
|
||||
|
||||
@@ -374,6 +378,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.network.ReceivedEnemyPlayer (player, realm, core_version, data)
|
||||
-- ["PVP_ENEMY"] = CONST_PVP_ENEMY,
|
||||
end
|
||||
|
||||
|
||||
|
||||
_detalhes.network.functions = {
|
||||
[CONST_HIGHFIVE_REQUEST] = _detalhes.network.HighFive_Request,
|
||||
[CONST_HIGHFIVE_DATA] = _detalhes.network.HighFive_DataReceived,
|
||||
@@ -390,6 +400,8 @@
|
||||
[CONST_GUILD_SYNC] = _detalhes.network.GuildSync,
|
||||
|
||||
[CONST_ROGUE_SR] = _detalhes.network.HandleMissData, --soul rip from akaari's soul (LEGION ONLY)
|
||||
|
||||
[CONST_PVP_ENEMY] = _detalhes.network.ReceivedEnemyPlayer,
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+55
-4
@@ -103,6 +103,7 @@
|
||||
|
||||
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
|
||||
local container_misc = _detalhes.container_type.CONTAINER_MISC_CLASS
|
||||
local duel_candidates = _detalhes.duel_candidates
|
||||
|
||||
local OBJECT_TYPE_ENEMY = 0x00000040
|
||||
local OBJECT_TYPE_PLAYER = 0x00000400
|
||||
@@ -668,10 +669,16 @@
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> firendly fire
|
||||
|
||||
if (
|
||||
(_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx
|
||||
(raid_members_cache [alvo_serial] and raid_members_cache [who_serial] and alvo_serial:find ("Player") and who_serial:find ("Player")) --amrl
|
||||
if (
|
||||
(
|
||||
(_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx
|
||||
(raid_members_cache [alvo_serial] and raid_members_cache [who_serial] and alvo_serial:find ("Player") and who_serial:find ("Player")) --amrl
|
||||
)
|
||||
and
|
||||
(
|
||||
--> if the target isn't a pvp duel target
|
||||
not jogador_alvo.enemy and not este_jogador.enemy
|
||||
)
|
||||
) then
|
||||
|
||||
--> ignore soul link (damage from the warlock on his pet)
|
||||
@@ -4340,6 +4347,50 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:DispatchAutoRunCode ("on_leavecombat")
|
||||
end
|
||||
|
||||
--> this is mostly triggered when the player enters in a dual against another player
|
||||
function _detalhes.parser_functions:UNIT_FACTION (unit)
|
||||
--> check if outdoors
|
||||
--unit was nil, nameplate might bug here, it should track after the event
|
||||
if (_detalhes.zone_type == "none" and unit) then
|
||||
local serial = UnitGUID (unit)
|
||||
--> the serial is valid and isn't the player?
|
||||
if (serial and serial ~= UnitGUID ("player")) then
|
||||
_detalhes.duel_candidates [serial] = GetTime()
|
||||
|
||||
local playerName = _detalhes:GetCLName (unit)
|
||||
|
||||
--> check if the player is inside the current combat and flag the objects
|
||||
if (playerName and _current_combat) then
|
||||
local enemyPlayer1 = _current_combat:GetActor (1, playerName)
|
||||
local enemyPlayer2 = _current_combat:GetActor (2, playerName)
|
||||
local enemyPlayer3 = _current_combat:GetActor (3, playerName)
|
||||
local enemyPlayer4 = _current_combat:GetActor (4, playerName)
|
||||
if (enemyPlayer1) then
|
||||
--> set to show when the player is solo play
|
||||
enemyPlayer1.grupo = true
|
||||
enemyPlayer1.enemy = true
|
||||
if (IsInGroup()) then
|
||||
--> broadcast the enemy to group members so they can "watch" the damage
|
||||
|
||||
end
|
||||
end
|
||||
if (enemyPlayer2) then
|
||||
enemyPlayer2.grupo = true
|
||||
enemyPlayer2.enemy = true
|
||||
end
|
||||
if (enemyPlayer3) then
|
||||
enemyPlayer3.grupo = true
|
||||
enemyPlayer3.enemy = true
|
||||
end
|
||||
if (enemyPlayer4) then
|
||||
enemyPlayer4.grupo = true
|
||||
enemyPlayer4.enemy = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ROLE_CHANGED_INFORM (...)
|
||||
if (_detalhes.last_assigned_role ~= _UnitGroupRolesAssigned ("player")) then
|
||||
_detalhes:CheckSwitchOnLogon (true)
|
||||
|
||||
Reference in New Issue
Block a user