From b56df043e01be629f731c5d52ecb64cc7f7f2b60 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 27 五月 2019 20:05:19 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py | 35 +++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 20 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py | 30 ++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py | 5 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py | 27 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 26 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py | 7 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 12 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 14 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 17 ++-
PySysDB/PySysDBPY.h | 4
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 25 +++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 4
18 files changed, 154 insertions(+), 92 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 7c518c2..d18f9fb 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -470,6 +470,8 @@
DWORD CftBleedDamage; //流血伤害系数
DWORD CftFaintRate; //击晕系数
DWORD CftSuperHitReduce; //暴击抗性系数
+ DWORD CftSuperHitRate; //暴击率系数
+ DWORD CftLuckyHitRate; //会心一击率系数
DWORD CftLuckyHitRateReduce; //会心一击抗性系数
DWORD CftSkillAtkRate; //技能伤害系数
DWORD CftSkillAtkRateReduce; //技能减伤系数
@@ -855,7 +857,7 @@
BYTE AlchemyQuality; //秘方品级
DWORD LearnNeedItemID; //丹方物品ID
BYTE LearnNeedAlchemLV; //丹方需要炼丹等级
- WORD LearnNeedLuck; //丹方需要慧根
+ WORD LearnNeedLingGenPoint; //丹方需要总灵根点数
WORD NeedTime; //炼丹时间(秒)
WORD AlchemyExp; //炼丹获得经验值
dict Material; //炼丹材料
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 4566fe8..0ed47d8 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1462,7 +1462,8 @@
DailyActionID_SkyTower, # 天星塔 23
DailyActionID_HorsePetBoss, # 骑宠BOSS 24
DailyActionID_FairyDomain, # 缥缈仙域 25
-) = range(1, 25 + 1)
+DailyActionID_LVUP, # 玩家等级提升 26
+) = range(1, 26 + 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 795c1fc..6d279e2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3789,11 +3789,13 @@
# 每日活跃度
Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s" # 活跃度类型对应完成次数
-Def_PDict_Activity_TotalPoint = "Activity_TotalPoint" # 当前总活跃值
+Def_PDict_Activity_TotalPoint = "Activity_TotalPoint" # 当前总活跃值(不可消耗)
+Def_PDict_ActivityCanCostTotalPoint = "ActivityCanCostTotalPoint" # 当前总活跃值(可消耗)
Def_PDict_ActivityAwardRecord = "ActivityAwardRecord" # 活跃度奖励领取记录,按二进制位标识
Def_PDict_Activity_AwardStage = "Activity_AwardStage" # 当前活跃奖励阶段
Def_PDict_Activity_RealmPoint = "Activity_RealmPoint" # 当前可领修行点
Def_PDict_Activity_ExtraRealmPoint = "Activity_ExtraRealmPoint" # 多倍活动额外获得的修行点
+
# 每日活动
Def_PDict_DailyActionDayTimes = "DailyActionDayTimes_%s" # 每日活动今日完成次数 参数每日活动ID
Def_PDict_DailyActionDayBuyTimes = "DADayBuyTimes_%s" # 每日活动今日购买次数 参数每日活动ID
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 6b0d69c..dad99c3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7205,18 +7205,18 @@
# @return None <Classlvpluslv classLV="" plusLV="" value="cnt"/>
def ConditionType_Classlvpluslv(curPlayer, curMission, curActionNode):
classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classLV"), 0)
- if not classLV:
- return
+ classLVList = [classLV] if classLV else xrange(1, IpyGameDataPY.GetFuncCfg('EquipMaxClasslv') + 1)
needPlusLV = GameWorld.ToIntDef(curActionNode.GetAttribute("plusLV"), 0)
totalCnt = 0
equipPlaceList = ChConfig.Pack_EquipPart_CanPlusStar[IPY_GameWorld.rptEquip]
for equipPlace in equipPlaceList:
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
- partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
- if partStarLV >= needPlusLV:
- totalCnt += 1
+ for classLV in classLVList:
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
+ if not ipyData:
+ continue
+ partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
+ if partStarLV >= needPlusLV:
+ totalCnt += 1
return totalCnt >= GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
##装备总星级
@@ -7235,10 +7235,10 @@
##已镶嵌X等级宝石数量
# @param None
-# @return None <Equiptotalstone value="cnt" stoneLV=""/>
+# @return None <Equipstonecnt value="cnt" stoneLV=""/>
def ConditionType_Equipstonecnt(curPlayer, curMission, curActionNode):
totalCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
- stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("lv"), 0)
+ stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("stoneLV"), 0)
return Operate_EquipStone.GetStoneCntByLV(curPlayer, stoneLV) >= totalCnt
##设置已镶嵌X等级宝石数量
@@ -7246,11 +7246,11 @@
# @param curMission 任务实例
# @param curActionNode节点信息
# @return 返回值无意义
-# @remarks <Set_Equiptotalstone key="" stoneLV="[]"/>
-def DoType_Set_Equiptotalstone(curPlayer, curMission, curActionNode):
+# @remarks <Set_Equipstonecnt key="" stoneLV="宝石等级"/>
+def DoType_Set_Equipstonecnt(curPlayer, curMission, curActionNode):
key = curActionNode.GetAttribute("key")
questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
- stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("lv"), 1)
+ stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("stoneLV"), 1)
if questID != 0:
curMission = curPlayer.FindMission(questID)
curMission.SetProperty(key, Operate_EquipStone.GetStoneCntByLV(curPlayer, stoneLV))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
index 106d354..ed59550 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
@@ -54,8 +54,11 @@
ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':fdEventID})
if ipyData:
conditionList = ipyData.GetCondition()
- condition = random.choice(conditionList)
- index = conditionList.index(condition)
+ if conditionList:
+ condition = random.choice(conditionList)
+ index = conditionList.index(condition)
+ else:
+ index = 0
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
#设置寻访中
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
index 5b39e56..f761133 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -2207,14 +2207,14 @@
return
-## 自定义场景采集OK
+## 自定义场景采集OK,需自带是否允许采集的判断
def OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID):
do_FBLogic_ID = __GetFBLogic_MapID(mapID)
callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCustomSceneCollectOK"))
if callFunc:
- callFunc(curPlayer, mapID, lineID, npcID)
+ return callFunc(curPlayer, mapID, lineID, npcID)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
index 481a950..c5c510a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -167,6 +167,11 @@
return
+## 自定义场景采集OK,需自带是否允许采集的判断
+def OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID):
+ curState = PlayerFairyDomain.GetFairyDomainFBEventState(curPlayer, mapID, lineID)
+ return curState == PlayerFairyDomain.FDEventState_Visiting
+
def DecCustomSceneNPCCount(curPlayer, npcID):
## 减少草园自定义场景NPC,默认减少一个
mapID = GetGrasslandMapID(curPlayer)[0]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
index f055deb..c679175 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
@@ -37,7 +37,7 @@
return
return True
-## 自定义场景采集OK
+## 自定义场景采集OK,需自带是否允许采集的判断
def OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID):
curState = PlayerFairyDomain.GetFairyDomainFBEventState(curPlayer, mapID, lineID)
@@ -76,6 +76,6 @@
overDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(giveItemList)}
FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_FairyTreasure, lineID, 1, overDict)
- return
+ return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py
index db0aae0..3a9d6bf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SealDemon.py
@@ -69,6 +69,12 @@
maxCnt = FBCommon.GetEnterFBMaxCnt(curPlayer, mapID)
if enterCnt + 2 > maxCnt:
return False
+ if lineID in newbielineList:
+ hasEnter = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False,
+ [ChConfig.Def_FBMapID_SealDemon])
+ if hasEnter:
+ GameWorld.DebugLog(" 已进入过该新手线路 %s" % lineID)
+ return False
return True
@@ -471,7 +477,7 @@
#for _ in xrange(addCnt):
jsonItemList, totalExp, totalMoney = NPCCommon.GiveKillNPCDropPrize(curPlayer, ChConfig.Def_FBMapID_SealDemon, {bossID:addCnt},
mailTypeKey="SealDemonMail", isMail=isMail, prizeMultiple=prizeMultiple,
- dropItemMapInfo=dropItemMapInfo)
+ dropItemMapInfo=dropItemMapInfo,isVirtualDrop=isClientSend)
for jsonItem in jsonItemList:
if 'UserData' in jsonItem:
equipList.append(jsonItem)
@@ -573,22 +579,13 @@
if rank == 1:
bossID = CurFBLineBOSSID(lineID)
NPCCommon.GameServer_KillGameWorldBoss(bossID, curPlayer.GetName(), hurt, False)
-
- if not prizeItemList:
- leaveTick = FBCommon.GetFBLineStepTime(mapID, lineID) * 1000
- GameWorld.Log("没有奖励,直接通知前端结算!mapID=%s,lineID=%s" % (mapID, lineID), curPlayer.GetPlayerID())
- curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
- overDict = {FBCommon.Over_rank:rank, FBCommon.Over_itemInfo:prizeItemList}
- FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_SealDemon, lineID, 1, overDict)
- return
-
- gameFB = GameWorld.GetGameFB()
- tick = GameWorld.GetGameWorld().GetTick()
- gameFB.SetGameFBDict(FBDict_IsOver, tick)
- gameFB.SetPlayerGameFBDict(curPlayer.GetPlayerID(), FBPlayerDict_Rank, rank)
- curPlayer.Sync_TimeTick(ChConfig.tttPickupItem, 0, ChConfig.Def_FBPickupItemTime, True)
- return
+ #GameWorld.Log("通知前端结算!mapID=%s,lineID=%s" % (mapID, lineID), curPlayer.GetPlayerID())
+ overDict = {FBCommon.Over_rank:rank, FBCommon.Over_itemInfo:prizeItemList}
+ FBCommon.NotifyFBOver(curPlayer, mapID, lineID, 1, overDict)
+ PlayerControl.SetCustomMap(curPlayer, 0, 0)
+ return
+
def GetBossRemainHPPer(copyMapID, funcLineID, tick):
bossID = CurFBLineBOSSID(funcLineID)
@@ -642,4 +639,3 @@
packData.OldDouble = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FMTOldDouble)
NetPackCommon.SendFakePack(curPlayer, packData)
return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 80004a6..74a5e84 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -389,6 +389,8 @@
("DWORD", "CftBleedDamage", 0),
("DWORD", "CftFaintRate", 0),
("DWORD", "CftSuperHitReduce", 0),
+ ("DWORD", "CftSuperHitRate", 0),
+ ("DWORD", "CftLuckyHitRate", 0),
("DWORD", "CftLuckyHitRateReduce", 0),
("DWORD", "CftSkillAtkRate", 0),
("DWORD", "CftSkillAtkRateReduce", 0),
@@ -703,7 +705,7 @@
("BYTE", "AlchemyQuality", 0),
("DWORD", "LearnNeedItemID", 0),
("BYTE", "LearnNeedAlchemLV", 0),
- ("WORD", "LearnNeedLuck", 0),
+ ("WORD", "LearnNeedLingGenPoint", 0),
("WORD", "NeedTime", 0),
("WORD", "AlchemyExp", 0),
("dict", "Material", 0),
@@ -2201,6 +2203,8 @@
self.CftBleedDamage = 0
self.CftFaintRate = 0
self.CftSuperHitReduce = 0
+ self.CftSuperHitRate = 0
+ self.CftLuckyHitRate = 0
self.CftLuckyHitRateReduce = 0
self.CftSkillAtkRate = 0
self.CftSkillAtkRateReduce = 0
@@ -2232,6 +2236,8 @@
def GetCftBleedDamage(self): return self.CftBleedDamage # 流血伤害系数
def GetCftFaintRate(self): return self.CftFaintRate # 击晕系数
def GetCftSuperHitReduce(self): return self.CftSuperHitReduce # 暴击抗性系数
+ def GetCftSuperHitRate(self): return self.CftSuperHitRate # 暴击率系数
+ def GetCftLuckyHitRate(self): return self.CftLuckyHitRate # 会心一击率系数
def GetCftLuckyHitRateReduce(self): return self.CftLuckyHitRateReduce # 会心一击抗性系数
def GetCftSkillAtkRate(self): return self.CftSkillAtkRate # 技能伤害系数
def GetCftSkillAtkRateReduce(self): return self.CftSkillAtkRateReduce # 技能减伤系数
@@ -2856,7 +2862,7 @@
self.AlchemyQuality = 0
self.LearnNeedItemID = 0
self.LearnNeedAlchemLV = 0
- self.LearnNeedLuck = 0
+ self.LearnNeedLingGenPoint = 0
self.NeedTime = 0
self.AlchemyExp = 0
self.Material = {}
@@ -2868,7 +2874,7 @@
def GetAlchemyQuality(self): return self.AlchemyQuality # 秘方品级
def GetLearnNeedItemID(self): return self.LearnNeedItemID # 丹方物品ID
def GetLearnNeedAlchemLV(self): return self.LearnNeedAlchemLV # 丹方需要炼丹等级
- def GetLearnNeedLuck(self): return self.LearnNeedLuck # 丹方需要慧根
+ def GetLearnNeedLingGenPoint(self): return self.LearnNeedLingGenPoint # 丹方需要总灵根点数
def GetNeedTime(self): return self.NeedTime # 炼丹时间(秒)
def GetAlchemyExp(self): return self.AlchemyExp # 炼丹获得经验值
def GetMaterial(self): return self.Material # 炼丹材料
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 342bef8..2b9d7b3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5830,19 +5830,22 @@
#};
def OnGetCustomSceneCollectAward(index, clientData, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ playerID = curPlayer.GetPlayerID()
npcID = clientData.NPCID
if not curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
- GameWorld.DebugLog("非自定义场景中,无法获取定义采集奖励!")
+ GameWorld.ErrLog("非自定义场景中,无法获取定义采集奖励!", playerID)
return
mapID = PlayerControl.GetCustomMapID(curPlayer)
lineID = PlayerControl.GetCustomLineID(curPlayer)
- GameWorld.DebugLog("前端场景采集: mapID=%s,lineID=%s,npcID=%s" % (mapID, lineID, npcID))
+ GameWorld.Log("前端场景采集: mapID=%s,lineID=%s,npcID=%s" % (mapID, lineID, npcID), playerID)
+ if not mapID:
+ GameWorld.ErrLog("无自定义场景地图ID,不允许采集!", playerID)
+ return
- if mapID:
- #if FBCommon.GetCustomMapStep(curPlayer, mapID, lineID) != ChConfig.CustomMapStep_Fight:
- # return
- FBLogic.OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID)
-
+ if not FBLogic.OnCustomSceneCollectOK(curPlayer, mapID, lineID, npcID):
+ GameWorld.ErrLog("自定义场景地图不允许采集! mapID=%s,lineID=%s,npcID=%s" % (mapID, lineID, npcID), playerID)
+ return
+
collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
if collectNPCIpyData:
DoGiveCollectNPCAward(curPlayer, npcID, collectNPCIpyData)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 898b782..a2d2c12 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -4093,6 +4093,13 @@
''' 检查可否复活,为了逻辑统一,这里不适用玩家所在的地图,支持跨服状态下判断跨服地图
本函数不验证玩家死亡状态等,因为有可能前后端复活状态不一致,如果这里拦住可能导致前端躺尸复活不了
'''
+
+ if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
+ # 当血量大于0收到复活请求时,一般是前后端复活状态不一致的情况下导致的
+ # 由于前端需要根据复活状态判断复活界面相关逻辑,所以这里需要做一些特殊处理,防止某些情况下前后端复活状态不一致导致的一些异常问题
+ # 后端非死亡状态的情况,补同步一次复活包给前端
+ SyncPlayerReborn(curPlayer, rebornType)
+ return
if rebornType not in ChConfig.Def_RebornTypeList:
return
@@ -4151,13 +4158,6 @@
def __DoPlayerReborn(curPlayer, rebornType, tick, mapBornPlace=0, isAddSuperBuff=True):
## 执行玩家复活逻辑,该函数没有执行验证是否可复活等,不可直接调用
-
- if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie:
- # 当血量大于0收到复活请求时,一般是前后端复活状态不一致的情况下导致的
- # 由于前端需要根据复活状态判断复活界面相关逻辑,所以这里需要做一些特殊处理,防止某些情况下前后端复活状态不一致导致的一些异常问题
- # 后端非死亡状态的情况,补同步一次复活包给前端
- SyncPlayerReborn(curPlayer, rebornType)
- return
resetHpPercent = ChConfig.Def_MaxRateValue
isFBReborn = False
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index 8148b50..4342383 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -245,8 +245,7 @@
addValue = addValue + addExtraPoint
curTotalPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
- #realmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
- #__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint, realmPoint+addValue)
+ AddCanCostActivityPoint(curPlayer, addValue)
SyncDailyActivityInfo(curPlayer)
GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s"
@@ -268,6 +267,21 @@
return multiple, extraPointLimit
return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit()
+def AddCanCostActivityPoint(curPlayer, addValue):
+ # 增加可消耗的活跃点
+ curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
+ __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, min(IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint'), curPoint + addValue))
+ return
+
+def CostActivityPoint(curPlayer, costPoint):
+ # 消耗活跃点
+ curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
+ if curPoint < costPoint:
+ return
+ __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint,
+ curPoint - costPoint)
+ SyncDailyActivityInfo(curPlayer)
+ return True
## 同步活跃度信息
# @param curPlayer
@@ -279,7 +293,7 @@
sendPack.CurValue = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
- sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
+ sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
NetPackCommon.SendFakePack(curPlayer, sendPack)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 9492c61..bd5cfad 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3570,7 +3570,7 @@
attrName = self.__AttrName % attrIndex
setattr(self, attrName, getattr(self, attrName) + value)
- def GetModuleFightPower(self, fpParam, job):
+ def GetModuleFightPower(self, fpParam, curPlayer):
MaxHP = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_AttrMaxHP) # 最大血量
MinAtk = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_AttrATKMin) # 最小攻击
MaxAtk = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_AttrATKMax) # 最大攻击
@@ -3578,11 +3578,11 @@
Hit = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_AttrHit) * fpParam.GetCftHit() # 命中值
Miss = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_AttrMiss) * fpParam.GetCftMiss() # 闪避值
AtkSpeed = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_AttrAtkSpeed) # 攻击速度(数值非攻击间隔)
- SuperHitRate = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_SuperHitRate) # 暴击率
+ SuperHitRate = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_SuperHitRate) * fpParam.GetCftSuperHitRate() # 暴击率
SuperHitRateReduce = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_SuperHitRateReduce) # 暴击概率抗性
SuperHit = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_SuperHit) # 暴击伤害固定值
SuperHitReduce = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_SuperHitReduce) * fpParam.GetCftSuperHitReduce() # 暴击固定减伤
- LuckyHitRate = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_LuckyHitRate) # 会心一击
+ LuckyHitRate = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_LuckyHitRate) * fpParam.GetCftLuckyHitRate() # 会心一击
LuckyHitRateReduce = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_LuckyHitRateReduce) * fpParam.GetCftLuckyHitRateReduce() # 会心一击概率抗性
LuckyHit = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_LuckyHit) # 会心一击伤害固定值
LuckyHitReduce = getattr(self, self.__AttrName % ChConfig.TYPE_Calc_LuckyHitReduce) # 会心一击伤害固定减伤
@@ -3640,6 +3640,11 @@
AtkSpeedParameter = fpParam.GetCftAtkSpeed()
LuckyHitParameter = fpParam.GetCftLuckyHit()
+ #取总属性的
+ SuperHitRateTotal = curPlayer.GetSuperHitRate()
+ LuckyHitRateTotal = curPlayer.GetLuckyHitRate()
+
+ job = curPlayer.GetJob()
diffAttrDict = self.__GetAttrFightPowerParamDiff(job)
for paramName, diffValue in diffAttrDict.items():
exec("%s = max(0, %s - %s)" % (paramName, paramName, diffValue))
@@ -4035,6 +4040,7 @@
if aftLV > befLV:
curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
+ PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_LVUP, aftLV - befLV)
if aftFreePoint > befFreePoint:
curPlayer.SetFreePoint(aftFreePoint)
#NotifyCode(curPlayer, "ObtainAttributeDot", [aftFreePoint - befFreePoint])
@@ -4081,6 +4087,7 @@
OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
#神秘限购
FunctionNPCCommon.MysticalLimitShopOpen(curPlayer, befLV, aftLV)
+
#不需要做升级任务, 设置玩家经验
SetPlayerTotalExp(curPlayer, curTotalExp)
return
@@ -4531,6 +4538,7 @@
curLV = curPlayer.GetLV()
fpParam = IpyGameDataPY.GetIpyGameData("FightPowerParam", curLV)
mfpDict = {} # 模块战斗力
+ mfpObjDict = {}
for mfpType, attrFuncIndexList in ChConfig.MFPTypeAttrFuncIndexDict.items():
mfpAttrList = [{} for _ in range(4)]
mfpAttrExDict = {}
@@ -4556,8 +4564,11 @@
mfpObj.SetCalcMFPBattleAttr(mfpAttrList)
for attrIndex, value in mfpAttrExDict.items():
mfpObj.AddCalcMFPAttr(attrIndex, value)
-
- mfpValue = 0 if not fpParam else mfpObj.GetModuleFightPower(fpParam, curPlayer.GetJob())
+ mfpObjDict[mfpType] = mfpObj
+
+ # 因为计算战力需要取到总属性,所以等各功能点属性累加完后再计算
+ for mfpType, mfpObj in mfpObjDict.items():
+ mfpValue = 0 if not fpParam else mfpObj.GetModuleFightPower(fpParam, curPlayer)
mfpSkill = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPSkill % mfpObj.mfpType)
mfpEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPEx % mfpObj.mfpType)
mfpTotal = mfpValue + mfpSkill + mfpEx
@@ -6285,7 +6296,9 @@
# addAttrList[ChConfig.CalcAttr_BattleNoline] = {}
# return addAttrList
#===============================================================================
-
+def GetTotalLingGenPoint(curPlayer):
+ # 总灵根点数(金木水火土+自由点数)
+ return GetMetal(curPlayer) + GetWood(curPlayer) + GetWater(curPlayer) + GetFire(curPlayer) + GetEarth(curPlayer) + curPlayer.GetFreePoint()
# 灵根 - 金木水火土
def GetMetal(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_Metal)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
index 751177c..693d3c0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
@@ -481,31 +481,48 @@
def DoEnterCustomScene(curPlayer, mapID, lineID, tick):
## 进入自定义场景状态
-
- resultPack = ChPyNetSendPack.tagMCStartCustomSceneResult()
- resultPack.MapID = mapID
- resultPack.FuncLineID = lineID
+ playerID = curPlayer.GetPlayerID()
+ GameWorld.Log("玩家请求进入自定义场景!mapID=%s,lineID=%s" % (mapID, lineID), playerID)
+ if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
+ curMapID = PlayerControl.GetCustomMapID(curPlayer)
+ curLineID = PlayerControl.GetCustomLineID(curPlayer)
+ if mapID == curMapID and lineID == curLineID:
+ GameWorld.Log(" 玩家当前已经在自定义场景中!无需重新请求!", playerID)
+ result = 1
+ else:
+ GameWorld.Log(" 玩家当前在不同的自定义场景中!不允许进入!curMapID=%s,curLineID=%s"
+ % (curMapID, curLineID), playerID)
+ result = 0
+ StartCustomSceneResult(curPlayer, mapID, lineID, result)
+ return
#进入副本通用检查
if mapID:
fbIpyData = FBCommon.GetFBIpyData(mapID)
fbLineIpyData = FBCommon.GetFBLineIpyData(mapID, lineID)
if PlayerControl.CheckMoveToFB(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData, tick) != ShareDefine.EntFBAskRet_OK:
- resultPack.Result = 0
- NetPackCommon.SendFakePack(curPlayer, resultPack)
- PlayerControl.SetCustomMap(curPlayer, 0, 0)
+ StartCustomSceneResult(curPlayer, mapID, lineID, 0)
return
PlayerControl.SetPlayerSightLevel(curPlayer, curPlayer.GetID())
curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomScene, 1) # 由于前端不一定有发mapID,所以这里额外记录这个状态,不能直接用mapID判断
PlayerControl.SetCustomMap(curPlayer, mapID, lineID)
- GameWorld.Log("玩家开始自定义场景!mapID=%s,lineID=%s" % (mapID, lineID), curPlayer.GetPlayerID())
+ GameWorld.Log("玩家开始自定义场景!mapID=%s,lineID=%s" % (mapID, lineID), playerID)
if mapID:
FBLogic.OnEnterCustomScene(curPlayer, mapID, lineID)
#通知进入状态
- resultPack.Result = 1
+ StartCustomSceneResult(curPlayer, mapID, lineID, 1)
+ return
+
+def StartCustomSceneResult(curPlayer, mapID, lineID, result):
+ if result != 1:
+ DoExitCustomScene(curPlayer)
+ resultPack = ChPyNetSendPack.tagMCStartCustomSceneResult()
+ resultPack.MapID = mapID
+ resultPack.FuncLineID = lineID
+ resultPack.Result = result
NetPackCommon.SendFakePack(curPlayer, resultPack)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
index a181345..e9a74cc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -135,9 +135,9 @@
if fairyDomainState == 1:
GameWorld.DebugLog(" 正在寻访仙域中!请先退出寻访")
return
-
- if fairyDomainState != 2 and not PlayerActivity.AddDailyActionFinishCnt(curPlayer, dailyID):
- GameWorld.DebugLog(" 寻访仙域次数不足!")
+ costPoint = IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint', 2)
+ if not PlayerActivity.CostActivityPoint(curPlayer, costPoint):
+ GameWorld.DebugLog(" 寻访仙域需要活跃点不足!costPoint=%s"%costPoint)
return
#随机事件 重置事件状态
@@ -196,10 +196,10 @@
continue
conditionList = ipyData.GetCondition()
if not conditionList:
- fdEventIDList.remove(fdEventID)
- continue
- condition = random.choice(conditionList)
- index = conditionList.index(condition)
+ index = 0
+ else:
+ condition = random.choice(conditionList)
+ index = conditionList.index(condition)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
if not fdEventIDList:
@@ -444,15 +444,14 @@
gearAwardList = ipyData.GetGearAward()
if not gearAwardList:
return
- itemRateList = gearAwardList[index] if index < len(gearAwardList) else gearAwardList[-1]
- itemRateList = ItemCommon.GetWeightItemListByAlchemyDiffLV(curPlayer, itemRateList, 1)
- giveItemList = [GameWorld.GetResultByWeightList(itemRateList)]
+ giveItemList = []
+ itemRandomList = gearAwardList[index] if index < len(gearAwardList) else gearAwardList[-1]
+ for itemRateList in itemRandomList:
+ itemRateList = ItemCommon.GetWeightItemListByAlchemyDiffLV(curPlayer, itemRateList, 0)
+ giveItemList.append(GameWorld.GetResultByWeightList(itemRateList))
else:
giveItemList = [ipyData.GetBasicAward()]
-
- ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList)
- for itemInfo in giveItemList:
- NPCCommon.SendVirtualItemDrop(curPlayer, itemInfo[0], 0, 0, '')
+ NPCCommon.DoGiveItemByVirtualDrop(curPlayer, giveItemList, 0)
msgDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(giveItemList)}
FBCommon.Notify_FB_Over(curPlayer, msgDict)
GameWorld.DebugLog('缥缈奇遇领奖 msgDict=%s, fdeventID=%s' % (msgDict, fdeventID))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
index 16c7b83..04958df 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
@@ -100,9 +100,9 @@
if alchemyLV < learnNeedAlchemLV:
GameWorld.DebugLog('丹方学习需要炼丹等级 %s' % learnNeedAlchemLV)
return
- learnNeedLuck = alchemyIpyData.GetLearnNeedLuck()
- if curLuckValue < learnNeedLuck:
- GameWorld.DebugLog('丹方学习需要慧根 %s' % learnNeedLuck)
+ learnNeedLingGenPoint = alchemyIpyData.GetLearnNeedLingGenPoint()
+ if PlayerControl.GetTotalLingGenPoint(curPlayer) < learnNeedLingGenPoint:
+ GameWorld.DebugLog('丹方学习需要总灵根点 %s' % learnNeedLingGenPoint)
return
learnNeedItemID = alchemyIpyData.GetLearnNeedItemID()
itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 4566fe8..0ed47d8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1462,7 +1462,8 @@
DailyActionID_SkyTower, # 天星塔 23
DailyActionID_HorsePetBoss, # 骑宠BOSS 24
DailyActionID_FairyDomain, # 缥缈仙域 25
-) = range(1, 25 + 1)
+DailyActionID_LVUP, # 玩家等级提升 26
+) = range(1, 26 + 1)
--
Gitblit v1.8.0