Files
Main/Assets/GameAssets/Resources/Lua/Logic/LoversFight/LoverInfo.lua
2025-01-25 04:38:09 +08:00

63 lines
1.3 KiB
Lua

------------------------------------------------
--作者: 王圣
--日期: 2021-07-15
--文件: LoverInfo.lua
--模块: LoverInfo
--描述: 仙侣信息
------------------------------------------------
local LoverInfo = {
--id
Id = 0,
--等级
Lv = 0,
--名字
Name = "",
--职业
Caree = 0,
--战力
Power = 0,
--外观
VsInfo = nil,
--是否准备
IsReady = false,
--是否拒绝
IsJuJue = false,
--头像Id
HeadId = 0,
--头像框Id
FrameHeadId = 0,
--自定义头像路径
HeadPicPath = "",
--是否使用自定义头像
IsShowHeadPic = false,
}
function LoverInfo:New()
local _m = Utils.DeepCopy(self)
return _m
end
function LoverInfo:ParseMsg(msg)
if msg == nil then
return
end
self.Id = msg.id
self.Name = msg.name
self.Caree = msg.occupation
self.Power = msg.power
self.Lv = msg.level
if msg.facade ~= nil then
self.VsInfo = PlayerVisualInfo:New()
self.VsInfo:ParseByLua(msg.facade, 0)
end
--解析头像数据
if msg.head ~= nil then
self.HeadId = msg.head.fashionHead
self.FrameHeadId = msg.head.fashionFrame
self.HeadPicPath = msg.head.customHeadPath
self.IsShowHeadPic = msg.head.useCustomHead
self.IsReady = false
end
end
return LoverInfo