prediction: fix prediction for weird names

This commit is contained in:
shagu
2018-04-09 20:54:50 +02:00
parent 31258b81d4
commit 2d3814aaed
2 changed files with 14 additions and 14 deletions
+13 -13
View File
@@ -45,29 +45,29 @@ pfUI:RegisterModule("prediction", function ()
return return
end end
local _, _, evtype, delay = string.find(msg, '(%a+)/(%d+)/') local message = {strsplit("/", msg)}
if evtype and evtype == "GrpHealdelay" or evtype == "Healdelay" then
pfUI.prediction:HealDelay(sender, delay) if message[1] and ( message[1] == "GrpHealdelay" or message[1] == "Healdelay" ) then
pfUI.prediction:HealDelay(sender, message[2])
return return
end end
local _, _, evtype, target, amount, duration = string.find(msg, '(Heal)/(%a+)/(%d+)/(%d+)/') if message[1] and message[1] == "Heal" and message[2] then
if evtype and target then pfUI.prediction:Heal(sender, message[2], message[3], message[4])
pfUI.prediction:Heal(sender, target, amount, duration)
return return
end end
local _, _, evtype, amount, duration, targets = string.find(msg, '(GrpHeal)/(%d+)/(%d+)/(.+)/') if message[1] and message[1] == "GrpHeal" and message[2] then
if evtype and target then for i=4,8 do
for _, target in pairs({strsplit("/", targets)}) do if message[i] then
pfUI.prediction:Heal(sender, target, amount, duration) pfUI.prediction:Heal(sender, message[i], message[2], message[3])
end
end end
return return
end end
local _, _, evtype, target = string.find(msg, '(Resurrection)/(%a+)/(start)/') if message[1] and message[1] == "Resurrection" and message[2] then
if evtype and target then pfUI.prediction:Ress(sender, message[2])
pfUI.prediction:Ress(sender, target)
return return
end end
end end
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: |cff33ffccpf|cffffffffUI ## Title: |cff33ffccpf|cffffffffUI
## Author: Shagu ## Author: Shagu
## Notes: A complete user interface replacement. ## Notes: A complete user interface replacement.
## Version: 3.8.6 ## Version: 3.8.7
## SavedVariables: pfUI_profiles, pfUI_gold ## SavedVariables: pfUI_profiles, pfUI_gold
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB