Added character restore functionality

This commit is contained in:
Stefan Zermatten
2019-02-11 11:58:45 +02:00
parent 1ebb0d2527
commit 23d43f7d43
4 changed files with 103 additions and 0 deletions

View File

@@ -81,4 +81,20 @@ Template.characterList.events({
returnElement: instance.find(`.party[data-id='${partyId}']`),
});
},
"click .restoreCharacter": function(event, instance) {
pushDialogStack({
template: "characterRestoreDialog",
element: event.currentTarget,
callback(dump){
if (!dump) return;
dump.character.name += " - Restored"
giveCharacterDumpNewIds(dump);
restoreCharacter(dump);
Router.go("characterSheet", {
_id: dump.character._id,
urlName: dump.character.urlName || '-',
});
},
})
},
});