源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 line
961 B

  1. --[[
  2. --数值类型映射到真实物品类型id
  3. ():
  4. 0
  5. 1:
  6. 2:
  7. 3:
  8. 4:
  9. 5:
  10. 6:
  11. 7:
  12. 8:
  13. 9
  14. 100
  15. array(
  16. int:8 ()
  17. int:32 id(id)
  18. int:32
  19. )
  20. ]]
  21. CommonGoodsListVo = CommonGoodsListVo or {}
  22. CommonGoodsListVo.pro_list = {
  23. [1] = {"style","c"}
  24. ,[2] = {"typeId","i"}
  25. ,[3] = {"count","i"}
  26. }
  27. function CommonGoodsListVo.ReadFmt(target)
  28. local len = UserMsgAdapter.ReadFmt("h")
  29. target.goods_list = {}
  30. local vo = nil
  31. local list_vo = nil
  32. for i = 1, len do
  33. list_vo = {}
  34. for j = 1, #CommonGoodsListVo.pro_list do
  35. vo = CommonGoodsListVo.pro_list[j]
  36. list_vo[vo[1]] = UserMsgAdapter.ReadFmt(vo[2])
  37. end
  38. table.insert(target.goods_list, list_vo)
  39. end
  40. return target.goods_list
  41. end