QuestEvent.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #include "QuestEvent.h"
  2. QuestEvent::QuestEvent(Entity* actingEntity)
  3. : ReferenceCounter(),
  4. actingEntity(actingEntity)
  5. {}
  6. QuestEvent::~QuestEvent()
  7. {
  8. if (actingEntity)
  9. {
  10. actingEntity->release();
  11. }
  12. }
  13. Entity* QuestEvent::zActingEntity() const
  14. {
  15. return actingEntity;
  16. }
  17. QuestEventOpenDialog::QuestEventOpenDialog(
  18. Entity* actingEntity, Framework::Text dialogId)
  19. : QuestEvent(actingEntity),
  20. dialogId(dialogId)
  21. {}
  22. const Framework::Text& QuestEventOpenDialog::getDialogId() const
  23. {
  24. return dialogId;
  25. }
  26. QuestEventBlockBreak::QuestEventBlockBreak(
  27. Entity* actingEntity, int blockTypeId, int usedItemTypeId)
  28. : QuestEvent(actingEntity),
  29. blockTypeId(blockTypeId),
  30. usedItemTypeId(usedItemTypeId)
  31. {}
  32. int QuestEventBlockBreak::getBlockTypeId() const
  33. {
  34. return blockTypeId;
  35. }
  36. int QuestEventBlockBreak::getUsedItemTypeId() const
  37. {
  38. return usedItemTypeId;
  39. }
  40. QuestEventBlockPlace::QuestEventBlockPlace(
  41. Entity* actingEntity, int blockTypeId)
  42. : QuestEvent(actingEntity),
  43. blockTypeId(blockTypeId)
  44. {}
  45. int QuestEventBlockPlace::getBlockTypeId() const
  46. {
  47. return blockTypeId;
  48. }
  49. QuestEventBlockInteract::QuestEventBlockInteract(
  50. Entity* actingEntity, int blockTypeId, int usedItemTypeId)
  51. : QuestEvent(actingEntity),
  52. blockTypeId(blockTypeId),
  53. usedItemTypeId(usedItemTypeId)
  54. {}
  55. int QuestEventBlockInteract::getBlockTypeId() const
  56. {
  57. return blockTypeId;
  58. }
  59. int QuestEventBlockInteract::getUsedItemTypeId() const
  60. {
  61. return usedItemTypeId;
  62. }
  63. QuestEventTimeUpdate::QuestEventTimeUpdate()
  64. : QuestEvent(0)
  65. {}
  66. QuestEventItemPickup::QuestEventItemPickup(
  67. Entity* actingEntity, int itemTypeId, int amount)
  68. : QuestEvent(actingEntity),
  69. itemTypeId(itemTypeId),
  70. amount(amount)
  71. {}
  72. int QuestEventItemPickup::getItemTypeId() const
  73. {
  74. return itemTypeId;
  75. }
  76. int QuestEventItemPickup::getAmount() const
  77. {
  78. return amount;
  79. }