1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #include "ItemSkill.h"
- #include "ItemType.h"
- class StoneToolItemType : public ItemType
- {
- protected:
- void loadSuperItemSkill(
- ItemSkill* zSkill, Framework::StreamReader* zReader) const override;
- void saveSuperItemSkill(const ItemSkill* zSkill,
- Framework::StreamWriter* zWriter) const override;
- public:
- StoneToolItemType();
- Item* createItem() const override;
- ItemSkill* createDefaultItemSkill() const override;
- };
- 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;
- };
|