Fix textAttribute in save
This commit is contained in:
parent
6956a27544
commit
3a50fb9330
@ -2368,6 +2368,8 @@ control.prototype.loadData = function (data, callback) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.status.textAttribute = core.getFlag('textAttribute') || core.status.textAttribute || core.initStatus.textAttribute;
|
||||||
|
|
||||||
// load icons
|
// load icons
|
||||||
var icon = core.getFlag("heroIcon", "hero.png");
|
var icon = core.getFlag("heroIcon", "hero.png");
|
||||||
if (core.isset(core.material.images.images[icon])) {
|
if (core.isset(core.material.images.images[icon])) {
|
||||||
|
|||||||
@ -356,6 +356,7 @@ events.prototype.doAction = function() {
|
|||||||
if (core.isset(data.time)) {
|
if (core.isset(data.time)) {
|
||||||
core.status.textAttribute.time=data.time;
|
core.status.textAttribute.time=data.time;
|
||||||
}
|
}
|
||||||
|
core.setFlag('textAttribute', core.status.textAttribute);
|
||||||
core.events.doAction();
|
core.events.doAction();
|
||||||
break;
|
break;
|
||||||
case "tip":
|
case "tip":
|
||||||
|
|||||||
@ -113,6 +113,7 @@ items.prototype.getEquip = function (equipType) {
|
|||||||
////// 设置某个物品的个数 //////
|
////// 设置某个物品的个数 //////
|
||||||
items.prototype.setItem = function (itemId, itemNum) {
|
items.prototype.setItem = function (itemId, itemNum) {
|
||||||
itemNum = itemNum || 0;
|
itemNum = itemNum || 0;
|
||||||
|
if (itemNum<=0) itemNum = 0;
|
||||||
var itemCls = core.material.items[itemId].cls;
|
var itemCls = core.material.items[itemId].cls;
|
||||||
if (itemCls == 'items') return;
|
if (itemCls == 'items') return;
|
||||||
if (!core.isset(core.status.hero.items[itemCls])) {
|
if (!core.isset(core.status.hero.items[itemCls])) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user