| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package GM.Commands.DelTeam  | 
| #  | 
| # @todo:ɾ³ý·þÎñÆ÷¶ÓÎé  | 
| # @author hxp  | 
| # @date 2017-10-18  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: É¾³ý·þÎñÆ÷¶ÓÎé  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2017-10-18 18:00"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import GameWorld  | 
| import PlayerTeam  | 
|   | 
| #°ïÖúÃüÁî  | 
| ## Ö´ÐÐÂß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param playerList []  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(curPlayer, paramList):  | 
|     teamMgr = GameWorld.GetTeamManager()  | 
|       | 
|     if paramList:  | 
|         teamID = paramList[0]  | 
|         if not teamID:  | 
|             teamID = curPlayer.GetTeamID()  | 
|         GameWorld.DebugAnswer(curPlayer, "½âÉ¢¶ÓÎé: %s" % (teamID))  | 
|         PlayerTeam.DoDismissTeam(teamMgr.FindTeam(teamID))  | 
|         return  | 
|       | 
|     teamIDDict = PlayerTeam.GetSceneTeamIDDict()  | 
|     if not teamIDDict:  | 
|         GameWorld.DebugAnswer(curPlayer, "µ±Ç°Ã»ÓжÓÎ飡")  | 
|         return  | 
|       | 
|     for teamIDList in teamIDDict.values():  | 
|         teamCnt = len(teamIDList)  | 
|         while teamCnt >= 1:  | 
|             teamCnt -= 1  | 
|             teamID = teamIDList[0]  | 
|             GameWorld.DebugAnswer(curPlayer, "½âÉ¢¶ÓÎé: %s" % (teamID))  | 
|             PlayerTeam.DoDismissTeam(teamMgr.FindTeam(teamID))  | 
|               | 
|     return  | 
|   | 
|   |