From 93367a2607db214ec6dda86bd796c1291bc06a49 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 27 三月 2019 15:29:05 +0800
Subject: [PATCH] 3167 【BUG】【2.0】拍卖,消耗了仙玉没获得拍品
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py | 45 +++++++++++++++++++++++++++++++++------------
1 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py
index 1527607..b30b0b6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py
@@ -29,8 +29,12 @@
import ItemCommon
import ItemControler
import EventReport
+import EventShell
import ChPyNetSendPack
import NetPackCommon
+import PlayerSuccess
+import PlayerWeekParty
+import PlayerActLogin
import BuffSkill
import random
@@ -111,19 +115,26 @@
return
starCnt, lineList = GetIceLodeAllStarCnt(curPlayer)
if not lineList:
- __RandomLine(curPlayer)
+ __RandomLine(curPlayer, lineList)
SyncIceLoddInfo(curPlayer)
return
-def __RandomLine(curPlayer):
+def __RandomLine(curPlayer, oldlineList):
# 随机今日玩法
maxCnt, randomCnt = IpyGameDataPY.GetFuncEvalCfg('IceLodeCfg', 2)
lineList = range(maxCnt)
- random.shuffle(lineList)
- for i, lineID in enumerate(lineList):
- GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_IceLoadLineID, lineID, 0 if i >= randomCnt else 1)
+ newlineList = list(set(lineList) - set(oldlineList))
+ if len(newlineList) < randomCnt:
+ random.shuffle(oldlineList)
+ newlineList += oldlineList[:randomCnt-len(newlineList)]
+ else:
+ random.shuffle(newlineList)
+ newlineList = newlineList[:randomCnt]
+ #random.shuffle(lineList)
+ for lineID in lineList:
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_IceLoadLineID, lineID, 1 if lineID in newlineList else 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeDayLV, curPlayer.GetLV())
- GameWorld.DebugLog(' 随机冰晶矿脉今日玩法 lineList =%s'%(lineList[:randomCnt]), curPlayer.GetID())
+ GameWorld.DebugLog(' 随机冰晶矿脉今日玩法 oldlineList=%s, newlineList =%s'%(oldlineList, newlineList), curPlayer.GetID())
return
## 是否能够通过活动查询进入
@@ -165,6 +176,7 @@
# @param tick
# @return None
def DoEnterFB(curPlayer, tick):
+ PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default * 2)
playerID = curPlayer.GetPlayerID()
mapID = GameWorld.GetGameWorld().GetMapID()
gameFB = GameWorld.GetGameFB()
@@ -219,7 +231,7 @@
# @param tick 时间戳
# @return 无意义
def DoExitFB(curPlayer, tick):
-
+ PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default)
return
##玩家主动离开副本.
@@ -227,6 +239,7 @@
# @param tick 时间戳
# @return 返回值无意义
def DoPlayerLeaveFB(curPlayer, tick):
+ PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default)
return
##玩家切换地图
@@ -552,6 +565,8 @@
FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID) # 同步信息
if not lastStar and not isInFBOnDay: #每日活动
PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_IceLode)
+ PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_IceLode, 1)
+ PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_IceLode, 1)
if isInFBOnDay: #在副本里过天,副本结束后再补发星级奖励
CheckIceLodeStarAwardMail(curPlayer)
@@ -573,10 +588,13 @@
PlayerControl.SendMailByKey('', [curPlayer.GetID()], itemList)
else:
for itemID, itemCount, isBind in itemList:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem])
+ ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
jsonItemList = FBCommon.GetJsonItemList(itemList)
overDict[FBCommon.Over_itemInfo] = jsonItemList
+ EventShell.EventRespons_FBEvent(curPlayer, 'icelode')
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_IceLode, 1)
+
# 通知结果
__SendIceLodeOverInfo(curPlayer, overDict)
@@ -654,7 +672,7 @@
PlayerControl.SendMailByKey(0, [curPlayer.GetID()], itemList)
else:
for itemID, itemCnt, isBind in itemList:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
+ ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
#直接将5条线星级改为3星
addCnt = 0
starCnt, lineList = GetIceLodeAllStarCnt(curPlayer)
@@ -664,6 +682,9 @@
addCnt += 1
GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineid, 3, False, [mapID])
PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_IceLode, addCnt)
+ PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_IceLode, addCnt)
+ PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_IceLode, addCnt)
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_IceLode, len(lineList))
FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID) # 同步信息
# npcCountDict = {}
# iceLodeSweepDict = IpyGameDataPY.GetFuncEvalCfg('IceLodeSweep')
@@ -718,7 +739,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeStarAwardRecord, awardRecord|pow(2, starIndex))
for itemID, itemCount, isBind in awardList:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem])
+ ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
#通知
SyncIceLoddInfo(curPlayer)
return
@@ -732,7 +753,7 @@
if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_IceLoadLineID, i):
starCnt += GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, i, False, [ChConfig.Def_FBMapID_IceLode])
lineList.append(i)
- if len(lineList) != randomCnt:
+ if lineList and len(lineList) != randomCnt:
GameWorld.ErrLog(' 冰晶矿脉获取当前总星数,当前线路数量异常!lineList=%s'%lineList)
return starCnt, lineList[:randomCnt]
@@ -774,7 +795,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeStarAwardRecord, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IceLodeHasSweep, 0)
#随机今日玩法
- __RandomLine(curPlayer)
+ __RandomLine(curPlayer, lineList)
#通知
SyncIceLoddInfo(curPlayer)
return True
--
Gitblit v1.8.0