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

60 lines
1.7 KiB

--宠物副本协战宠物信息
AssisitPokemonVo = AssisitPokemonVo or BaseClass(BaseVo)
local AssisitPokemonVo = AssisitPokemonVo
function AssisitPokemonVo:__init()
end
function AssisitPokemonVo:__defineVar()
return {
_class_type = self,
--_cid = self._id,
_iid = _in_obj_ins_id,
_use_delete_method = false,
vo_type = SceneBaseType.Pokemon,
pos_x = 0, --X像素坐标(int16)
pos_y = 0, --Y像素坐标(int16)
hp = 100, --当前hp(int32)
maxHp = 100, --最大hp(int32)
name = "", --名字(string)
move_speed = 450, --速度(int16)
ghost_mode = 0,
hide_flag = 0, --是否不可见(int8)
warGroup = 0, --战斗分组(int8)
pokemon_id = 0, --ID(int32)
pokemon_star = 0, --宠物阶数
model_id = 0, --模型id
texture_res = 0, --贴图
poseState = PoseState.STAND,
birth_angle = 270, --出生角度 水平向右为0 逆时针一圈为360度
owner_id = 0, --所属玩家id
}
end
function AssisitPokemonVo:SetVo(owner_id, pokemon_id,pokemon_star,index)
self.owner_id = owner_id
self.pokemon_id = pokemon_id
self.pokemon_star = pokemon_star
self.pokemon_index = index
self.texture_res = 0
end
--取模型id
function AssisitPokemonVo:GetPokemonClotheId()
local cfg = Config.Pet
if cfg then
local key = self.pokemon_id.."@"..self.pokemon_star
return cfg[key] and cfg[key].figure_id or 0
end
return 0
end
function AssisitPokemonVo:GetTextureId()
if tonumber(self.texture_res) ~= 0 then
return self:GetPokemonClotheId() .. "_" .. self.texture_res
end
end
function AssisitPokemonVo:__delete()
end