Window_Base.prototype.obtainItemParam = function(textState) {
var data = textState.text.slice(textState.index).match(/^\[(\d+)]/);
if (!data || !$gameVariables.value(+RegExp.$1) || !$dataItems[$gameVariables.value(+RegExp.$1)]) return '';
textState.index += data[0].length;
return $dataItems[$gameVariables.value(+RegExp.$1)].iconIndex;
};
var XrDate_WBprocessEscapeCharacter = Window_Base.prototype.processEscapeCharacter;
Window_Base.prototype.processEscapeCharacter = function(code, textState) {
XrDate_WBprocessEscapeCharacter.call(this,code,textState);
if (code === 'IV') this.processDrawIcon(this.obtainItemParam(textState), textState);
};
Window_Base.prototype.obtainItemParam = function(textState) {
var data = textState.text.slice(textState.index).match(/^\[(\d+)]/);
if (!data || !$gameVariables.value(+RegExp.$1) || !$dataItems[$gameVariables.value(+RegExp.$1)]) return '';
textState.index += data[0].length;
return $dataItems[$gameVariables.value(+RegExp.$1)].iconIndex;
};
var XrDate_WBprocessEscapeCharacter = Window_Base.prototype.processEscapeCharacter;
Window_Base.prototype.processEscapeCharacter = function(code, textState) {
XrDate_WBprocessEscapeCharacter.call(this,code,textState);
if (code === 'IV') this.processDrawIcon(this.obtainItemParam(textState), textState);
};