源战役客户端
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.

24 lines
614 B

  1. BattleProtoVo = BattleProtoVo or {}
  2. local BattleProtoVo = BattleProtoVo
  3. --[[ int:32 hp
  4. int:32 hp上限
  5. int:16 ()
  6. int:16
  7. attr ]]
  8. BattleProtoVo.pro_list = {
  9. [1] = {"hp","l"}
  10. ,[2] = {"maxHp","l"}
  11. ,[3] = {"move_speed","h"}
  12. }
  13. function BattleProtoVo.ReadFmt(target)
  14. local vo = nil
  15. for i = 1, #BattleProtoVo.pro_list do
  16. vo = BattleProtoVo.pro_list[i]
  17. if target.ChangeVar then
  18. target:ChangeVar(vo[1], UserMsgAdapter.ReadFmt(vo[2]))
  19. else
  20. target[vo[1]] = UserMsgAdapter.ReadFmt(vo[2])
  21. end
  22. end
  23. BaseAttrProtoVo.ReadFmt(target)
  24. end