예제 #1
0
/**
 * \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;
}
예제 #2
0
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;
  */
}
예제 #3
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);
  }
  */
}
예제 #4
0
CGem*   CGemM::findGemByID(DWORD dwID)
{
    return (CGem*)getEntryByTempID(dwID);
}