Skip to content

Commit

Permalink
Update 5th Edition OGL by Roll20 Companion.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveKoontz committed Sep 13, 2016
1 parent bc69cf8 commit 9319444
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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") {
Expand Down Expand Up @@ -440,4 +440,4 @@ on('ready', function() {
if(!state.FifthEditionOGLbyRoll20.ammotracking) {
state.FifthEditionOGLbyRoll20.ammotracking = "on";
}
});
});

0 comments on commit 9319444

Please sign in to comment.