battleHandler.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var BattleHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. BattleHandler.prototype.throwPointRequest = async(function(id,server_id,isQuit,type,count){
  12. return await(this.socket.requestAsync('area.battleHandler.throwPointRequest',{id:id,server_id:server_id,isQuit:isQuit,type:type,count:count}));
  13. });
  14. BattleHandler.prototype.onThrowPointItemListPush = function(cb){
  15. this.socket.on('area.battlePush.throwPointItemListPush',cb);
  16. }
  17. BattleHandler.prototype.onThrowPointResultPush = function(cb){
  18. this.socket.on('area.battlePush.throwPointResultPush',cb);
  19. }
  20. BattleHandler.prototype.onBiddingInfoPush = function(cb){
  21. this.socket.on('area.battlePush.biddingInfoPush',cb);
  22. }
  23. BattleHandler.prototype.onFightLevelResultPush = function(cb){
  24. this.socket.on('area.battlePush.fightLevelResultPush',cb);
  25. }
  26. BattleHandler.prototype.onItemDropPush = function(cb){
  27. this.socket.on('area.battlePush.itemDropPush',cb);
  28. }
  29. BattleHandler.prototype.onSceneNamePush = function(cb){
  30. this.socket.on('area.battlePush.sceneNamePush',cb);
  31. }
  32. BattleHandler.prototype.onResourceDungeonResultPush = function(cb){
  33. this.socket.on('area.battlePush.resourceDungeonResultPush',cb);
  34. }
  35. module.exports = BattleHandler;