farmHandler.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var FarmHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. FarmHandler.prototype.myFarmInfoRequest = async(function(){
  12. return await(this.socket.requestAsync('farm.farmHandler.myFarmInfoRequest',{}));
  13. });
  14. FarmHandler.prototype.friendFarmInfoRequest = async(function(playerId){
  15. return await(this.socket.requestAsync('farm.farmHandler.friendFarmInfoRequest',{playerId:playerId}));
  16. });
  17. FarmHandler.prototype.friendLsRequest = async(function(){
  18. return await(this.socket.requestAsync('farm.farmHandler.friendLsRequest',{}));
  19. });
  20. FarmHandler.prototype.openRequest = async(function(blockId){
  21. return await(this.socket.requestAsync('farm.farmHandler.openRequest',{blockId:blockId}));
  22. });
  23. FarmHandler.prototype.sowRequest = async(function(blockId,seedCode){
  24. return await(this.socket.requestAsync('farm.farmHandler.sowRequest',{blockId:blockId,seedCode:seedCode}));
  25. });
  26. FarmHandler.prototype.cultivateFriendRequest = async(function(blockId,cultivateType,friendId){
  27. return await(this.socket.requestAsync('farm.farmHandler.cultivateFriendRequest',{blockId:blockId,cultivateType:cultivateType,friendId:friendId}));
  28. });
  29. FarmHandler.prototype.cultivateSelfRequest = async(function(blockId,cultivateType){
  30. return await(this.socket.requestAsync('farm.farmHandler.cultivateSelfRequest',{blockId:blockId,cultivateType:cultivateType}));
  31. });
  32. FarmHandler.prototype.stealRequest = async(function(blockId,friendId){
  33. return await(this.socket.requestAsync('farm.farmHandler.stealRequest',{blockId:blockId,friendId:friendId}));
  34. });
  35. FarmHandler.prototype.harvestRequest = async(function(blockId){
  36. return await(this.socket.requestAsync('farm.farmHandler.harvestRequest',{blockId:blockId}));
  37. });
  38. FarmHandler.prototype.getShopInfoRequest = async(function(){
  39. return await(this.socket.requestAsync('farm.farmHandler.getShopInfoRequest',{}));
  40. });
  41. FarmHandler.prototype.changeShopItemRequest = async(function(itemId){
  42. return await(this.socket.requestAsync('farm.farmHandler.changeShopItemRequest',{itemId:itemId}));
  43. });
  44. module.exports = FarmHandler;