// Auction.h #ifndef AUCTION_H #define AUCTION_H class CAuctionData { public: CAuctionData () { memset (this, 0, sizeof (CAuctionData)); } void Update (); CObjData *GetItem () { return m_pItem; } void SetItem (CObjData* i) { m_pItem = i; } int GetBid () { return m_Bid; } void SetBid (int b) { m_Bid = b; } CCharacter *GetSeller () { return m_pSeller; } void SetSeller (CCharacter* ch) { m_pSeller = ch; } CCharacter *GetBuyer () { return m_pBuyer; } void SetBuyer (CCharacter* ch) { m_pBuyer = ch; } BOOL IsBuyer () { return m_pBuyer != NULL; } short GetCount () { return m_Going; } void SetCount (short c) { m_Going = c; } short GetPulse () { return m_Pulse; } int GetStartPrice () { return m_Start; } void SetStartPrice (int p) { m_Start = p; } BOOL IsActive () { return m_pItem != NULL; } void Stop (); void Reset (CCharacter* ch, int b) { m_pBuyer = ch; m_Bid = b; m_Going = 0; m_Pulse = PULSE_AUCTION; } private: CObjData *m_pItem; // a pointer to the item CCharacter *m_pSeller; // a pointer to the seller - which may NOT quit CCharacter *m_pBuyer; // a pointer to the buyer - which may NOT quit int m_Bid; // last bid - or 0 if no one has bet anything short m_Going; // 1,2, sold short m_Pulse; // how many pulses (.25 sec) til another call-out ? int m_Start; // Start asking price }; extern CAuctionData *auction; #ifdef SMAUGSERVER_CPP CAuctionData *auction; #endif #endif