xdh
2018-10-10 afd62bf31c3c3dc8d6226a581fe1d48adaecad0b
2084 【BUG】【主干】【1.0.18】采集扣血问题
9个文件已修改
73 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Dogz.py 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyWar.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ManorWar.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -862,6 +862,18 @@
    callFunc(tick)
    return
## 开始采集
#  @param curPlayer 当前玩家
#  @param curNPC 当前NPC
#  @return None or False
#  @remarks 函数详细说明.
def OnBeginCollect(curPlayer, curNPC):
    do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())
    callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnBeginCollect"))
    if callFunc:
        callFunc(curPlayer, curNPC)
    return
## 收集中(家族战副本中的棋和塔)
#  @param curPlayer 当前玩家
#  @param tick 当前时间
@@ -879,7 +891,7 @@
#  @param tick 当前时间
#  @return None or False
#  @remarks 函数详细说明.
def OnCollectOK(curPlayer, tick):
def OnCollectOK(curPlayer, npcID, tick):
    do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())
    
    callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCollectOK"))
@@ -889,7 +901,7 @@
        return False
    
    #执行副本逻辑
    callFunc(curPlayer, tick)
    callFunc(curPlayer, npcID, tick)
    return
## 玩家离开副本
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Dogz.py
@@ -42,8 +42,8 @@
Map_Dogzfb_NextNeedTime = "NextNeedTime%s"  # 下次刷新需要时间 参数npcid
Map_Dogzfb_LastCheckTick = "LastCheckTick"  # 上次检查时间
Map_Dogzfb_NPCRemainCnt = 'NPCRemainCnt_%s'   # NPC剩余数量
Map_Dogzfb_CollectLostHPTick = 'CollectLostHPTick'   # 采集掉线Tick
Map_Dogzfb_CollectLostHPTick = 'CollectLostHPTick'   # 采集掉血Tick
Map_Dogzfb_CollectLostHPCnt = 'CollectLostHPCnt'   # 采集掉血次数
## 是否能够通过活动查询进入
#  @param curPlayer 玩家实例
@@ -106,6 +106,19 @@
    
    return
## 开始采集
#  @param curPlayer 当前玩家
#  @param curNPC 当前NPC
#  @return None or False
#  @remarks 函数详细说明.
def OnBeginCollect(curPlayer, curNPC):
    playerID = curPlayer.GetID()
    tick = GameWorld.GetGameWorld().GetTick()
    gameFB = GameWorld.GetGameFB()
    gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPTick, tick)
    gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPCnt, 0)
    return
## 收集中
def OnCollecting(curPlayer, tick):
    tagObj = curPlayer.GetActionObj()
@@ -116,19 +129,23 @@
    
    curNPC = GameWorld.GetNPCManager().GetNPCByIndex(tagObj.GetIndex())
    npcID = curNPC.GetNPCID()
    __DoCollectLostHP(curPlayer, npcID, tick)
    return
def __DoCollectLostHP(curPlayer, npcID, tick):
    playerID = curPlayer.GetID()
    gameFB = GameWorld.GetGameFB()
    collectLostHPTick = gameFB.GetPlayerGameFBDictByKey(playerID, Map_Dogzfb_CollectLostHPTick)
    lostHPCnt = gameFB.GetPlayerGameFBDictByKey(playerID, Map_Dogzfb_CollectLostHPCnt)
    lostCD = IpyGameDataPY.GetFuncEvalCfg('DogzFBCollect', 1, {}).get(npcID, 1)
    lostTime = (tick - collectLostHPTick) / 1000/lostCD # 掉血次数
    if lostTime >2:
        gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPTick, tick)
        return
    lostTime = (tick - collectLostHPTick) / (1000*lostCD)-lostHPCnt
    
    if not lostTime:
        return
    gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPTick, tick)
    gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPCnt, lostHPCnt+lostTime)
        
   
    lostHPPer = IpyGameDataPY.GetFuncEvalCfg('DogzFBCollect', 2, {}).get(npcID, 1)
@@ -140,6 +157,14 @@
    SkillCommon.SkillLostHP(curPlayer, skillTypeID, buffOwner, lostValue, tick)
    return
##玩家收集成功(塔, 旗)
# @param curPlayer 玩家实例
# @param tick 时间戳
# @return 无意义
# @remarks
def OnCollectOK(curPlayer, npcID, tick):
    __DoCollectLostHP(curPlayer, npcID, tick)
    return
##---副本总逻辑计时器---
# @param tick:时间戳
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
@@ -375,7 +375,7 @@
# @param tick 时间戳
# @return 无意义
# @remarks
def OnCollectOK(curPlayer, tick):
def OnCollectOK(curPlayer, npcID, tick):
    playerID = curPlayer.GetID()
    gameWorld = GameWorld.GetGameWorld()
    gameWorld.SetGameWorldDict(FBPlayerDict_HasCollect % playerID, 1)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyWar.py
@@ -1268,7 +1268,7 @@
# @param tick 时间戳
# @return 无意义
# @remarks
def OnCollectOK(curPlayer, tick):
def OnCollectOK(curPlayer, npcID, tick):
    tagObj = curPlayer.GetActionObj()
    if not tagObj:
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ManorWar.py
@@ -714,7 +714,7 @@
# @param tick 时间戳
# @return 无意义
# @remarks
def OnCollectOK(curPlayer, tick):
def OnCollectOK(curPlayer, npcID, tick):
    global g_getFlagFamilyName
    if not IsManorWarMap(curPlayer):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MergeBoss.py
@@ -1219,7 +1219,7 @@
# @param tick 时间戳
# @return 无意义
# @remarks
def OnCollectOK(curPlayer, tick):
def OnCollectOK(curPlayer, npcID, tick):
    global g_buffOwnerNPCDict
    global g_bossBuffCntDict
    
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5140,7 +5140,7 @@
    PlayerControl.Sync_PrepareBegin(curPlayer, prepareTime, IPY_GameWorld.pstMissionCollecting, \
                                    prepareID=curNPC.GetID())
    FBLogic.OnBeginCollect(curPlayer, curNPC)
    ##添加这个NPC的伤血列表,用于判断可否同时采集,改为字典判断
    AttackCommon.AddHurtValue(curNPC, curPlayer.GetPlayerID(), ChConfig.Def_NPCHurtTypePlayer, 1)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMissionCollect.py
@@ -29,7 +29,7 @@
import PlayerControl
import OperControlManager
import NPCCommon
import PlayerPrestigeSys
import FBLogic
import AttackCommon
import GameObj
#---------------------------------------------------------------------
@@ -145,7 +145,7 @@
    # 自定义的采集NPC
    if NPCCommon.DoCollectNPCOK(curPlayer, npcID):
        EventShell.EventRespons_MisCollectSuccess(curPlayer, curNPC) # 先直接写这边触发一下,自定义采集的不再处理后面的代码
        FBLogic.OnCollectOK(curPlayer, npcID, GameWorld.GetGameWorld().GetTick())
        return
    
    EventShell.EventRespons_MisCollectSuccess(curPlayer, curNPC)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
@@ -627,7 +627,7 @@
    if not result:
        return
    
    FBLogic.OnCollectOK(curPlayer, tick)
    FBLogic.OnCollectOK(curPlayer, curNPC.GetNPCID(), tick)
    return
#---------------------------------------------------------------------