Add guid to window.PLAYER and add constant MAX_RESO_PER_PLAYER

This commit is contained in:
Xelio
2013-03-03 22:42:51 +08:00
parent 4926b5450c
commit 5f94d56578
3 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,17 @@ window.getPlayerName = function(guid) {
return '{'+guid.slice(0, 12)+'}';
}
window.playerNameToGuid = function(playerName){
var guid = null;
$.each(Object.keys(localStorage), function(ind,key) {
if(playerName === localStorage[key]) {
guid = key;
return false;
}
});
return guid;
}
// resolves all player GUIDs that have been added to the list. Reruns
// renderPortalDetails when finished, so that then-unresolved names
// get replaced by their correct versions.