#pragma once #include "common.h" class AFX_CLASS_EXPORT T2EventItem { public: T2EventItem(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); T2EventItem(T2TowerEvent* inTowerEvent, int inSubID, int inLevelBit, BOOL inExclusive, int inCycleDay, int inBeginTime, int inEndTime); T2EventItem(T2EventItem* inItem, int inSubID); virtual ~T2EventItem(); virtual void Init(T2TowerDoc* inDoc); virtual DWORD GetID() { return 0; } int GetSubID() { return mSubID; } virtual BOOL Start(T2TowerDoc* inDoc); virtual int ReStart(T2TowerDoc* inDoc); virtual int Exec(T2TowerDoc *inDoc) = 0; virtual void StopEvent(T2TowerDoc* inDoc); virtual void ViewModeChanged(T2TowerDoc* inDoc, VIEWMODE) {} virtual DWORD OptionProc(DWORD, void*) { return 0; } virtual BOOL IsBeginTime(unsigned int inTime); virtual BOOL IsBeginDay(int inDay); virtual void Write(T2Archive& inArchive); virtual void Read(T2Archive& inArchive); virtual BOOL IsXEvent() { return false; } T2WorldDef* GetWorldDef(); T2TowerDoc* GetTowerDoc() const; T2TowerEvent* GetTowerEvent(); int GetLevelBit(); BOOL IsExclusive(); int GetCycleDay(); int GetBeginTime(); void SetBeginTime(int inTime); int GetEndTime(); int GetStatus(); void SetStatus(int inStatus); T2EventItem* GetOriginalDef(); int _4; int mSubID; T2TowerEvent *mTowerEvent; int mStatus; int mLevelBit; BOOL mExclusive; int mCycleDay; int mBeginTime; int mEndTime; T2EventItem *mOriginalDef; T2EventDialog *mEventDialog; protected: virtual unsigned int DoDialog(T2TowerDoc* inDoc, int inDlgResID, int inAnimResID, int inAnimUnk, const char* inText); virtual void DoAlert(T2TowerDoc* inDoc, CString& inText, int inSoundID); virtual UINT DialogHook(T2EventDialog*, unsigned int inResult, T2TowerDoc* inDoc) { return inResult; } virtual void SetupDialog(T2Dialog*) {} };