forked from OpenNeo/impress
fix outfit loading only setting correct pet state on the first try
This commit is contained in:
parent
8403fdf888
commit
06c3150ad0
2 changed files with 6 additions and 2 deletions
|
@ -695,7 +695,7 @@ View.PetStateForm = function (wardrobe) {
|
||||||
label.appendTo(li);
|
label.appendTo(li);
|
||||||
li.appendTo(ul);
|
li.appendTo(ul);
|
||||||
}
|
}
|
||||||
updatePetState(wardrobe.outfit.pet_state);
|
updatePetState(wardrobe.outfit.getPetState());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -745,8 +745,8 @@ function Wardrobe() {
|
||||||
function setFullOutfit(new_outfit) {
|
function setFullOutfit(new_outfit) {
|
||||||
outfit = new_outfit;
|
outfit = new_outfit;
|
||||||
controller.in_transaction = true;
|
controller.in_transaction = true;
|
||||||
controller.setPetTypeByColorAndSpecies(outfit.color_id, outfit.species_id);
|
|
||||||
controller.setPetStateById(outfit.pet_state_id);
|
controller.setPetStateById(outfit.pet_state_id);
|
||||||
|
controller.setPetTypeByColorAndSpecies(outfit.color_id, outfit.species_id);
|
||||||
controller.setClosetItemsByIds(outfit.getClosetItemIds());
|
controller.setClosetItemsByIds(outfit.getClosetItemIds());
|
||||||
controller.setWornItemsByIds(outfit.getWornItemIds());
|
controller.setWornItemsByIds(outfit.getWornItemIds());
|
||||||
controller.events.trigger('setOutfit', outfit);
|
controller.events.trigger('setOutfit', outfit);
|
||||||
|
@ -774,6 +774,10 @@ function Wardrobe() {
|
||||||
return outfit;
|
return outfit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.getPetState = function () {
|
||||||
|
return outfit.pet_state;
|
||||||
|
}
|
||||||
|
|
||||||
this.getPetType = function () {
|
this.getPetType = function () {
|
||||||
return outfit.pet_type;
|
return outfit.pet_type;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue