#ifndef __SUMMON_MANAGER_H__ #define __SUMMON_MANAGER_H__ #pragma once #include #include #include class SummonedNPCs; class Character; class SummonManager : public util::Singleton { public: SummonManager(); ~SummonManager(); VOID Release(); VOID Init( DWORD dwMaxPoolSize ); #ifdef _NA_007667_20141001_WITCHBLADE_SKILL bool DeleteSummonedUsingType(Character* pSummoner, eSUMMON_TYPE type); SummonedNPCs* AllocSummonNPCs( Character *pSummoner, BOOL bPlayerSkill, WORD ability_id = 0 ); #else SummonedNPCs* AllocSummonNPCs( Character *pSummoner, BOOL bPlayerSkill ); #endif //_NA_007667_20141001_WITCHBLADE_SKILL BOOL FreeSummonNPCs( SummonedNPCs *pSummonNPCs, BOOL bFollowerDestroy=TRUE ); VOID AddSummonedSkill( DWORD dwSummonKey, SLOTCODE SkillCode ); VOID DelSummonedSkill( DWORD dwSummonKey, SLOTCODE SkillCode ); VOID LeaveSummonNPCs( Character *pLeaveChar ); RC::eSUMMON_RESULT SetCommandState( DWORD dwSummonKey, eSUMMON_COMMAND eCommand, DWORD dwObjectKey=0, DWORD dwTargetKey=0 ); public: SummonedNPCs* FindSummonNPCs( DWORD dwSummonKey ) { SUMMON_NPC_LIST_IT itFIND = m_SummonNPCsList.find( dwSummonKey ); return (itFIND != m_SummonNPCsList.end()) ? itFIND->second : NULL; } private: struct LoopNode { LoopNode() { SKILL_CODE.Set(0); } PROPERTY SKILL_CODE; VOID _AddSummonedSkill( SUMMONED_MAP_PAIR rPair ); VOID _DelSummonedSkill( SUMMONED_MAP_PAIR rPair ); VOID _LeaveSummonNPCs( SUMMONED_MAP_PAIR rPair ); }; private: // (WAVERIX)(NOTE) ÀÌÈÄ SummonedNPCs* ¸¦ SummonedNPCs·Î Àüȯ½Ãų ¼ö ÀÖ´ÂÁö ¿©ºÎ¸¦ È®ÀÎÇÏÀÚ. typedef STLX_MAP SUMMON_NPC_LIST; typedef SUMMON_NPC_LIST::iterator SUMMON_NPC_LIST_IT; SUMMON_NPC_LIST m_SummonNPCsList; # if WAVERIX_CODE_DELETE_RESERVED typedef STLX_SET SUMMON_HASH; // ¹«°á¼º °Ë»ç¿ë, Á¦°Å ¿¹Á¤ SUMMON_HASH m_SummonHash; # endif util::CMemoryPoolFactory* m_pSummonNPCsPool; }; #endif // __SUMMON_MANAGER_H__