| | |
| | | #"""Version = 2024-10-29 17:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import ChConfig
|
| | | import GameWorld
|
| | | import PlayerControl
|
| | | import PlayerFamilyZhenbaoge
|
| | | import ChConfig
|
| | | import PlayerFamily
|
| | | import DBDataMgr
|
| | | import random
|
| | | import time
|
| | |
|
| | | ## GM命令执行入口
|
| | |
| | | GameWorld.DebugAnswer(curPlayer, "AB值没有填则按常规砍价价格计算")
|
| | | return
|
| | |
|
| | | if not curPlayer.GetFamilyID():
|
| | | familyID = curPlayer.GetFamilyID()
|
| | | if not familyID:
|
| | | GameWorld.DebugAnswer(curPlayer, "没有仙盟")
|
| | | return
|
| | | |
| | | isSendGameServer = False
|
| | | curFamily = DBDataMgr.GetFamilyMgr().FindFamily(familyID)
|
| | | if not curFamily:
|
| | | return
|
| | |
|
| | | value1 = msgList[0]
|
| | | if value1 == 0:
|
| | | isSendGameServer = True
|
| | | PlayerFamilyZhenbaoge.OnZhenbaogeReset(curFamily)
|
| | | GameWorld.DebugAnswer(curPlayer, "重置仙盟珍宝阁OK")
|
| | | return
|
| | |
|
| | | elif value1 == "d":
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyZhenbaogeCut, 0)
|
| | |
| | | GameWorld.DebugAnswer(curPlayer, "设置退仙盟时间:%s" % GameWorld.ChangeTimeNumToStr(leaveFamilyTimeEx))
|
| | | return
|
| | |
|
| | | else:
|
| | | isSendGameServer = True
|
| | | #添加假砍价
|
| | | gActionData = PlayerFamilyZhenbaoge.GetZhenbaogeActionData(familyID, PlayerFamilyZhenbaoge.ActionGlobalID)
|
| | | if not gActionData:
|
| | | GameWorld.DebugAnswer(curPlayer, "请先重置珍宝阁")
|
| | | return
|
| | | |
| | | familyAction = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, PlayerFamilyZhenbaoge.ActionType)
|
| | | actionCount = familyAction.Count()
|
| | | |
| | | fackCount = value1
|
| | | randValue1 = msgList[1] if len(msgList) > 1 else 0
|
| | | randValue2 = msgList[2] if len(msgList) > 2 else 0
|
| | | syncActionDataList = [gActionData]
|
| | | startFackID = 1000 + actionCount
|
| | | FakeName = GameWorld.GbkToCode("假名字")
|
| | | for fackID in range(startFackID, startFackID + fackCount):
|
| | |
|
| | | return isSendGameServer
|
| | |
|
| | | playerID = fackID
|
| | | playerName = "%s%s" % (FakeName, fackID)
|
| | | |
| | | if randValue1 and randValue2 and randValue1 <= randValue2: |
| | | cutPrice = random.randint(randValue1, randValue2)
|
| | | else:
|
| | | cutPrice = PlayerFamilyZhenbaoge.CalcCutPrice(curFamily, gActionData, playerID)
|
| | | |
| | | if not cutPrice:
|
| | | continue
|
| | | |
| | | actionData = PlayerFamilyZhenbaoge.AddCutPrice(familyID, playerID, playerName, cutPrice, gActionData, False)
|
| | | syncActionDataList.append(actionData)
|
| | | nowPrice = PlayerFamilyZhenbaoge.GetFAPriceFinal(gActionData)
|
| | | GameWorld.DebugAnswer(curPlayer, "砍价人次:%s,砍价:%s,现价:%s" % (fackID % 1000, cutPrice, nowPrice))
|
| | | |
| | | PlayerFamily.SendFamilyAction(syncActionDataList)
|
| | | nowPrice = PlayerFamilyZhenbaoge.GetFAPriceFinal(gActionData)
|
| | | GameWorld.DebugAnswer(curPlayer, "添加假砍价数:%s,总砍价数:%s,当前价格:%s" % (fackCount, familyAction.Count() - 1, nowPrice))
|
| | | return
|