BasicTool.h 814 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "BasicItems.h"
  3. #include "Item.h"
  4. class BasicToolItemType;
  5. class BasicToolItem : public Item
  6. {
  7. private:
  8. int headMaterial;
  9. int rodMaterial;
  10. protected:
  11. virtual void updateBasedOnUsedMaterial();
  12. public:
  13. BasicToolItem(int itemTypeId, const char* name);
  14. void setHeadMaterial(int headMaterial);
  15. void setRodMaterial(int rodMaterial);
  16. friend BasicToolItemType;
  17. };
  18. class BasicToolItemType : public ItemType
  19. {
  20. protected:
  21. BasicToolItemType(int id,
  22. const char* name,
  23. ItemSkillLevelUpRule* levelUpRule,
  24. int brokenTypeId,
  25. ModelInfo model);
  26. virtual void loadSuperItem(
  27. Item* zItem, Framework::StreamReader* zReader) const;
  28. virtual void saveSuperItem(
  29. const Item* zItem, Framework::StreamWriter* zWriter) const;
  30. };