MBaseChannelRule.cpp
Old:
New:Code:bool MChannelRuleMapList::Exist(int nMapID, bool bOnlyDuel) { set<int>::iterator itor = m_Set.find( nMapID); if ( itor != m_Set.end()) { int id = (*itor); if ( !bOnlyDuel && MGetMapDescMgr()->IsMapOnlyDuel(id)) return false; return true; } return false; } bool MChannelRuleMapList::Exist(const char* pszMapName, bool bOnlyDuel) { for (set<int>::iterator itor = m_Set.begin(); itor != m_Set.end(); ++itor) { int id = (*itor); if ((id >= 0) && (id < MMATCH_MAP_MAX)) { if ( !stricmp(pszMapName, MGetMapDescMgr()->GetMapName(id)) ) { if ( !bOnlyDuel && MGetMapDescMgr()->IsMapOnlyDuel(id)) return false; return true; } } } return false; }
MMatchStage.cppCode:bool MChannelRuleMapList::Exist(int nMapID, bool bOnlyDuel) { set<int>::iterator itor = m_Set.find( nMapID); if ( itor != m_Set.end()) { int id = (*itor); if ( !bOnlyDuel && MGetMapDescMgr()->IsMapOnlyDuel(id)) return false; if ( bOnlyDuel && !MGetMapDescMgr()->IsMapOnlyDuel(id)) return false; return true; } return false; } bool MChannelRuleMapList::Exist(const char* pszMapName, bool bOnlyDuel) { for (set<int>::iterator itor = m_Set.begin(); itor != m_Set.end(); ++itor) { int id = (*itor); if ((id >= 0) && (id < MMATCH_MAP_MAX)) { if ( !stricmp(pszMapName, MGetMapDescMgr()->GetMapName(id)) ) { if ( !bOnlyDuel && MGetMapDescMgr()->IsMapOnlyDuel(id)) return false; if ( bOnlyDuel && !MGetMapDescMgr()->IsMapOnlyDuel(id)) return false; return true; } } } return false; }
Old:
New:Code:if (count == 0) { pRelayMapList[0].nMapID = MMATCH_MAP_MANSION; count = 1; }
Code:if (count == 0 && !MMATCH_GAMETYPE_DUEL) { pRelayMapList[0].nMapID = MMATCH_MAP_MANSION; count = 1; }else{ pRelayMapList[0].nMapID = MMATCH_MAP_HALL; count = 1; }Feel free to comment or like if you use or find these code useful.



Reply With Quote


