| | |
| | | GameWorld.DebugAnswer(curPlayer, "本服公会未互通")
|
| | | return []
|
| | |
|
| | | def OnExec(curPlayer, gmList):
|
| | | ## 游戏服执行命令
|
| | | |
| | | isMainServer = GameWorld.IsMainServer()
|
| | | def OnExecCross(crossPlayer, gmList):
|
| | | if not gmList:
|
| | | if not isMainServer:
|
| | | return
|
| | | GameWorld.DebugAnswer(curPlayer, "-----%s-----" % GameWorld.GetCurrentDataTimeStr())
|
| | | GameWorld.DebugAnswer(curPlayer, "创建假人公会: CreatFamily 个数 [总战力 ServerID 等级 成员数 是否审核 官职限制]")
|
| | | GameWorld.DebugAnswer(curPlayer, "删除假人公会: CreatFamily 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "输出公会列表: CreatFamily pl [条数 从第x名]")
|
| | | GameWorld.DebugAnswer(curPlayer, "输出公会明细: CreatFamily pf 公会ID")
|
| | | GameWorld.DebugAnswer(curPlayer, "添加假申请人: CreatFamily sq [申请数 公会ID]")
|
| | | GameWorld.DebugAnswer(curPlayer, "添加公会成员: CreatFamily m 人数 [公会ID]")
|
| | | return
|
| | | if GameWorld.IsMainServer() and DBDataMgr.GetFamilyMgr().GetCurCrossServerID():
|
| | | # 本服公会已互通不再执行本服命令
|
| | | return
|
| | |
|
| | | if isMainServer:
|
| | | crossServerID = DBDataMgr.GetFamilyMgr().GetCurCrossServerID()
|
| | | if crossServerID:
|
| | | # 本服公会已互通不再执行本服命令
|
| | | return
|
| | | |
| | | crossPlayer = CrossPlayer.GetCrossPlayerMgr().FindCrossPlayer(curPlayer.GetPlayerID())
|
| | | if not crossPlayer:
|
| | | return
|
| | | |
| | | playerID = crossPlayer.GetPlayerID()
|
| | | familyMgr = DBDataMgr.GetFamilyMgr()
|
| | | familyID = familyMgr.GetPlayerFamilyID(playerID)
|
| | | zoneID = familyMgr.GetFamilyZoneID(familyID)
|
| | | if GameWorld.IsCrossServer():
|
| | | playerID = crossPlayer.GetPlayerID()
|
| | | familyMgr = DBDataMgr.GetFamilyMgr()
|
| | | familyID = familyMgr.GetPlayerFamilyID(playerID)
|
| | | zoneID = familyMgr.GetFamilyZoneID(familyID)
|
| | | GameWorld.DebugAnswer(crossPlayer, "跨服公会ID:%s,zoneID=%s" % (familyID, zoneID))
|
| | |
|
| | | value1 = gmList[0]
|
| | |
| | | __addFackMember(crossPlayer, gmList)
|
| | | return
|
| | |
|
| | | if value1 == "ds":
|
| | | __delServerMember(crossPlayer, gmList)
|
| | | return
|
| | | |
| | | creatCount = value1
|
| | | if creatCount <= 0:
|
| | | __delFackFamily(crossPlayer)
|
| | | __delFackFamily(crossPlayer, gmList)
|
| | | return
|
| | | __createFackFamily(crossPlayer, gmList)
|
| | | elif isinstance(creatCount, int) and creatCount > 0:
|
| | | __createFackFamily(crossPlayer, gmList)
|
| | | return
|
| | |
|
| | | def OnExec(curPlayer, gmList):
|
| | | ## 游戏服执行命令
|
| | | if not gmList:
|
| | | GameWorld.DebugAnswer(curPlayer, "-----%s-----" % GameWorld.GetCurrentDataTimeStr())
|
| | | GameWorld.DebugAnswer(curPlayer, "创建假人公会: CreatFamily 个数 [总战力 ServerID 等级 成员数 是否审核 官职限制]")
|
| | | GameWorld.DebugAnswer(curPlayer, "删除假人公会: CreatFamily 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "输出公会列表: CreatFamily pl [条数 从第x名]")
|
| | | GameWorld.DebugAnswer(curPlayer, "输出公会明细: CreatFamily pf 公会ID")
|
| | | GameWorld.DebugAnswer(curPlayer, "添加假申请人: CreatFamily sq [申请数 公会ID]")
|
| | | GameWorld.DebugAnswer(curPlayer, "添加公会成员: CreatFamily m 人数 [公会ID]")
|
| | | GameWorld.DebugAnswer(curPlayer, "踢出区服成员: CreatFamily ds 服务器ID")
|
| | | GameWorld.DebugAnswer(curPlayer, "删除本服公会: CreatFamily df")
|
| | | GameWorld.DebugAnswer(curPlayer, "重置互通状态: CreatFamily c")
|
| | | return
|
| | | |
| | | crossPlayer = CrossPlayer.GetCrossPlayerMgr().FindCrossPlayer(curPlayer.GetPlayerID())
|
| | | if not crossPlayer:
|
| | | return
|
| | | |
| | | value1 = gmList[0]
|
| | | if value1 == "df":
|
| | | __delFackFamily(curPlayer, [0, 1])
|
| | | return
|
| | | |
| | | if value1 == "c":
|
| | | if not GameWorld.IsMainServer():
|
| | | return
|
| | | if not DBDataMgr.GetFamilyMgr().GetCurCrossServerID():
|
| | | GameWorld.DebugAnswer(curPlayer, "本服未互通")
|
| | | return
|
| | | DBDataMgr.GetEventTrigMgr().SetValue(ShareDefine.Def_FamilyCrossState, 0)
|
| | | DBDataMgr.GetEventTrigMgr().SetValue(ShareDefine.Def_FamilyTransDataTime, 0)
|
| | | GameWorld.DebugAnswer(curPlayer, "已重置互通状态请重登或重启服务器")
|
| | | return
|
| | | |
| | | OnExecCross(crossPlayer, gmList)
|
| | | return
|
| | |
|
| | | def __delServerMember(crossPlayer, gmList):
|
| | | delServerID = gmList[1] if len(gmList) > 1 else 1
|
| | | GameWorld.DebugAnswer(crossPlayer, "踢出指定区服成员!delServerID=%s" % delServerID)
|
| | | delCnt, delFamilyCnt = 0, 0
|
| | | familyMgr = DBDataMgr.GetFamilyMgr()
|
| | | for familyID in familyMgr.GetFamilyIDList():
|
| | | family = familyMgr.FindFamily(familyID)
|
| | | for index in range(family.GetCount())[::-1]:
|
| | | member = family.GetAt(index)
|
| | | memID = member.GetPlayerID()
|
| | | if member.GetServerID() != delServerID:
|
| | | continue
|
| | | if member.GetFmLV() == IPY_PlayerDefine.fmlLeader:
|
| | | GameWorld.DebugAnswer(crossPlayer, "踢出区服成员是会长直接删公会!%s" % familyID)
|
| | | familyMgr.DelFamily(familyID)
|
| | | delFamilyCnt += 1
|
| | | break
|
| | | GameWorld.DebugAnswer(crossPlayer, "踢出区服成员!ID=%s,ServerID=%s" % (memID, delServerID))
|
| | | family.DeleteMember(memID)
|
| | | delCnt += 1
|
| | | if not delCnt and not delFamilyCnt:
|
| | | GameWorld.DebugAnswer(crossPlayer, "没有该区服成员了")
|
| | | else:
|
| | | GameWorld.DebugAnswer(crossPlayer, "踢出成员数:%s" % delCnt)
|
| | | if delFamilyCnt:
|
| | | GameWorld.DebugAnswer(crossPlayer, "删除公会数:%s" % delFamilyCnt)
|
| | | GameWorld.DebugAnswer(crossPlayer, "请正常关服重启测试!")
|
| | | return
|
| | |
|
| | | def __addFackMember(crossPlayer, gmList):
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def __delFackFamily(crossPlayer):
|
| | | |
| | | def __delFackFamily(crossPlayer, gmList):
|
| | | isAll = gmList[1] if len(gmList) > 1 else 0
|
| | | delCnt = 0
|
| | | familyMgr = DBDataMgr.GetFamilyMgr()
|
| | | for familyID in familyMgr.GetFamilyIDList():
|
| | | if familyID > ShareDefine.FackFamilyIDMax:
|
| | | if not isAll and familyID > ShareDefine.FackFamilyIDMax:
|
| | | continue
|
| | | delCnt += 1
|
| | | familyMgr.DelFamily(familyID)
|
| | |
|
| | | remainCnt = len(familyMgr.GetFamilyIDList())
|
| | | GameWorld.DebugAnswer(crossPlayer, "删除假公会数: %s,剩余:%s" % (delCnt, remainCnt))
|
| | | GameWorld.DebugAnswer(crossPlayer, "删除公会数: %s,剩余:%s" % (delCnt, remainCnt))
|
| | | return
|
| | |
|
| | | def __createFackFamily(crossPlayer, gmList):
|