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
end
local _, _, evtype, delay = string.find(msg, '(%a+)/(%d+)/')
if evtype and evtype == "GrpHealdelay" or evtype == "Healdelay" then
pfUI.prediction:HealDelay(sender, delay)
local message = {strsplit("/", msg)}
if message[1] and ( message[1] == "GrpHealdelay" or message[1] == "Healdelay" ) then
pfUI.prediction:HealDelay(sender, message[2])
return
end
local _, _, evtype, target, amount, duration = string.find(msg, '(Heal)/(%a+)/(%d+)/(%d+)/')
if evtype and target then
pfUI.prediction:Heal(sender, target, amount, duration)
if message[1] and message[1] == "Heal" and message[2] then
pfUI.prediction:Heal(sender, message[2], message[3], message[4])
return
end
local _, _, evtype, amount, duration, targets = string.find(msg, '(GrpHeal)/(%d+)/(%d+)/(.+)/')
if evtype and target then
for _, target in pairs({strsplit("/", targets)}) do
pfUI.prediction:Heal(sender, target, amount, duration)
if message[1] and message[1] == "GrpHeal" and message[2] then
for i=4,8 do
if message[i] then
pfUI.prediction:Heal(sender, message[i], message[2], message[3])
end
end
return
end
local _, _, evtype, target = string.find(msg, '(Resurrection)/(%a+)/(start)/')
if evtype and target then
pfUI.prediction:Ress(sender, target)
if message[1] and message[1] == "Resurrection" and message[2] then
pfUI.prediction:Ress(sender, message[2])
return
end
end
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: |cff33ffccpf|cffffffffUI
## Author: Shagu
## Notes: A complete user interface replacement.
## Version: 3.8.6
## Version: 3.8.7
## SavedVariables: pfUI_profiles, pfUI_gold
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB