--宠物信息 StarSoulVo = StarSoulVo or BaseClass(BaseVo) local StarSoulVo = StarSoulVo function StarSoulVo:__init() end function StarSoulVo:__defineVar() return { _class_type = self, --_cid = self._id, _iid = _in_obj_ins_id, _use_delete_method = false, vo_type = SceneBaseType.StarSoul, 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) follow_pet_id = 0, --ID(int32) follow_pet_stage = 0, --宠物阶数 model_id = 0, --模型id texture_res = 0, --贴图 poseState = PoseState.STAND, birth_angle = 270, --出生角度 水平向右为0 逆时针一圈为360度 owner_id = 0, --所属玩家id } end function StarSoulVo:SetVo(owner_id, follow_pet_id,follow_pet_stage) self.owner_id = owner_id self.follow_pet_id = follow_pet_id self.follow_pet_stage = follow_pet_stage self.texture_res = 0 end --取模型id function StarSoulVo:GetStarSoulClotheId() local cfg = Config.Pet if cfg then local key = self.follow_pet_id.."@"..self.follow_pet_stage.."@1" return cfg[key] and cfg[key].figure_id or 0 end return 0 end function StarSoulVo:GetTextureId() if tonumber(self.texture_res) ~= 0 then return self:GetStarSoulClotheId() .. "_" .. self.texture_res end end function StarSoulVo:__delete() end