From 9ecd23615bc127b4a11196bb27608637cc716eae Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 11 Oct 2019 11:02:20 +0200 Subject: [PATCH 1/3] Add Spirit Bond message to battlemod Add Spirit Bond message to battlemod --- addons/battlemod/battlemod.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/addons/battlemod/battlemod.lua b/addons/battlemod/battlemod.lua index 11523a7ab..83e6ddd41 100644 --- a/addons/battlemod/battlemod.lua +++ b/addons/battlemod/battlemod.lua @@ -259,6 +259,25 @@ windower.register_event('incoming chunk',function (id,original,modified,is_injec if not check_filter(actor,target,0,am.message_id) then return true end if not actor or not target then -- If the actor or target table is nil, ignore the packet + elseif T{800}:contains(am.message_id) then -- Spirit bond message + local Self = windower.ffxi.get_player() + local status = color_it(res.buffs[am.param_1][language],color_arr.statuscol) + local targ = color_it(target.name or '',color_arr[target.owner or target.type]) + local number = am.param_2 + local color = color_filt(res.action_messages[am.message_id].color, am.target_id==Self.id) + if simplify then + local msg = line_noactor + :gsub('${abil}',status or '') + :gsub('${target}',targ) + :gsub('${numb}',number or '') + windower.add_to_chat(color, msg) + else + local msg = res.action_messages[am.message_id][language] + :gsub('${status}',status or '') + :gsub('${target}',targ) + :gsub('${number}',number or '') + windower.add_to_chat(color, msg) + end elseif T{206}:contains(am.message_id) and condensetargets then -- Wears off messages -- Condenses across multiple packets local status From 25e997ca03652d7c58826a6d62b948fed7589101 Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 11 Oct 2019 11:37:15 +0200 Subject: [PATCH 2/3] Update battlemod.lua --- addons/battlemod/battlemod.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/battlemod/battlemod.lua b/addons/battlemod/battlemod.lua index 83e6ddd41..a96afd436 100644 --- a/addons/battlemod/battlemod.lua +++ b/addons/battlemod/battlemod.lua @@ -259,7 +259,7 @@ windower.register_event('incoming chunk',function (id,original,modified,is_injec if not check_filter(actor,target,0,am.message_id) then return true end if not actor or not target then -- If the actor or target table is nil, ignore the packet - elseif T{800}:contains(am.message_id) then -- Spirit bond message + elseif am.message_id == 800 then -- Spirit bond message local Self = windower.ffxi.get_player() local status = color_it(res.buffs[am.param_1][language],color_arr.statuscol) local targ = color_it(target.name or '',color_arr[target.owner or target.type]) @@ -278,7 +278,7 @@ windower.register_event('incoming chunk',function (id,original,modified,is_injec :gsub('${number}',number or '') windower.add_to_chat(color, msg) end - elseif T{206}:contains(am.message_id) and condensetargets then -- Wears off messages + elseif am.message_id == 206 and condensetargets then -- Wears off messages -- Condenses across multiple packets local status From e9861a516fca1c44746e02a8bbc71350c589884f Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 11 Oct 2019 19:22:59 +0200 Subject: [PATCH 3/3] Update battlemod.lua --- addons/battlemod/battlemod.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/battlemod/battlemod.lua b/addons/battlemod/battlemod.lua index a96afd436..494ed3fc3 100644 --- a/addons/battlemod/battlemod.lua +++ b/addons/battlemod/battlemod.lua @@ -260,7 +260,6 @@ windower.register_event('incoming chunk',function (id,original,modified,is_injec if not actor or not target then -- If the actor or target table is nil, ignore the packet elseif am.message_id == 800 then -- Spirit bond message - local Self = windower.ffxi.get_player() local status = color_it(res.buffs[am.param_1][language],color_arr.statuscol) local targ = color_it(target.name or '',color_arr[target.owner or target.type]) local number = am.param_2