From 5ddd875399ddabec8d00af7d557c4a421def8bc6 Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 17 Apr 2016 17:54:13 +0800 Subject: [PATCH] avatar --- game/game.js | 1 + game/server.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/game/game.js b/game/game.js index 1a906eaab..02e0c546c 100755 --- a/game/game.js +++ b/game/game.js @@ -12836,6 +12836,7 @@ if(player.playerid){ if(!game.onlinezhu){ game.onlinezhu=player.playerid; + game.send('server','changeAvatar',player.nickname,player.avatar); } map[i]=[player.nickname,player.avatar,player.playerid]; if(player.playerid==game.onlinezhu){ diff --git a/game/server.js b/game/server.js index 478f519bc..8cae2a0e1 100644 --- a/game/server.js +++ b/game/server.js @@ -44,6 +44,11 @@ this.sendl('createroom'); } }, + changeAvatar:function(nickname,avatar){ + this.nickname=nickname; + this.avatar=avatar; + util.updaterooms(); + }, server:function(){ for(var i=0;i