From 5a5c81a1284cf22d38fc7c61239caf5b7f6815cd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 27 十一月 2018 14:53:11 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_IceLode.py | 25 +++++++++++++++++--------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 9 ++++++---
3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index c3f52d5..801bb41 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1694,7 +1694,12 @@
canBuyCnt = PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID)
hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_BuyFbCntDay % mapID)
-
+ maxDayTimes = ipyData.GetDayTimes()
+ maxCnt = GetEnterFBMaxCnt(curPlayer, mapID)
+ enterCnt = GetEnterFBCount(curPlayer, mapID)
+ if maxDayTimes and maxCnt - enterCnt >= maxDayTimes:
+ GameWorld.DebugLog('当前次数已满,无需购买。。')
+ return
if hasBuyCnt >= canBuyCnt:
GameWorld.DebugLog("购买次数已经用完mapID=%s"%mapID)
return
@@ -1716,9 +1721,7 @@
PlayerControl.NotifyCode(curPlayer, 'FBEnterTimeBuy', [mapID])
lastRegainTime= curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainStartTime % mapID)
if lastRegainTime:
- maxDayTimes = ipyData.GetDayTimes()
maxCnt = GetEnterFBMaxCnt(curPlayer, mapID)
- enterCnt = GetEnterFBCount(curPlayer, mapID)
if maxCnt - enterCnt == maxDayTimes:
curTime = int(time.time())
needTime = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainTotalTime % mapID)
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..63c8ba2 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,6 +29,7 @@
import ItemCommon
import ItemControler
import EventReport
+import EventShell
import ChPyNetSendPack
import NetPackCommon
import BuffSkill
@@ -111,19 +112,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
## 是否能够通过活动查询进入
@@ -577,6 +585,7 @@
jsonItemList = FBCommon.GetJsonItemList(itemList)
overDict[FBCommon.Over_itemInfo] = jsonItemList
+ EventShell.EventRespons_FBEvent(curPlayer, 'icelode')
# 通知结果
__SendIceLodeOverInfo(curPlayer, overDict)
@@ -732,7 +741,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 +783,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
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 71b31cb..98f4196 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1219,7 +1219,7 @@
curObjHP_BeforeAttack = GameObj.GetHP(curObj)
if reduceHP :
- lostValue = AttackCommon.CalcAtkProDef(buffOwner, curObj, lostValue)
+ lostValue = AttackCommon.CalcAtkProDef(buffOwner, curObj, lostValue, curSkill, tick)
# 血盾
lostValue = AttackCommon.CalcBloodShield(buffOwner, curObj, lostValue)
--
Gitblit v1.8.0