Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 6 : function (event) { // list rooms
- var navId = event.readInteger();
- var roomCount = event.readInteger();
- logging.logConsole('LOAD NAV ID: ' + navId + ' / ROOMS COUNT: ' + roomCount);
- clearInterval(window.navLoadingBlink);
- setTimeout(function(){
- $('#navigator #roomListing').empty();
- }, 150);
- if (roomCount < 1) {
- setTimeout(function(){
- $('#navigator #roomListing').append(
- '<span id="navLoading" style="display:block;cursor:default;margin-left:-43px;margin-top:-28px">keine Räume gefunden</span>'
- );
- }, 300);
- } else {
- setTimeout(function(){
- var cl = 'after';
- var x = '';
- for (var i = 0; i < roomCount; i++) {
- var roomId = event.readInteger();
- var roomName = event.readString();
- x += '<div id="roomListObject" class="' + cl + '">' + roomName + '</div>';
- cl = (cl == 'after' ? '' : 'after');
- }
- $('#navigator #roomListing').append('<div id="listing"></div>');
- if (roomCount > 0) {
- $('#navigator #roomListing #listing').css({'width':'276.5px'});
- $('#navigator #roomListing #listing').css({'max-height':'365px'});
- $('#navigator #roomListing #listing').css({'overflow':'hidden'});
- $('#navigator #roomListing #listing').css({'overflow-x':'hidden'});
- }
- $('#navigator #roomListing #listing').append(
- x
- );
- $('#navigator #roomListing').append(
- '<div id="panel" style="position:absolute;right:10px;top:85px"><div class="panelTopButton"></div><div class="panelFill"></div><div class="panelButtomButton"></div></div>'
- );
- }, 300);
- }
- },
- 7 : function (event) { // set coins
- var coins = event.readInteger();
- $('#game #infotools #coinsbox .val').html(coins == 0 ? '<u>Kaufen</u>' : coins);
- }
- },
- handleMessage : function(msg) {
- var data = msg.data;
- if (messageHandler.rc4Key != '') {
- data = rc4(messageHandler.rc4Key, data);
- }
- var event = new MessageEvent(data);
- logging.logConsole('Rec. message with id ' + event.id + ((typeof messageHandler.messages[event.id] != 'undefined') ? ' (HANDLING..)' : ''));
- if (typeof messageHandler.messages[event.id] != 'undefined') messageHandler.messages[event.id](event);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement