Handler.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. local ShopLogic = require("shop.ShopLogic")
  2. -- 查询商店物品
  3. function CG_SHOP_QUERY(human, msg)
  4. ShopLogic.query(human, msg.shopType)
  5. end
  6. -- 刷新商店物品
  7. function CG_SHOP_REFRESH(human, msg)
  8. ShopLogic.refresh(human, msg.shopType)
  9. end
  10. -- 购买物品
  11. function CG_SHOP_BUY(human, msg)
  12. ShopLogic.buy(human, msg.shopType, msg.itemID, msg.itemIndex, msg.buyCnt)
  13. end
  14. -- 查询基础商店中随机商店中记录的道具列表
  15. function CG_SHOP_RECORD_QUERY(human, msg)
  16. ShopLogic.RecordItems_Query(human, msg.shopType)
  17. end
  18. -- 记录基础商店中随机商店中记录的道具列表
  19. function CG_SHOP_RECORD_ITEMS(human, msg)
  20. ShopLogic.RecordItems(human, msg.itemIdxStr, msg.shopType)
  21. end
  22. -- 基础商店中随机商店中所有道具
  23. function CG_SHOP_ALL_ITEM_QUERY(human, msg)
  24. ShopLogic.AllItem_Query(human, msg.shopType)
  25. end
  26. function CG_SHOP_CHOSE_ITEM(human, msg)
  27. ShopLogic.ChoseItem(human, msg.shopType, msg.bChose, msg.itemIndex)
  28. end
  29. function CG_BUY_LIFTTIME_CARD(human, msg)
  30. ShopLogic.GetBuyLiftTimeCard(human)
  31. end