DPSMate icon indicating copy to clipboard operation
DPSMate copied to clipboard

[fix] HoT parser indexing

Open MichalKalinec opened this issue 4 years ago • 5 comments

Resolves #236 Resolves #213

MichalKalinec avatar Apr 19 '20 11:04 MichalKalinec

Isn't this just reverting #232 ? Merging this PR may reopen other issues like #228 and #231 .

armoha avatar Jun 01 '20 11:06 armoha

Good point, I didn't test it with pets, but seems like you're right. I guess this issue needs more complex modification to distinct between players and pets? Unfortunately I don't really know Lua and WoW addons well enough to make this work for both cases...

MichalKalinec avatar Jun 02 '20 16:06 MichalKalinec

Here's what I did to make the errors go away:

if amount==nil then amount=0 end before amount is used. I don't know if it's parsing correctly, but it's close enough for me.

trumpetx avatar Apr 20 '21 12:04 trumpetx

#232 only fix it for a pet name of length 5 the variable k should be set to the start of the heal value when a pet is found (that's when " gains " is found) I didn't test it

function DPSMate.Parser:SpellPeriodicSelfBuff(msg)
-	local i,j,k = 0,0,12
+	local i,j,k = 0,0,10
	local nextword, choice;
	nextword, choice, k = GetNextWord(msg, k, SPSBChoices, false)
	if choice == -1 then
		local debug = DPSMate.Debug and DPSMate.Debug:Store("18: Event not parsed yet => "..msg) or DPSMate:SendMessage("18: Event not parsed yet, inform Shino! => "..msg)
		return
	end
	
	if choice <= 2 then
		local source = Player;
		local i,j = strfind(nextword, " gains ", 1, true)
		if i and j then
			source = strsub(nextword, 1, i-1);
			nextword = strsub(nextword, j+1);
+			k = i + 7
		end

sipertruk avatar Jul 31 '21 23:07 sipertruk

It will not fix it. Wrong logic....

laytya avatar Jul 15 '22 05:07 laytya

Closing it for now.

tdymel avatar Nov 09 '22 07:11 tdymel