| | |
| | | import PlayerBillboard
|
| | | import GameServerRefresh
|
| | | import IPY_GameWorld
|
| | | import PlayerGameWallow
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import DataRecordPack
|
| | |
| | | import PyGameData
|
| | | import PlayerFeastTravel
|
| | | import PlayerActTurntable
|
| | | import GameLogic_CrossDemonKing
|
| | | import PlayerCostRebate
|
| | | import PlayerActLunhuidian
|
| | | import PlayerActGarbageSorting
|
| | |
| | | # 需要动态分布线路的地图,发送到跨服服务器进行分配
|
| | | if mapID in ChConfig.Def_CrossDynamicLineMap:
|
| | | extendInfo = {}
|
| | | if mapID == ChConfig.Def_FBMapID_CrossDemonKing:
|
| | | bossID = GameLogic_CrossDemonKing.GetCurFBLineBOSSID(mapID, lineID)
|
| | | if not bossID:
|
| | | return
|
| | | extendInfo["BossID"] = bossID
|
| | | |
| | | msgDict = {"PlayerID":curPlayer.GetPlayerID(), "MapID":mapID, "FuncLineID":lineID, "LV":curPlayer.GetLV()}
|
| | | if extendInfo:
|
| | | msgDict.update(extendInfo)
|
| | |
| | | # @return 无意义
|
| | | # @remarks 刷新玩家时钟,切地图玩家时钟记录清空,处理相应逻辑
|
| | | def RefreshPlayerTick(curPlayer):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | |
| | | #防沉迷切线时间
|
| | | PlayerGameWallow.DoLogic_WallowOnlineTime(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | #---钱不够 返回假如果需要提示的话 提示信息---
|
| | | if needMoneyCount < Price:
|
| | | if needNotify and notifyCode:
|
| | | NotifyCode(curPlayer, notifyCode)
|
| | | pass#NotifyCode(curPlayer, notifyCode)
|
| | | GameWorld.DebugLog("货币不足: TYPE_Price=%s, Price=%s, curMoneyCount=%s" % (TYPE_Price, Price, needMoneyCount))
|
| | | return False
|
| | |
|
| | |
| | | gold = curPlayer.GetGold() # 元宝
|
| | |
|
| | | if goldPaper + gold < Price: # 钱不够
|
| | | if needNotify:
|
| | | NotifyCode(curPlayer, "GoldErr")
|
| | | #if needNotify:
|
| | | # NotifyCode(curPlayer, "GoldErr")
|
| | | return []
|
| | |
|
| | | if goldPaper >= Price: # 只用礼券就够了
|
| | |
| | | __PayMoneyAfter(curPlayer, type_Price, lostMoney, costType, infoDict, quantity, costVIPGold)
|
| | |
|
| | | #通知客户端失去金钱
|
| | | if isNotify:
|
| | | if type_Price == ShareDefine.TYPE_Price_PayCoin:
|
| | | NotifyCode(curPlayer, "LostMoney", [type_Price, str(round(lostMoney/100.0, 2))])
|
| | | else:
|
| | | NotifyCode(curPlayer, "LostMoney", [type_Price, lostMoney])
|
| | | #if isNotify:
|
| | | # if type_Price == ShareDefine.TYPE_Price_PayCoin:
|
| | | # NotifyCode(curPlayer, "LostMoney", [type_Price, str(round(lostMoney/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "LostMoney", [type_Price, lostMoney])
|
| | | return True
|
| | |
|
| | | ## 付款以后后续操作
|
| | |
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntBooty % itemID, unXiantaoCntBooty + price)
|
| | |
|
| | | PlayerPrestigeSys.AddRealmTaskValue(curPlayer, PlayerPrestigeSys.RealmTaskType_UseXiantao, price)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_CutTree, price)
|
| | | |
| | | |
| | | unitPrice = price if quantity == 1 else int(math.ceil(price * 1.0 / quantity)) # 单价
|
| | | #reason_name = "Unknown" if not costType else costType
|
| | | reason_name = costType
|
| | |
| | | if priceType == ShareDefine.TYPE_Price_PayCoinDay:
|
| | | priceType = ShareDefine.TYPE_Price_PayCoin
|
| | |
|
| | | if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | | #通知客户端得到金钱
|
| | | if priceType == ShareDefine.TYPE_Price_PayCoin:
|
| | | NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | else:
|
| | | NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | #if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | | # #通知客户端得到金钱
|
| | | # if priceType == ShareDefine.TYPE_Price_PayCoin:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | __GiveMoneyAfter(curPlayer, priceType, value, giveType, addDataDict)
|
| | |
|
| | | if befMoney == 0:
|
| | |
| | | # @param wave: 第x波
|
| | | value = ComMainLevelValue(chapterID, levelNum, wave)
|
| | | SetMainLevelPassValue(curPlayer, value)
|
| | | if wave == 0:
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_MainLevel)
|
| | | return value
|
| | | def GetMainLevelPassInfo(curPlayer):
|
| | | ## 获取主线关卡过关进度信息
|