10.2 always send the realm name even if the unit is from the player's realm, this patch fixes the issues caused by the change
This commit is contained in:
@@ -1247,107 +1247,9 @@
|
||||
end
|
||||
|
||||
function Details:MakeEqualizeOnActor (player, realm, receivedActor)
|
||||
|
||||
if (true) then --disabled for testing
|
||||
return
|
||||
end
|
||||
|
||||
local combat = Details:GetCombat("current")
|
||||
local damage, heal, energy, misc = Details:GetAllActors("current", player)
|
||||
|
||||
if (not damage and not heal and not energy and not misc) then
|
||||
|
||||
--try adding server name
|
||||
damage, heal, energy, misc = Details:GetAllActors("current", player.."-"..realm)
|
||||
|
||||
if (not damage and not heal and not energy and not misc) then
|
||||
--not found any actor object, so we need to create
|
||||
|
||||
local actorName
|
||||
|
||||
if (realm ~= GetRealmName()) then
|
||||
actorName = player.."-"..realm
|
||||
else
|
||||
actorName = player
|
||||
end
|
||||
|
||||
local guid = Details:FindGUIDFromName (player)
|
||||
|
||||
-- 0x512 normal party
|
||||
-- 0x514 normal raid
|
||||
|
||||
if (guid) then
|
||||
damage = combat [1]:PegarCombatente (guid, actorName, 0x514, true)
|
||||
heal = combat [2]:PegarCombatente (guid, actorName, 0x514, true)
|
||||
energy = combat [3]:PegarCombatente (guid, actorName, 0x514, true)
|
||||
misc = combat [4]:PegarCombatente (guid, actorName, 0x514, true)
|
||||
|
||||
if (Details.debug) then
|
||||
Details:Msg("(debug) equalize received actor:", actorName, damage, heal)
|
||||
end
|
||||
else
|
||||
if (Details.debug) then
|
||||
Details:Msg("(debug) equalize couldn't get guid for player ",player)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
combat[1].need_refresh = true
|
||||
combat[2].need_refresh = true
|
||||
combat[3].need_refresh = true
|
||||
combat[4].need_refresh = true
|
||||
|
||||
if (damage) then
|
||||
if (damage.total < receivedActor [1][1]) then
|
||||
if (Details.debug) then
|
||||
Details:Msg(player .. " damage before: " .. damage.total .. " damage received: " .. receivedActor [1][1])
|
||||
end
|
||||
damage.total = receivedActor [1][1]
|
||||
end
|
||||
if (damage.damage_taken < receivedActor [1][2]) then
|
||||
damage.damage_taken = receivedActor [1][2]
|
||||
end
|
||||
if (damage.friendlyfire_total < receivedActor [1][3]) then
|
||||
damage.friendlyfire_total = receivedActor [1][3]
|
||||
end
|
||||
end
|
||||
|
||||
if (heal) then
|
||||
if (heal.total < receivedActor [2][1]) then
|
||||
heal.total = receivedActor [2][1]
|
||||
end
|
||||
if (heal.totalover < receivedActor [2][2]) then
|
||||
heal.totalover = receivedActor [2][2]
|
||||
end
|
||||
if (heal.healing_taken < receivedActor [2][3]) then
|
||||
heal.healing_taken = receivedActor [2][3]
|
||||
end
|
||||
end
|
||||
|
||||
if (energy) then
|
||||
if (energy.mana and (receivedActor [3][1] > 0 and energy.mana < receivedActor [3][1])) then
|
||||
energy.mana = receivedActor [3][1]
|
||||
end
|
||||
if (energy.e_rage and (receivedActor [3][2] > 0 and energy.e_rage < receivedActor [3][2])) then
|
||||
energy.e_rage = receivedActor [3][2]
|
||||
end
|
||||
if (energy.e_energy and (receivedActor [3][3] > 0 and energy.e_energy < receivedActor [3][3])) then
|
||||
energy.e_energy = receivedActor [3][3]
|
||||
end
|
||||
if (energy.runepower and (receivedActor [3][4] > 0 and energy.runepower < receivedActor [3][4])) then
|
||||
energy.runepower = receivedActor [3][4]
|
||||
end
|
||||
end
|
||||
|
||||
if (misc) then
|
||||
if (misc.interrupt and (receivedActor [4][1] > 0 and misc.interrupt < receivedActor [4][1])) then
|
||||
misc.interrupt = receivedActor [4][1]
|
||||
end
|
||||
if (misc.dispell and (receivedActor [4][2] > 0 and misc.dispell < receivedActor [4][2])) then
|
||||
misc.dispell = receivedActor [4][2]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Details:EqualizePets()
|
||||
|
||||
+4
-4
@@ -1975,8 +1975,8 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
end
|
||||
|
||||
if (average > MIN_ILEVEL_TO_STORE) then
|
||||
local name = _detalhes:GetCLName(unitid)
|
||||
_detalhes.item_level_pool [guid] = {name = name, ilvl = average, time = time()}
|
||||
local unitName = Details:GetFullName(unitid)
|
||||
_detalhes.item_level_pool [guid] = {name = unitName, ilvl = average, time = time()}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2108,10 +2108,10 @@ local NotifyInspectHook = function(unitid)
|
||||
|
||||
if ((IsInRaid() or IsInGroup()) and (_detalhes:GetZoneType() == "raid" or _detalhes:GetZoneType() == "party")) then
|
||||
local guid = UnitGUID(unitid)
|
||||
local name = _detalhes:GetCLName(unitid)
|
||||
local name = Details:GetFullName(unitid)
|
||||
if (guid and name and not inspecting [guid]) then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if (name == _detalhes:GetCLName(unit .. i)) then
|
||||
if (name == Details:GetFullName(unit .. i)) then
|
||||
unitid = unit .. i
|
||||
break
|
||||
end
|
||||
|
||||
+5
-7
@@ -2196,8 +2196,6 @@
|
||||
--10/30 15:34:47.249 SPELL_EMPOWER_START,Player-4184-0048EE5B,"Nezaland-Valdrakken",0x514,0x0,Player-4184-0048EE5B,"Nezaland-Valdrakken",0x514,0x0,382266,"Fire Breath",0x4
|
||||
--357209 damage spell is different from the spell cast
|
||||
|
||||
local playerNameWithRealm = UnitName("player") .."-".. GetRealmName()
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
--SUMMON serach key: ~summon |
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -2224,7 +2222,7 @@
|
||||
|
||||
if (isWOTLK) then
|
||||
if (npcId == 15439) then
|
||||
Details.tabela_pets:Adicionar(petSerial:gsub("%-15439%-", "%-15438%-"), "Greater Fire Elemental", petFlags, sourceSerial, sourceName, sourceFlags)
|
||||
Details.tabela_pets:AddPet(petSerial:gsub("%-15439%-", "%-15438%-"), "Greater Fire Elemental", petFlags, sourceSerial, sourceName, sourceFlags)
|
||||
|
||||
elseif (npcId == 15438) then
|
||||
return
|
||||
@@ -2242,7 +2240,7 @@
|
||||
sourceName, sourceSerial, sourceFlags = petTable[1], petTable[2], petTable[3]
|
||||
end
|
||||
|
||||
Details.tabela_pets:Adicionar(petSerial, petName, petFlags, sourceSerial, sourceName, sourceFlags)
|
||||
Details.tabela_pets:AddPet(petSerial, petName, petFlags, sourceSerial, sourceName, sourceFlags)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -3674,7 +3672,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
local onUnitPowerUpdate = function(self, event, unitID, powerType)
|
||||
if (powerType == "ALTERNATE") then
|
||||
local actorName = Details:GetCLName(unitID)
|
||||
local actorName = Details:GetFullName(unitID)
|
||||
if (actorName) then
|
||||
local power = _current_combat.alternate_power[actorName]
|
||||
if (not power) then
|
||||
@@ -3961,7 +3959,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
if (not ownerActor) then
|
||||
petName, ownerName, ownerGUID, ownerFlags = Details.tabela_pets:PegaDono(sourceSerial, sourceName, sourceFlags)
|
||||
petName, ownerName, ownerGUID, ownerFlags = Details.tabela_pets:GetPetOwner(sourceSerial, sourceName, sourceFlags)
|
||||
if (petName) then
|
||||
ownerActor = _current_misc_container:GetOrCreateActor(ownerGUID, ownerName, ownerFlags, true)
|
||||
--print("pet found:", petName, ownerName, ownerGUID, ownerFlags)
|
||||
@@ -5929,7 +5927,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (serial and serial ~= UnitGUID("player") and serial:find("Player")) then
|
||||
Details.duel_candidates[serial] = GetTime()
|
||||
|
||||
local playerName = Details:GetCLName(unit)
|
||||
local playerName = Details:GetFullName(unit)
|
||||
|
||||
--check if the player is inside the current combat and flag the objects
|
||||
if (playerName and _current_combat) then
|
||||
|
||||
Reference in New Issue
Block a user