| | |
| | | import NetPackCommon
|
| | | import DataRecordPack
|
| | | import PlayerPrestigeSys
|
| | | import PlayerActivity
|
| | | import FBCommon
|
| | | import PassiveBuffEffMng
|
| | | import EventReport
|
| | |
| | | import PlayerCostRebate
|
| | | import PlayerActLunhuidian
|
| | | import GY_Query_CrossRealmReg
|
| | | import PlayerTongTianLing
|
| | | import FunctionNPCCommon
|
| | | import PlayerGoldInvest
|
| | | import CrossRealmPlayer
|
| | | import CrossPlayerData
|
| | | import PlayerActivity
|
| | | import ChNetSendPack
|
| | | import PlayerState
|
| | | import PlayerOnline
|
| | | import PlayerTask
|
| | | import PlayerMail
|
| | | import PlayerLLMJ
|
| | | import ChPlayer
|
| | | import GameObj
|
| | |
|
| | |
| | | #银票支付
|
| | | elif type_Price == IPY_GameWorld.TYPE_Price_Silver_Paper:
|
| | | __PayMoneyAfterBySilverPaper(curPlayer, price)
|
| | | |
| | | #活跃度处理
|
| | | PlayerActivity.OnPayMoneyActivity(curPlayer, type_Price, price)
|
| | | |
| | | #转盘活动
|
| | | PlayerActTurntable.OnPlayerUseGold(curPlayer, type_Price, price)
|
| | | #轮回殿
|
| | |
| | | unXiantaoCntBooty = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntBooty % itemID)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntBooty % itemID, unXiantaoCntBooty + price)
|
| | |
|
| | | PlayerLLMJ.AddUseZhanchui(curPlayer, price)
|
| | | PlayerPrestigeSys.AddRealmTaskValue(curPlayer, PlayerPrestigeSys.RealmTaskType_UseXiantao, price)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_CutTree, price)
|
| | | |
| | | PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_CutTree, price)
|
| | |
|
| | | unitPrice = price if quantity == 1 else int(math.ceil(price * 1.0 / quantity)) # 单价
|
| | | #reason_name = "Unknown" if not costType else costType
|
| | |
| | | return
|
| | | updValue = min(ChConfig.Def_UpperLimit_DWord, curCurrency + value)
|
| | | SetPlayerCurrency(curPlayer, priceType, updValue)
|
| | | if priceType == ShareDefine.TYPE_Price_RealmPoint:
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_GetRealmPoint, value)
|
| | | else:
|
| | | GameWorld.ErrLog("金钱类型错误, priceType=%s,value=%s,giveType=%s" % (priceType, value, giveType), curPlayer.GetPlayerID())
|
| | | DataRecordPack.DR_GiveMoneyError(curPlayer, priceType, value, giveType, addDataDict)
|
| | |
| | | # 除钻石及绑钻外,未指定操作类型的不记录
|
| | |
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_GetMoney, value, [priceType])
|
| | | PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_GetMoney, value, [priceType])
|
| | |
|
| | | if priceType == ShareDefine.TYPE_Price_FamilyCoin:
|
| | | PlayerFamily.AddFamilyContrib(curPlayer, value) # 公会币同步增加公会贡献
|
| | |
| | | #aftFreePoint = curPlayer.GetFreePoint()
|
| | | if aftLV > befLV:
|
| | | curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
|
| | | PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_LVUp, aftLV - befLV)
|
| | | #PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_LVUp, aftLV - befLV)
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_LV)
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
|
| | | PlayerActivity.DoAddActivityByLV(curPlayer, befLV, aftLV)
|
| | |
|
| | | #if aftFreePoint > befFreePoint:
|
| | | # curPlayer.SetFreePoint(aftFreePoint)
|
| | |
| | | #if curPlayer.GetMaxMP() > 0:
|
| | | # curPlayer.SetMP(curPlayer.GetMaxMP())
|
| | |
|
| | | # 记录开服活动冲级数据
|
| | | #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
|
| | | #神秘限购
|
| | | FunctionNPCCommon.MysticalLimitShopOpen(curPlayer, befLV, aftLV)
|
| | |
|
| | | #不需要做升级任务, 设置玩家经验
|
| | | SetPlayerTotalExp(curPlayer, curTotalExp)
|
| | | return
|
| | |
| | | lvID = chapterID * 100 + levelNum
|
| | | PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_MainLevel, lvID)
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_MainLevel)
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_MainLevel, lvID)
|
| | | return value
|
| | | def GetMainLevelPassInfo(curPlayer):
|
| | | ## 获取主线关卡过关进度信息
|
| | |
| | |
|
| | | ## 获取佩戴的称号ID
|
| | | def GetTitleID(curPlayer): return curPlayer.GetExAttr3()
|
| | | def SetTitleID(curPlayer, titleID): curPlayer.SetExAttr3(titleID, False, False)
|
| | | def SetTitleID(curPlayer, titleID):
|
| | | curPlayer.SetExAttr3(titleID, False, False)
|
| | | PlayerFamily.RefreshFamilyMember(curPlayer)
|
| | | return
|
| | |
|
| | | ## 协助目标玩家ID
|
| | | def GetAssistTagPlayerID(curPlayer): return 0
|
| | |
| | | ## 获取玩家在本地图中的境界难度层级,必须在境界地图且有选择境界难度才算,否则为默认0;该难度值同时也是视野层级
|
| | | return 0
|
| | |
|
| | |
|
| | | ##玩家退出仙盟信息: 主动离开次数*100 + 被踢次数*10 + 最后一次是否主动离开的
|
| | | def GetLeaveFamilyInfo(curPlayer):
|
| | | # @return: 主动离开次数, 最后一次是否主动离开的
|
| | | value = curPlayer.GetExAttr12()
|
| | | leaveCnt = value / 100
|
| | | kickedCnt = value % 100 / 10
|
| | | lastVoluntarily = value % 10
|
| | | return leaveCnt, kickedCnt, lastVoluntarily
|
| | | def SetLeaveFamilyInfo(curPlayer, leaveCnt, kickedCnt, lastVoluntarily):
|
| | | value = min(9, leaveCnt) * 100 + min(9, kickedCnt) * 10 + lastVoluntarily
|
| | | curPlayer.SetExAttr12(value) # IPY_PlayerDefine.CDBPlayerRefresh_ExAttr12
|
| | | GameWorld.DebugLog(" SetLeaveFamilyInfo: value=%s" % (value))
|
| | | return value
|
| | | ##玩家离开仙盟时间(主动或被踢都算)
|
| | | def GetLeaveFamilyTimeEx(curPlayer):return curPlayer.GetExAttr19()
|
| | | def SetLeaveFamilyTimeEx(curPlayer, value):
|
| | | curPlayer.SetExAttr19(value)
|
| | | #curPlayer.SendGameServerRefreshState(ShareDefine.CDBPlayerRefresh_ExAttr19, value, 0)
|
| | | curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ExAttr19, value, 0, False)
|
| | | return
|
| | | return value
|
| | |
|
| | | ##总战斗力,支持超过20E = 各模块战力总和
|
| | | def GetFightPower(curPlayer): return curPlayer.GetFightPowerEx() * ChConfig.Def_PerPointValue + curPlayer.GetFightPower()
|
| | |
| | |
|
| | | GameWorld.DebugLog("总战力: %s, 历史最高战力: %s, beforeFightPower=%s" % (value, highestFightPower, beforeFightPower), curPlayer.GetPlayerID())
|
| | | #PlayerBillboard.UpdatePlayerFPTotalBillboard(curPlayer)
|
| | | # 记录开服活动数据
|
| | | #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_FightPower, totalFightPower)
|
| | | #if beforeFightPower != totalFightPower:
|
| | | # CrossPlayerData.OnPlayerFightPowerChange(curPlayer)
|
| | | return
|
| | |
| | | # @return 无意义
|
| | | def SetSight(curPlayer, sight):
|
| | | #外挂号 视野验证
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_AutoCheckHack_State) \
|
| | | == ChConfig.Def_AutoCheck_State_Danger:
|
| | | |
| | | if curPlayer.GetSight() > sight:
|
| | | curPlayer.SetSight(sight)
|
| | | |
| | | return
|
| | | |
| | | # if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_AutoCheckHack_State) \
|
| | | # == ChConfig.Def_AutoCheck_State_Danger:
|
| | | # |
| | | # if curPlayer.GetSight() > sight:
|
| | | # curPlayer.SetSight(sight)
|
| | | # |
| | | # return
|
| | | # |
| | | curPlayer.SetSight(sight)
|
| | |
|
| | | ##获取攻击间隔
|
| | |
| | | atkInterval = curPlayer.GetAtkInterval()
|
| | |
|
| | | #外挂号 攻击间隔验证
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_AutoCheckHack_State) \
|
| | | == ChConfig.Def_AutoCheck_State_Danger:
|
| | | atkInterval *= 100
|
| | | #if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_AutoCheckHack_State) \
|
| | | # == ChConfig.Def_AutoCheck_State_Danger:
|
| | | # atkInterval *= 100
|
| | |
|
| | | return atkInterval
|
| | |
|