12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #pragma once
- #include "QuestEvent.h"
- #include "TypeRegistry.h"
- class QuestRequirementStorage;
- 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, QuestRequirementStorage* zStorage)
- = 0;
- virtual Framework::Text getRequirementUIML(
- QuestRequirementStorage* zStorage)
- = 0;
- 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, QuestRequirementStorage* zStorage) override;
- Framework::Text getRequirementUIML(
- QuestRequirementStorage* zStorage) 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
- {};
|