PlayerHand.h 861 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "ItemType.h"
  3. #include "ItemSkill.h"
  4. class PlayerHandItemType : public ItemType
  5. {
  6. REGISTRABLE(PlayerHandItemType)
  7. protected:
  8. void loadSuperItemSkill(ItemSkill* zSkill, Framework::StreamReader* zReader) const override;
  9. void saveSuperItemSkill(const ItemSkill* zSkill, Framework::StreamWriter* zWriter) const override;
  10. public:
  11. PlayerHandItemType();
  12. Item* createItem() const override;
  13. ItemSkill* createDefaultItemSkill() const override;
  14. };
  15. REGISTER(PlayerHandItemType, ItemType)
  16. class PlayerHandLevelUpRule : public ItemSkillLevelUpRule
  17. {
  18. public:
  19. PlayerHandLevelUpRule();
  20. void applyOn(ItemSkill* zSkill) override;
  21. };
  22. class PlayerHandSkill : public ItemSkill
  23. {
  24. public:
  25. PlayerHandSkill();
  26. void use(Entity* zActor, Item* zUsedItem, Block* zTarget) override;
  27. void use(Entity* zActor, Item* zUsedItem, Entity* zTarget) override;
  28. };