undo/redo for edit/clear quest
This commit is contained in:
15
src/scenario/quest.cpp
Normal file
15
src/scenario/quest.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "quest.hpp"
|
||||
|
||||
bool cQuest::operator==(const cQuest& other) {
|
||||
CHECK_EQ(other, deadline_is_relative);
|
||||
CHECK_EQ(other, auto_start);
|
||||
CHECK_EQ(other, deadline);
|
||||
CHECK_EQ(other, event);
|
||||
CHECK_EQ(other, xp);
|
||||
CHECK_EQ(other, gold);
|
||||
CHECK_EQ(other, bank1);
|
||||
CHECK_EQ(other, bank2);
|
||||
CHECK_EQ(other, name);
|
||||
CHECK_EQ(other, descr);
|
||||
return true;
|
||||
}
|
@@ -21,6 +21,10 @@ public:
|
||||
short bank1 = -1, bank2 = -1; // which job bank(s) this quest is in; -1 for none
|
||||
std::string name;
|
||||
std::string descr;
|
||||
|
||||
// For detecting actual changes to quests in the scenario editor
|
||||
bool operator==(const cQuest& other);
|
||||
bool operator!=(const cQuest& other) { return !(*this == other); }
|
||||
};
|
||||
|
||||
class cJob {
|
||||
|
Reference in New Issue
Block a user