playerHandler.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var PlayerHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. PlayerHandler.prototype.getPlayerPositionRequest = async(function(s2c_playerId){
  12. return await(this.socket.requestAsync('area.playerHandler.getPlayerPositionRequest',{s2c_playerId:s2c_playerId}));
  13. });
  14. PlayerHandler.prototype.transportRequest = async(function(c2s_transportId){
  15. return await(this.socket.requestAsync('area.playerHandler.transportRequest',{c2s_transportId:c2s_transportId}));
  16. });
  17. PlayerHandler.prototype.enterSceneRequest = async(function(c2s_instanceId){
  18. return await(this.socket.requestAsync('area.playerHandler.enterSceneRequest',{c2s_instanceId:c2s_instanceId}));
  19. });
  20. PlayerHandler.prototype.queryLoadWayRequest = async(function(c2s_areaId,c2s_pointId){
  21. return await(this.socket.requestAsync('area.playerHandler.queryLoadWayRequest',{c2s_areaId:c2s_areaId,c2s_pointId:c2s_pointId}));
  22. });
  23. PlayerHandler.prototype.pickItemRequest = async(function(c2s_instanceId,c2s_itemId){
  24. return await(this.socket.requestAsync('area.playerHandler.pickItemRequest',{c2s_instanceId:c2s_instanceId,c2s_itemId:c2s_itemId}));
  25. });
  26. PlayerHandler.prototype.changeAreaRequest = async(function(c2s_pointId,c2s_type){
  27. return await(this.socket.requestAsync('area.playerHandler.changeAreaRequest',{c2s_pointId:c2s_pointId,c2s_type:c2s_type}));
  28. });
  29. PlayerHandler.prototype.transByAreaIdRequest = async(function(c2s_areaId,c2s_type,c2s_dungeonId){
  30. return await(this.socket.requestAsync('area.playerHandler.transByAreaIdRequest',{c2s_areaId:c2s_areaId,c2s_type:c2s_type,c2s_dungeonId:c2s_dungeonId}));
  31. });
  32. PlayerHandler.prototype.changeAreaXYRequest = async(function(mapId,posx,posy,instanceId){
  33. return await(this.socket.requestAsync('area.playerHandler.changeAreaXYRequest',{mapId:mapId,posx:posx,posy:posy,instanceId:instanceId}));
  34. });
  35. PlayerHandler.prototype.changeAreaByTaskRequest = async(function(mapId,taskId,posx,posy,point){
  36. return await(this.socket.requestAsync('area.playerHandler.changeAreaByTaskRequest',{mapId:mapId,taskId:taskId,posx:posx,posy:posy,point:point}));
  37. });
  38. PlayerHandler.prototype.recentContactsRequest = async(function(c2s_ids){
  39. return await(this.socket.requestAsync('area.playerHandler.recentContactsRequest',{c2s_ids:c2s_ids}));
  40. });
  41. PlayerHandler.prototype.ChangePkModelRequest = async(function(c2s_model){
  42. return await(this.socket.requestAsync('area.playerHandler.ChangePkModelRequest',{c2s_model:c2s_model}));
  43. });
  44. PlayerHandler.prototype.reliveSendPosRequest = async(function(){
  45. return await(this.socket.requestAsync('area.playerHandler.reliveSendPosRequest',{}));
  46. });
  47. PlayerHandler.prototype.reliveRequest = async(function(type){
  48. return await(this.socket.requestAsync('area.playerHandler.reliveRequest',{type:type}));
  49. });
  50. PlayerHandler.prototype.getAreaLinesRequest = async(function(){
  51. return await(this.socket.requestAsync('area.playerHandler.getAreaLinesRequest',{}));
  52. });
  53. PlayerHandler.prototype.transByInstanceIdRequest = async(function(c2s_instanceId){
  54. return await(this.socket.requestAsync('area.playerHandler.transByInstanceIdRequest',{c2s_instanceId:c2s_instanceId}));
  55. });
  56. PlayerHandler.prototype.lookUpOtherPlayerRequest = async(function(c2s_playerId,c2s_type,c2s_serverId){
  57. return await(this.socket.requestAsync('area.playerHandler.lookUpOtherPlayerRequest',{c2s_playerId:c2s_playerId,c2s_type:c2s_type,c2s_serverId:c2s_serverId}));
  58. });
  59. PlayerHandler.prototype.agreeRebirthRequest = async(function(){
  60. return await(this.socket.requestAsync('area.playerHandler.agreeRebirthRequest',{}));
  61. });
  62. PlayerHandler.prototype.cdkRequest = async(function(c2s_cdk,c2s_channel){
  63. return await(this.socket.requestAsync('area.playerHandler.cdkRequest',{c2s_cdk:c2s_cdk,c2s_channel:c2s_channel}));
  64. });
  65. PlayerHandler.prototype.setCustomConfigRequest = async(function(c2s_key,c2s_value){
  66. return await(this.socket.requestAsync('area.playerHandler.setCustomConfigRequest',{c2s_key:c2s_key,c2s_value:c2s_value}));
  67. });
  68. PlayerHandler.prototype.leaveAreaRequest = async(function(){
  69. return await(this.socket.requestAsync('area.playerHandler.leaveAreaRequest',{}));
  70. });
  71. PlayerHandler.prototype.getSimulateDropByTcRequest = async(function(c2s_tcCode,c2s_tcCount,c2s_tcLevel){
  72. return await(this.socket.requestAsync('area.playerHandler.getSimulateDropByTcRequest',{c2s_tcCode:c2s_tcCode,c2s_tcCount:c2s_tcCount,c2s_tcLevel:c2s_tcLevel}));
  73. });
  74. PlayerHandler.prototype.getClassEventConditionRequest = async(function(){
  75. return await(this.socket.requestAsync('area.playerHandler.getClassEventConditionRequest',{}));
  76. });
  77. PlayerHandler.prototype.clientReadyRequest = async(function(){
  78. return await(this.socket.requestAsync('area.playerHandler.clientReadyRequest',{}));
  79. });
  80. PlayerHandler.prototype.sendGMCmdRequest = async(function(c2s_msg){
  81. return await(this.socket.requestAsync('area.playerHandler.sendGMCmdRequest',{c2s_msg:c2s_msg}));
  82. });
  83. PlayerHandler.prototype.battleEventNotify = function(c2s_data){
  84. return this.socket.notify('area.playerHandler.battleEventNotify',{c2s_data:c2s_data});
  85. };
  86. PlayerHandler.prototype.onClientConfigPush = function(cb){
  87. this.socket.on('area.playerPush.clientConfigPush',cb);
  88. }
  89. PlayerHandler.prototype.onBattleEventPush = function(cb){
  90. this.socket.on('area.playerPush.battleEventPush',cb);
  91. }
  92. PlayerHandler.prototype.onBattleClearPush = function(cb){
  93. this.socket.on('area.playerPush.battleClearPush',cb);
  94. }
  95. PlayerHandler.prototype.onOnSuperScriptPush = function(cb){
  96. this.socket.on('area.playerPush.onSuperScriptPush',cb);
  97. }
  98. PlayerHandler.prototype.onChangeAreaPush = function(cb){
  99. this.socket.on('area.playerPush.changeAreaPush',cb);
  100. }
  101. PlayerHandler.prototype.onPlayerDynamicPush = function(cb){
  102. this.socket.on('area.playerPush.playerDynamicPush',cb);
  103. }
  104. PlayerHandler.prototype.onPlayerRelivePush = function(cb){
  105. this.socket.on('area.playerPush.playerRelivePush',cb);
  106. }
  107. PlayerHandler.prototype.onPlayerSaverRebirthPush = function(cb){
  108. this.socket.on('area.playerPush.playerSaverRebirthPush',cb);
  109. }
  110. PlayerHandler.prototype.onSimulateDropPush = function(cb){
  111. this.socket.on('area.playerPush.simulateDropPush',cb);
  112. }
  113. PlayerHandler.prototype.onKickPlayerPush = function(cb){
  114. this.socket.on('area.playerPush.kickPlayerPush',cb);
  115. }
  116. PlayerHandler.prototype.onSuitPropertyUpPush = function(cb){
  117. this.socket.on('area.playerPush.suitPropertyUpPush',cb);
  118. }
  119. PlayerHandler.prototype.onCommonPropertyPush = function(cb){
  120. this.socket.on('area.playerPush.commonPropertyPush',cb);
  121. }
  122. PlayerHandler.prototype.onBuffPropertyPush = function(cb){
  123. this.socket.on('area.playerPush.buffPropertyPush',cb);
  124. }
  125. PlayerHandler.prototype.onPlayerBattleAttributePush = function(cb){
  126. this.socket.on('area.playerPush.playerBattleAttributePush',cb);
  127. }
  128. PlayerHandler.prototype.onPayGiftStatePush = function(cb){
  129. this.socket.on('area.playerPush.payGiftStatePush',cb);
  130. }
  131. PlayerHandler.prototype.onPlayerNoticeMsgPush = function(cb){
  132. this.socket.on('area.playerPush.playerNoticeMsgPush',cb);
  133. }
  134. PlayerHandler.prototype.onPlayerSameMapTransPush = function(cb){
  135. this.socket.on('area.playerPush.playerSameMapTransPush',cb);
  136. }
  137. module.exports = PlayerHandler;