hxp
2024-11-25 878fef04122d1feaa0f42c429f364659931bc379
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/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