mapHandler.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var MapHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. MapHandler.prototype.genterSceneByAreaIdRequest = async(function(c2s_areaId){
  12. return await(this.socket.requestAsync('area.mapHandler.genterSceneByAreaIdRequest',{c2s_areaId:c2s_areaId}));
  13. });
  14. MapHandler.prototype.getWorldMapListRequest = async(function(){
  15. return await(this.socket.requestAsync('area.mapHandler.getWorldMapListRequest',{}));
  16. });
  17. MapHandler.prototype.getPlayerListRequest = async(function(){
  18. return await(this.socket.requestAsync('area.mapHandler.getPlayerListRequest',{}));
  19. });
  20. MapHandler.prototype.getMonsterListRequest = async(function(){
  21. return await(this.socket.requestAsync('area.mapHandler.getMonsterListRequest',{}));
  22. });
  23. MapHandler.prototype.getNpcListRequest = async(function(){
  24. return await(this.socket.requestAsync('area.mapHandler.getNpcListRequest',{}));
  25. });
  26. MapHandler.prototype.getMapListRequest = async(function(c2s_mapId){
  27. return await(this.socket.requestAsync('area.mapHandler.getMapListRequest',{c2s_mapId:c2s_mapId}));
  28. });
  29. MapHandler.prototype.getAliveMonsterLineInfoRequest = async(function(){
  30. return await(this.socket.requestAsync('area.mapHandler.getAliveMonsterLineInfoRequest',{}));
  31. });
  32. MapHandler.prototype.onMapOpenInfoPush = function(cb){
  33. this.socket.on('area.mapPush.mapOpenInfoPush',cb);
  34. }
  35. module.exports = MapHandler;