/** * \brief 根据临时id得到npc的指针 * * * \param tempid npc的临时id * \return 找到的指针,失败返回0 */ SceneNpc *SceneNpcManager::getNpcByTempID(DWORD tempid) { rwlock.rdlock(); SceneNpc *ret = (SceneNpc *)getEntryByTempID(tempid); rwlock.unlock(); return ret; }
SessionChannel * SessionChannelManager::get(DWORD id) { SessionChannel *ret=NULL; ret=(SessionChannel *)getEntryByTempID(id); return ret; /* if (channelList.end()!=channelList.find(id)) { return channelList[id]; } return 0; */ }
void SessionChannelManager::remove(DWORD id) { SessionChannel *ret=NULL; ret=(SessionChannel *)getEntryByTempID(id); ret->removeAllUser(); removeEntry(ret); SAFE_DELETE(ret); /* if (channelList.end()!=channelList.find(id)) { SAFE_DELETE(hannelList[id]); channelList.erase(id); } */ }
CGem* CGemM::findGemByID(DWORD dwID) { return (CGem*)getEntryByTempID(dwID); }