From 9319444c00785a63d05c8c3cb9b48703dcf571b7 Mon Sep 17 00:00:00 2001 From: SteveKoontz Date: Tue, 13 Sep 2016 09:09:30 -0700 Subject: [PATCH] Update 5th Edition OGL by Roll20 Companion.js --- .../1.3/5th Edition OGL by Roll20 Companion.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/5th Edition OGL by Roll20 Companion/1.3/5th Edition OGL by Roll20 Companion.js b/5th Edition OGL by Roll20 Companion/1.3/5th Edition OGL by Roll20 Companion.js index f4ce7c79b6..c52928d872 100644 --- a/5th Edition OGL by Roll20 Companion/1.3/5th Edition OGL by Roll20 Companion.js +++ b/5th Edition OGL by Roll20 Companion/1.3/5th Edition OGL by Roll20 Companion.js @@ -34,7 +34,7 @@ on('chat:message', function(msg) { else if(msg.playerid.toLowerCase() != "api" && msg.rolltemplate) { var cnamebase = msg.content.split("charname=")[1]; var cname = cnamebase ? cnamebase.replace('}}','').trim() : (msg.content.split("{{name=")[1]||'').split("}}")[0].trim(); - var character = cname ? findObjs({name: cname})[0] : undefined; + var character = cname ? findObjs({name: cname, type: 'character'})[0] : undefined; var player = getObj("player", msg.playerid); if(["simple","npc"].indexOf(msg.rolltemplate) > -1) { if(_.has(msg,'inlinerolls') && msg.content.indexOf("DEATH SAVE") > -1 && character && state.FifthEditionOGLbyRoll20.deathsavetracking != "off") { @@ -440,4 +440,4 @@ on('ready', function() { if(!state.FifthEditionOGLbyRoll20.ammotracking) { state.FifthEditionOGLbyRoll20.ammotracking = "on"; } -}); \ No newline at end of file +});