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