|
|
@@ -84,10 +84,14 @@ define([ |
|
|
|
}, |
|
|
|
|
|
|
|
onGetItems: function (items) { |
|
|
|
items = items || this.items; |
|
|
|
|
|
|
|
if (!this.isInspecting) |
|
|
|
if (!this.isInspecting && items) |
|
|
|
this.items = items; |
|
|
|
else if (!this.isInspecting) |
|
|
|
items = this.items; |
|
|
|
else if (!this.result) |
|
|
|
return; |
|
|
|
else |
|
|
|
items = this.result.equipment; |
|
|
|
|
|
|
|
if (!this.shown) |
|
|
|
return; |
|
|
@@ -187,13 +191,12 @@ define([ |
|
|
|
|
|
|
|
onInspectTarget: function (result) { |
|
|
|
this.isInspecting = true; |
|
|
|
this.result = result; |
|
|
|
|
|
|
|
this.show(); |
|
|
|
|
|
|
|
this.result = result; |
|
|
|
|
|
|
|
this.onGetStats(result.stats); |
|
|
|
this.onGetItems(result.equipment); |
|
|
|
this.onGetStats(); |
|
|
|
this.onGetItems(); |
|
|
|
}, |
|
|
|
|
|
|
|
buildSlot: function (el, e) { |
|
|
@@ -367,12 +370,16 @@ define([ |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
onGetStats: function (stats ) { |
|
|
|
if (stats && !this.isInspecting) |
|
|
|
onGetStats: function (stats) { |
|
|
|
if (!this.isInspecting && stats) |
|
|
|
this.stats = stats; |
|
|
|
|
|
|
|
stats = stats || this.stats; |
|
|
|
|
|
|
|
else if (!this.isInspecting) |
|
|
|
stats = this.stats; |
|
|
|
else if (!this.result) |
|
|
|
return; |
|
|
|
else |
|
|
|
stats = this.result.stats; |
|
|
|
|
|
|
|
if (!this.shown) |
|
|
|
return; |
|
|
|
|
|
|
|