Commit 2a0996de authored by Ivaria's avatar Ivaria

Merge branch 'fix_jump' into 'classic'

Fix the bug: Sometimes tank's health bar jump to 0 because of  Force Reactive Disk

This patch will fix #169 

I've got the  `CombatLogGetCurrentEventInfo`  return  values when this error occurs

| 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th | 10th | 11th | 12th | 13th | 14th | 15th | 16th | 17th 
| ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |------ | ------ |------ | 
| 1600437789.794 | SPELL_DURABILITY_DAMAGE | false | Player-4674-00559CB3 | 地球一只汪 | 66836 | 2 | Player-4674-00559CB3 |  地球一只汪 | 66836 | 2 | 0 | 力反馈盾牌 | 8 | 18168 | 力反馈盾牌 | nil

The 15th argument's value is the item ID. It will cause tank's health to be computed to 0.

See merge request !10
parents 3432479d d39dce76
......@@ -24,7 +24,6 @@ end
--
local tInfo;
local tNpcId;
local tNewHealth;
local tDeadInfo = { ["dead"] = true };
local function VUHDO_addUnitHealth(aUnit, aDelta, aSrcGUID)
......@@ -34,13 +33,18 @@ local function VUHDO_addUnitHealth(aUnit, aDelta, aSrcGUID)
-- filter exception data from combat log in classic
-- sometimes combat log shows 19000+ damage but it's not correct e.g Ragnaros's Melt Weapon
if abs(aDelta) > 10000 then
tNpcId = select(6, strsplit("-", aSrcGUID));
local tSrc, _, _, _, _, tNpcId = strsplit("-", aSrcGUID);
-- 11502 - Ragnaros
-- 11583 - Nefarian
if tNpcId and (tNpcId == "11502" or tNpcId == "11583") then
return;
end
-- 18168 - Force Reactive Disk
if tSrc and tSrc == "Player" and abs(aDelta) == 18168 then
return
end
end
-- avoid the calculation to be disturbed by the exception data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment