123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #pragma once
- #include "QuestEvent.h"
- #include "TypeRegistry.h"
- class QuestStorage;
- class QuestRequirement : public virtual Framework::ReferenceCounter
- {
- protected:
- Framework::Text id;
- Framework::Text description;
- public:
- QuestRequirement(Framework::Text id, Framework::Text description);
- virtual void processEvent(QuestEvent* zEvent, QuestStorage* zStorage) = 0;
- virtual void addRequirementUIML(QuestStorage* zStorage,
- Framework::XML::Element* zParent,
- Framework::Text onClickPrefix)
- = 0;
- virtual void api(Framework::StreamReader* message,
- Framework::XML::Element* zParent,
- QuestStorage* zStorage);
- const Framework::Text& getRequirementId() const;
- const Framework::Text& getDescription() const;
- };
- class QuestRequirementOpenDialogType;
- class QuestRequirementOpenDialog : public QuestRequirement
- {
- private:
- Framework::Text dialogId;
- public:
- QuestRequirementOpenDialog(Framework::Text id,
- Framework::Text description,
- Framework::Text dialogId);
- void processEvent(QuestEvent* zEvent, QuestStorage* zStorage) override;
- void addRequirementUIML(QuestStorage* zStorage,
- Framework::XML::Element* zParent,
- Framework::Text onClickPrefix) override;
- friend QuestRequirementOpenDialogType;
- };
- class QuestRequirementOpenDialogType
- : public SubTypeFactory<QuestRequirement, QuestRequirementOpenDialog>
- {
- public:
- QuestRequirementOpenDialogType();
- QuestRequirementOpenDialog* fromJson(
- Framework::JSON::JSONObject* zJson) const override;
- Framework::JSON::JSONObject* toJson(
- QuestRequirementOpenDialog* zObject) const override;
- Framework::JSON::Validator::JSONValidator* getValidator(
- Framework::JSON::Validator::ObjectValidationBuilder<
- Framework::JSON::Validator::JSONValidator>* builder) const override;
- Framework::Text getTypeToken() const override;
- };
- class QuestRequirementBlockBreak : public QuestRequirement
- {};
- class QuestRequirementBlockPlace : public QuestRequirement
- {};
- class QuestRequirementBlockInteract : public QuestRequirement
- {};
- class QuestRequirementCraft : public QuestRequirement
- {};
- class QuestRequirementItemInInventory : public QuestRequirement
- {};
|