/* ========================================================================== * ÆÄ ÀÏ : Totem.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ¹Ú°æÈñ * ÀÛ ¼º ÀÏ : 2008-10-21 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "Totem_Common.h" #include "BaseObject.h" #include "PVP_Common.h" #include "RangeCheck.h" class cBaseObject; class cTotem : public cBaseObject { public: /// »ý¼º¼Ò¸ê cTotem( void ); ~cTotem( void ); /// ¸Þ¸ð¸® ÇÒ´ç Á¦°Å pool »ç¿ë void* operator new ( size_t n ); void operator delete ( void* ptr, size_t n ); bool TotemInit( sObject attacker, unsigned long objectIdx, unsigned long classIdx, unsigned long partyIdx, unsigned long partyUnionIdx, NiPoint2 pos, eAPPLYTYPE applyType, eATTRIBUTETYPE attributeType, unsigned long skillIdx, float direction, unsigned char applyCnt ); bool PvPTotemInit( ePVPDM_TEAM_TYPE teamType, unsigned long objectIdx, unsigned long classIdx, unsigned short pvpIdx, NiPoint2 pos, eAPPLYTYPE applyType, eATTRIBUTETYPE attributeType ); void ProcessTotem( unsigned long elapsedTime, unsigned long accumTime ); unsigned long GetClassIdx() { return mpTotemScript->mTotemIdx; } sObject GetAttacker() { return mAttacker; } unsigned short GetRange() { return mpTotemScript->mApplyRange1; } bool GetStateDie( ) { return false; } /// ¿À¶ó Ÿ°Ù º¸À¯¸ñ·ÏÁ¦°Å void EraseTarget( sObject taraget ); float GetDirection() { return mDirection; } private: bool CheckTotem( unsigned long accumTime ); void PlayerSelectTarget(); /// Ç÷¹ÀÌ¾î°ø°ÝÀÚÀÇ Å¸°Ù ¼±Á¤ void MonsterSelectTarget(); /// ¸ó½ºÅͰø°ÝÀÚÀÇ Å¸°Ù ¼±Á¤ bool RangeCheck( cBaseObject* pTarget ); /// ±âÁØÆÀÀÇ µ¿·á¿Í Àû ±¸ºÐÀ»ÇØ ¹öÇÁ/µð¹öÇÁ¸¦ °É¾îÁØ´Ù. void PvPAddInf( ePVPDM_TEAM_TYPE mainTeamType, eAPPLYTYPE applyType ); bool CopyTotemInfluence( cBaseObject* pTarget, sInfluenceCreate* pInf = NULL ); /// È¿°ú ¸¸µé±â private: typedef tHashSet cHashSet; typedef tArray cArray; cHashSet mPlayerTargetSet; cHashSet mMonsterTargetSet; /// ½ºÅ©¸³Æ® Á¤º¸ const sTotemScript* mpTotemScript; const sInfluenceScript* mpInfScript; sObject mAttacker; /// °ø°ÝÀÚ unsigned long mPartyIdx; /// °ø°ÝÀÚÀÇ ÆÄƼ unsigned long mPartyUnionIdx; /// °ø°ÝÀÚÀÇ ÆÄƼ¿¬ÇÕ À妽º unsigned long mNextCheckTime; /// ´ÙÀ½ °Ë»ö ½Ã°£ unsigned long mEndTime; /// °´Á¦ »èÁ¦ ½Ã°£ cRangeCheck mRangeCheck; eAPPLYTYPE mApplytype; eATTRIBUTETYPE mAttriButeType; float mDirection; /// ¹æÇâ ePVPDM_TEAM_TYPE mTeamType; /// pvp¿ë ½Ã½ºÅÛ ÅäÅÛ¼³Á¤ unsigned long mSkillIdx; /// ÇÑÇÁ·¹ÀÓ ÃÖ´ë Ÿ°Ù ¼±Á¤ Ä«¿îÆ® unsigned char mTargetCnt; unsigned char mTargetCntMax; cArray mObjectIdxAry; public: bool SendSightIn ( char category, char protocol, unsigned long connectionIdx ); bool SendSightOut ( char category, char protocol, unsigned long connectionIdx ); };