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

50 lines
1.2 KiB

  1. --宠物信息
  2. PetVo = PetVo or BaseClass(BaseVo)
  3. function PetVo:__init()
  4. end
  5. function PetVo:__defineVar()
  6. return {
  7. _class_type = self,
  8. --_cid = self._id,
  9. _iid = _in_obj_ins_id,
  10. _use_delete_method = false,
  11. vo_type = SceneBaseType.Pet,
  12. pos_x = 0, --X像素坐标(int16)
  13. pos_y = 0, --Y像素坐标(int16)
  14. hp = 100, --当前hp(int32)
  15. maxHp = 100, --最大hp(int32)
  16. name = "", --名字(string)
  17. move_speed = 160, --速度(int16)
  18. ghost_mode = 0,
  19. hide_flag = 0 , --是否不可见(int8)
  20. warGroup = 0, --战斗分组(int8)
  21. pet_id = 0, --宠物ID(int32)
  22. model_id = 0, --模型id
  23. texture_res = 0, --贴图
  24. poseState = PoseState.STAND,
  25. birth_angle = 270, --出生角度 水平向右为0 逆时针一圈为360度
  26. owner_id = 0, --所属玩家id
  27. }
  28. end
  29. function PetVo:SetVo(owner_id, pet_id)
  30. self.owner_id = owner_id
  31. self.pet_id = pet_id
  32. self.texture_res = 0
  33. end
  34. --取模型id
  35. function PetVo:GetPetClotheId()
  36. return self.pet_id
  37. end
  38. function PetVo:GetTextureId()
  39. if tonumber(self.texture_res) ~= 0 then
  40. return self:GetpetClotheId() .. "_" .. self.texture_res
  41. end
  42. end
  43. function PetVo:__delete()
  44. end