From ac379d3dd0b82710d9cee70a921e8918df965bed Mon Sep 17 00:00:00 2001 From: Taracque Date: Fri, 8 Mar 2013 08:44:53 +0100 Subject: [PATCH] Fixed: More error check in CountPerson method --- Change_log.txt | 3 +++ Elementarist.lua | 8 ++++---- Elementarist.toc | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Change_log.txt b/Change_log.txt index 6c8f30f..46e3e99 100755 --- a/Change_log.txt +++ b/Change_log.txt @@ -1,3 +1,6 @@ +**v3.1.6** +* Fixed: More error check in CountPerson method + **v3.1.5** * Fixed: More error check in CountPerson method diff --git a/Elementarist.lua b/Elementarist.lua index 990e7c9..d7c3877 100755 --- a/Elementarist.lua +++ b/Elementarist.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Elementarist 3.1.5 +-- Elementarist 3.1.6 -- -- Shows the advised spell for an elemental shaman for optimal DPS output. ------------------------------------------------------------------------------- @@ -8,7 +8,7 @@ Elementarist = {Locals = {}} local L = Elementarist.Locals -Elementarist.versionNumber = '3.1.5'; +Elementarist.versionNumber = '3.1.6'; Elementarist.enabled = true; Elementarist.playerName = UnitName("player") Elementarist.playerGUID = UnitGUID("player") @@ -393,10 +393,10 @@ function Elementarist:CountPerson(time, event, sguid, sname, sflags, dguid, dnam local stype = 0; local dtype = 0; - if (sguid) then + if (sguid) and (sguid:sub(5,5)) and (tonumber(sguid:sub(5,5), 16)) then stype = (tonumber(sguid:sub(5,5), 16)) % 8; end - if (dguid) then + if (dguid) and (dguid:sub(5,5)) and (tonumber(dguid:sub(5,5), 16)) then dtype = (tonumber(dguid:sub(5,5), 16)) % 8; end if (bit.band(dflags, COMBATLOG_OBJECT_REACTION_HOSTILE) == COMBATLOG_OBJECT_REACTION_HOSTILE) and (bit.band(dflags, COMBATLOG_OBJECT_AFFILIATION_OUTSIDER) == COMBATLOG_OBJECT_AFFILIATION_OUTSIDER) and ((dtype==0) or (dtype==3)) then diff --git a/Elementarist.toc b/Elementarist.toc index d40ae2f..0ad7264 100755 --- a/Elementarist.toc +++ b/Elementarist.toc @@ -2,7 +2,7 @@ ## Title: Elementarist ## Notes: Elemental shaman spell rotation helper ## Author: Taracque, Felmosórongy of Arathor -## Version: 3.1.5 +## Version: 3.1.6 ## SavedVariables: ElementaristDB ## OptionalDeps: OmniCC, SpellFlash ## Dependencies: -- 1.7.9.5