Skip to content

Commit

Permalink
Fix bug with defintions with capital letters causing a NPE.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Jul 15, 2013
1 parent dbf5e3a commit 65d8928
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -94,7 +94,7 @@ public boolean execute(ScriptEntry scriptEntry) {
if (scriptEntry.getResidingQueue().context
.containsKey(m.group(1).toLowerCase()))
m.appendReplacement(sb,
scriptEntry.getResidingQueue().context.get(m.group(1)));
scriptEntry.getResidingQueue().context.get(m.group(1).toLowerCase()));

else m.appendReplacement(sb, "null");
}
Expand All @@ -104,15 +104,15 @@ public boolean execute(ScriptEntry scriptEntry) {

// Fill player/off-line player
if (aH.matchesValueArg("player", arg, aH.ArgumentType.String)) {
arg = TagManager.tag(scriptEntry.getPlayer(), scriptEntry.getNPC(), arg, false);
arg = TagManager.tag(scriptEntry.getPlayer(), scriptEntry.getNPC(), arg, false);
scriptEntry.setPlayer(dPlayer.valueOf(aH.getStringFrom(arg)));
}

// Fill NPCID/NPC argument
// Fill NPCID/NPC argument
else if (aH.matchesValueArg("npcid, npc", arg, aH.ArgumentType.String)) {
dB.echoDebug("...replacing the linked NPC.");
arg = TagManager.tag(scriptEntry.getPlayer(), scriptEntry.getNPC(), arg, false);

if (dNPC.matches(aH.getStringFrom(arg)))
scriptEntry.setNPC(dNPC.valueOf(aH.getStringFrom(arg)));
}
Expand Down

0 comments on commit 65d8928

Please sign in to comment.