Change guid format of resonator

Change:
Guid format of resonator change to following,
[portal guid]-resonator-[slot]

Some code cleanup
This commit is contained in:
Xelio
2013-02-10 22:52:11 +08:00
parent 6936ef1d05
commit 370f34a793
3 changed files with 7 additions and 16 deletions

View File

@ -148,7 +148,7 @@ window.getTypeByGuid = function(guid) {
// .c == player/creator
// .d == chat messages
//
// .r0~.r7 == resonators
// resonator guid is [portal guid]-resonator-[slot]
switch(guid.slice(33)) {
case '11':
case '12':
@ -166,17 +166,8 @@ window.getTypeByGuid = function(guid) {
case 'd':
return TYPE_CHAT;
case 'r0':
case 'r1':
case 'r2':
case 'r3':
case 'r4':
case 'r5':
case 'r6':
case 'r7':
return TYPE_RESONATOR;
default:
if(guid.slice(-11,-2) == 'resonator') return TYPE_RESONATOR;
return TYPE_UNKNOWN;
}
}