/* ========================================================================== * ÆÄ ÀÏ : PartyUnion.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2009-06-03 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "Party_Common.h" class cPartyUnion { public: cPartyUnion(); ~cPartyUnion(); void* operator new( size_t n ); void operator delete( void* ptr, size_t n ); unsigned long* GetUserArr(); unsigned long* GetGroupArr( unsigned long userIdx ); inline unsigned int GetCount() { return mCount; } void SetIndex( unsigned long index ); void SetLeader( unsigned long userIdx ); inline unsigned long GetIndex() { return mIndex; } inline unsigned long GetLeader() { return mLeaderIndex; } int AddUser( unsigned long userIdx ); bool DeleteUser( unsigned long userIdx ); bool MoveUser( unsigned char i0, unsigned char i1 ); int FindNextLeader(); bool IsUser( unsigned long userIdx1, unsigned long userIdx2 ); inline void SetLastAccumTime( unsigned long accumTime ) { mLastAccumTime = accumTime; } inline unsigned long GetLastAccumTime() { return mLastAccumTime; } int GetGroup( unsigned long userIdx ); // ±×·ìÀ妽º ã±â protected: int GetGroup( int i ); // ±×·ìÀ妽º ã±â private: // ÆÄƼ À妽º unsigned long mIndex; // ÆÄƼ À¯ÀúÀ妽º unsigned long mUserArr[ MAX_PARTYUNION ]; // ÆÄƼ¿¬ÇÕÀå unsigned long mLeaderIndex; // ÆÄƼ Àοø¼ö unsigned int mCount; /// ÆÄƼ °»½Å ½Ã°£ unsigned long mLastAccumTime; }; inline unsigned long* cPartyUnion::GetUserArr() { return mUserArr; } inline void cPartyUnion::SetIndex( unsigned long index ) { mIndex = index; } inline void cPartyUnion::SetLeader( unsigned long userIdx ) { mLeaderIndex = userIdx; }