| | |
| | |
|
| | | import GameWorld
|
| | | import ShareDefine
|
| | | import PlayerViewCache
|
| | | import IPY_PlayerDefine
|
| | | import PlayerFamily
|
| | | import DBDataMgr
|
| | |
| | | if not gmList:
|
| | | #GameWorld.DebugAnswer(curPlayer, "创建跨服假仙盟: CreatFamily c 个数 [总战力 ServerID 等级 成员数]")
|
| | | #GameWorld.DebugAnswer(curPlayer, "删除跨服假仙盟: CreatFamily c 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "建本服假仙盟: CreatFamily 个数 [总战力 ServerID 等级 成员数]")
|
| | | GameWorld.DebugAnswer(curPlayer, "建本服假仙盟: CreatFamily 个数 [总战力 ServerID 等级 成员数 是否审核 官职限制]")
|
| | | GameWorld.DebugAnswer(curPlayer, "删本服假仙盟: CreatFamily 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "输出仙盟列表: CreatFamily pl [条数 从第x名]")
|
| | | GameWorld.DebugAnswer(curPlayer, "输出仙盟明细: CreatFamily pf 仙盟ID")
|
| | |
| | | familyMgr = DBDataMgr.GetFamilyMgr()
|
| | | familyMgr.Sort()
|
| | | familyCnt = familyMgr.GetCount()
|
| | | GameWorld.DebugAnswer(curPlayer, "仙盟总数: %s" % familyCnt)
|
| | | GameWorld.DebugAnswer(curPlayer, "----- 仙盟总数: %s -----" % (familyCnt))
|
| | | for index in range(fromIndex, fromIndex + printCnt):
|
| | | if index >= familyCnt:
|
| | | break
|
| | | family = familyMgr.GetAt(index)
|
| | | rank = index + 1
|
| | |
|
| | | text = "%s,ID:%s,LV:%s,战力:%s,成员:%s" % (rank, family.GetID(), family.GetLV(), family.GetFightPowerTotal(), family.GetCount())
|
| | | text = "%s,ID:%s,LV:%s,战:%s,成:%s,审:%s,官:%s" % (rank, family.GetID(), family.GetLV(), family.GetFightPowerTotal(), family.GetCount(), family.GetJoinReview(), family.GetJoinLVMin())
|
| | | printAnswerCnt += 1
|
| | | if printAnswerCnt <= 100:
|
| | | GameWorld.DebugAnswer(curPlayer, text)
|
| | |
| | | return
|
| | |
|
| | | GameWorld.DebugAnswer(curPlayer, "----- 【%s】 -----" % (GameWorld.CodeToGbk(family.GetName())))
|
| | | GameWorld.DebugAnswer(curPlayer, "仙盟ID:%s,ServerID:%s" % (familyID, family.GetServerID()))
|
| | | GameWorld.DebugAnswer(curPlayer, "LV:%s,Exp:%s" % (family.GetLV(), family.GetExp()))
|
| | | GameWorld.DebugAnswer(curPlayer, "审核:%s,等级条件:%s,申请数:%s" % (family.GetJoinReview(), family.GetJoinLVMin(), len(family.GetReqJoinPlayerInfo())))
|
| | | GameWorld.DebugAnswer(curPlayer, "徽章:%s" % (family.GetEmblemID()))
|
| | | GameWorld.DebugAnswer(curPlayer, "总战力:%s,人数:%s" % (family.GetFightPowerTotal(), family.GetCount()))
|
| | | GameWorld.DebugAnswer(curPlayer, "盟主:%s" % (family.GetLeaderID()))
|
| | | GameWorld.DebugAnswer(curPlayer, "仙盟ID:%s, ServerID:%s" % (familyID, family.GetServerID()))
|
| | | GameWorld.DebugAnswer(curPlayer, "LV:%s, Exp:%s" % (family.GetLV(), family.GetExp()))
|
| | | GameWorld.DebugAnswer(curPlayer, "审核:%s, 官职条件:%s, 申请数:%s" % (family.GetJoinReview(), family.GetJoinLVMin(), len(family.GetReqJoinPlayerInfo())))
|
| | | GameWorld.DebugAnswer(curPlayer, "战旗:%s, 旗号【%s】" % (family.GetEmblemID(), GameWorld.CodeToGbk(family.GetEmblemWord())))
|
| | | GameWorld.DebugAnswer(curPlayer, "总战力:%s, 人数:%s" % (family.GetFightPowerTotal(), family.GetCount()))
|
| | | GameWorld.DebugAnswer(curPlayer, "盟主ID:%s" % (family.GetLeaderID()))
|
| | | for index in range(family.GetCount()):
|
| | | member = family.GetAt(index)
|
| | | playerID = member.GetPlayerID()
|
| | | fightPower = member.GetFightPowerTotal()
|
| | | GameWorld.DebugAnswer(curPlayer, "%s,%s,职位:%s,战力:%s" % (index, playerID, member.GetFmLV(), fightPower))
|
| | | GameWorld.DebugAnswer(curPlayer, "%s,ID:%s,职位:%s,战力:%s" % (index, playerID, member.GetFmLV(), fightPower))
|
| | |
|
| | | return
|
| | |
|
| | |
| | | serverID = gmList[2] if len(gmList) > 2 else random.randint(1, 200)
|
| | | familyLV = gmList[3] if len(gmList) > 3 else 1 # 默认1级
|
| | | memberCnt = gmList[4] if len(gmList) > 4 else random.randint(1, 10)
|
| | | joinReview = gmList[5] if len(gmList) > 5 else 1
|
| | | joinLVMin = gmList[6] if len(gmList) > 6 else random.randint(1, 10)
|
| | |
|
| | | FakeFamilyName = GameWorld.GbkToCode("神秘军团")
|
| | | FakeEmblemWord = GameWorld.GbkToCode("神")
|
| | |
|
| | | fackFamilyID = ShareDefine.FackFamilyIDStart
|
| | | fackMemID = ShareDefine.FackPlayerIDStart
|
| | |
| | | break
|
| | |
|
| | | fackFamilyName = "%s%s" % (FakeFamilyName, fackFamilyID)
|
| | | fackFamily = familyMgr.AddFamily(fackFamilyID, fackFamilyName, serverID)
|
| | | fackFamily = familyMgr.AddFamily(fackFamilyName, serverID, fackFamilyID)
|
| | | fackFamilyID += 1
|
| | | if not fackFamily:
|
| | | continue
|
| | |
| | | fackFamily.SetLV(familyLV)
|
| | | fackFamily.SetFightPowerTotal(familyFightPower)
|
| | | fackFamily.SetEmblemID(1)
|
| | | fackFamily.SetJoinReview(1) # 设置需要审核
|
| | | fackFamily.SetJoinLVMin(random.randint(0, 1000))
|
| | | fackFamily.SetEmblemWord(FakeEmblemWord)
|
| | | fackFamily.SetJoinReview(joinReview) # 设置需要审核
|
| | | fackFamily.SetJoinLVMin(joinLVMin) # 官职
|
| | |
|
| | | GameWorld.DebugLog("创建假仙盟: fackFamilyID=%s,serverID=%s,familyFightPower=%s,memberCnt=%s"
|
| | | % (fackFamilyID, serverID, familyFightPower, memberCnt))
|
| | |
| | | else:
|
| | | memFightPower = avgValue + memCnt / 2 - m
|
| | | memFightPowerTotal -= memFightPower
|
| | | viewCache = DBDataMgr.GetPlayerViewCacheMgr().FindViewCache(memID, True)
|
| | | viewCache = PlayerViewCache.FindViewCache(memID)
|
| | | viewCache.SetFightPowerTotal(memFightPower)
|
| | | GameWorld.DebugLog(" 仙盟成员: memID=%s,memFightPower=%s,fmLV=%s" % (memID, memFightPower, fmLV))
|
| | | member.RefreshMemberByID(memID)
|