123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #pragma once
- #include "ItemType.h"
- #include "ItemSkill.h"
- class BrokenStoneToolItemType : public ItemType
- {
- REGISTRABLE(BrokenStoneToolItemType)
- protected:
- BrokenStoneToolItemType();
- public:
- Item* createItem() const override;
- };
- REGISTER(BrokenStoneToolItemType, ItemType)
- class StoneToolItemType : public ItemType
- {
- REGISTRABLE(StoneToolItemType)
- protected:
- StoneToolItemType();
- void loadSuperItemSkill(ItemSkill* zSkill, Framework::StreamReader* zReader) const override;
- void saveSuperItemSkill(const ItemSkill* zSkill, Framework::StreamWriter* zWriter) const override;
- public:
- Item* createItem() const override;
- ItemSkill* createDefaultItemSkill() const override;
- };
- REGISTER(StoneToolItemType, ItemType)
- class StoneToolLevelUpRule : public ItemSkillLevelUpRule
- {
- public:
- StoneToolLevelUpRule();
- void applyOn(ItemSkill* zSkill) override;
- };
- class StoneToolSkill : public ItemSkill
- {
- private:
- int level;
- float xp;
- float maxXP;
- public:
- StoneToolSkill();
- void use(Entity* zActor, Item* zUsedItem, Block* zTarget) override;
- void use(Entity* zActor, Item* zUsedItem, Entity* zTarget) override;
- friend StoneToolItemType;
- friend StoneToolLevelUpRule;
- };
|