LskTest.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. LSK_Test = {}
  2. LSK_Test.__index = LSK_Test
  3. local this = {}
  4. -- ------------------------------------------------------------- --
  5. -- 测试入口 @lua l_test_main
  6. function l_test_main(actor)
  7. jprint("-------- lua test main function --------")
  8. end
  9. -- ------------------------------------------------------------- --
  10. -- 校验是否可以进入跨服地图
  11. -- @lua l_test_chack_is_can_enter_cross_map 21000
  12. function l_test_chack_is_can_enter_cross_map(actor, map_id)
  13. local ret = CrossMap.canEnter(actor, map_id)
  14. this.jprint("检查是否可以进入跨服地图:", map_id, "result:", ret)
  15. end
  16. -- 初始化圣域BOSS缓存数据
  17. -- @lua l_test_sanctuary_boss_init_cache
  18. function l_test_sanctuary_boss_init_cache()
  19. SanctuaryBoss.initBossState()
  20. end
  21. -- 结算战盟更换盟主
  22. -- @lua l_test_finish_union_change_leader
  23. function l_test_finish_union_change_leader(actor)
  24. UnionChangeLeader.RunForLeader.finishRunforLeaderActor()
  25. end
  26. -- 战盟臂章最大等级缓存
  27. -- @lua l_test_union_armbands_init_cache
  28. function l_test_union_armbands_init_cache()
  29. UnionArmbands.serverStart()
  30. end
  31. -- 发起定点传送
  32. -- @lua l_test_transfer_within_map 210 180
  33. function l_test_transfer_within_map(actor, x, y)
  34. MapMoveTransfer.transferWithinMap(actor, { x, y })
  35. end
  36. -- 充值月卡礼包7001
  37. -- @lua l_month_gift_recharge_event 7001 1401
  38. function l_month_gift_recharge_event(actor, param, id)
  39. MonthGiftPack.rechargeEvent(actor, { ['parameter'] = param, ['id'] = id })
  40. end
  41. -- 领取月卡每日礼包
  42. -- @lua l_month_gift_req_recharge 1401
  43. function l_month_gift_req_recharge(actor, id)
  44. MonthGiftPack.reqRechargeAction(actor, _, "reward", { ["id"] = id })
  45. end
  46. -- ------------------------------------------------------------- --
  47. this.log_open = true
  48. function this.debug(...)
  49. if not this.log_open then
  50. return
  51. end
  52. gameDebug.print(...)
  53. end
  54. function this.jprint(...)
  55. if not this.log_open then
  56. return
  57. end
  58. if param == nil then
  59. param = "error! 输出内容为空. nil"
  60. end
  61. jprint(...)
  62. end