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

25 lines
614 B

BattleProtoVo = BattleProtoVo or {}
local BattleProtoVo = BattleProtoVo
--[[ int:32 hp
int:32 hp上限
int:16 攻击距离(格子数)
int:16 移动速度
attr 基础属性]]
BattleProtoVo.pro_list = {
[1] = {"hp","l"}
,[2] = {"maxHp","l"}
,[3] = {"move_speed","h"}
}
function BattleProtoVo.ReadFmt(target)
local vo = nil
for i = 1, #BattleProtoVo.pro_list do
vo = BattleProtoVo.pro_list[i]
if target.ChangeVar then
target:ChangeVar(vo[1], UserMsgAdapter.ReadFmt(vo[2]))
else
target[vo[1]] = UserMsgAdapter.ReadFmt(vo[2])
end
end
BaseAttrProtoVo.ReadFmt(target)
end