Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

Results 1 to 11 of 11
  1. #1
    Member Hideasu is offline
    MemberRank
    Aug 2011 Join Date
    CanadaLocation
    78Posts

    Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    MBaseChannelRule.cpp

    Old:
    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;
    }
    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;
    		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;
    }
    MMatchStage.cpp

    Old:
    Code:
    	if (count == 0)
    	{
    		pRelayMapList[0].nMapID = MMATCH_MAP_MANSION;
    		count = 1;
    	}
    New:
    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.


  2. #2
    Proficient Member wayutok is offline
    MemberRank
    Oct 2011 Join Date
    198Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    printscreen?

  3. #3
    Member Hideasu is offline
    MemberRank
    Aug 2011 Join Date
    CanadaLocation
    78Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    I'm on League of legends... it will only list BonlyDuel map's in the gametype MMATCH_GAMETYPE_DUEL, instead of all the map.
    Last edited by Hideasu; 30-11-12 at 06:41 PM.

  4. #4
    Freelance GunZ Developer Touchwise is offline
    MemberRank
    Aug 2009 Join Date
    The NetherlandsLocation
    754Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    Ur the best gregon ;) as usual

  5. #5
    Yaaay! Tannous is offline
    MemberRank
    Jul 2012 Join Date
    KonohaLocation
    840Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    Hmmmm... I didn't understand what does it do XD, could you tell me ;) ?!

  6. #6
    Account Upgraded | Title Enabled! metalgunz is offline
    MemberRank
    May 2011 Join Date
    390Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    I too would like to know ^^

  7. #7
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    It lists the maps that have bDuelOnlyMap in map.xml only when you're in Duel.

  8. #8
    Yaaay! Tannous is offline
    MemberRank
    Jul 2012 Join Date
    KonohaLocation
    840Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    Ah .. O.o sounds useful :)

  9. #9
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    Hint: server-sided validation.

  10. #10
    Account Upgraded | Title Enabled! KeyTrix is offline
    MemberRank
    Feb 2012 Join Date
    EverywhereLocation
    268Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    Good job, that's useful.

  11. #11
    Gregon13 OldSchoolGZ is offline
    MemberRank
    Jan 2012 Join Date
    CanadaLocation
    244Posts

    Re: Forced bOnlyDuel for MMATCH_GAMETYPE_DUEL

    Quote Originally Posted by Touchwise View Post
    Ur the best gregon ;) as usual
    lol that's not gregon I am

    On Topic: Not bad I did a similar thing but made a new checklist method for duel maps instead of using maiet's original method



Advertisement