ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Dogz.py
@@ -42,8 +42,6 @@
Map_Dogzfb_NextNeedTime = "NextNeedTime%s"  # 下次刷新需要时间 参数npcid
Map_Dogzfb_LastCheckTick = "LastCheckTick"  # 上次检查时间
Map_Dogzfb_NPCRemainCnt = 'NPCRemainCnt_%s'   # NPC剩余数量
Map_Dogzfb_CollectLostHPTick = 'CollectLostHPTick'   # 采集掉血Tick
Map_Dogzfb_CollectLostHPCnt = 'CollectLostHPCnt'   # 采集掉血次数
## 是否能够通过活动查询进入
#  @param curPlayer 玩家实例
@@ -104,66 +102,6 @@
#  @return None
def DoFBAction(curPlayer, actionType, actionInfo, tick):
    
    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()
    if not tagObj:
        return
    if tagObj.GetGameObjType() != IPY_GameWorld.gotNPC:
        return
    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)-lostHPCnt
    if not lostTime:
        return
    gameFB.SetPlayerGameFBDict(playerID, Map_Dogzfb_CollectLostHPCnt, lostHPCnt+lostTime)
    lostHPPer = IpyGameDataPY.GetFuncEvalCfg('DogzFBCollect', 2, {}).get(npcID, 1)
    skillTypeID, buffOwner = 0, None
    lostValue = min(int(GameObj.GetMaxHP(curPlayer) * lostHPPer / 100.0) * lostTime, GameObj.GetHP(curPlayer)-1)
    if lostValue <=0:
        return
    GameWorld.DebugLog("OnCollecting npcID=%s, lostHPPer=%s,lostTime=%s,lostValue=%s" % (npcID, lostHPPer, lostTime, lostValue))
    SkillCommon.SkillLostHP(curPlayer, skillTypeID, buffOwner, lostValue, tick)
    return
##玩家收集成功(塔, 旗)
# @param curPlayer 玩家实例
# @param tick 时间戳
# @return 无意义
# @remarks
def OnCollectOK(curPlayer, npcID, tick):
    __DoCollectLostHP(curPlayer, npcID, tick)
    return
##---副本总逻辑计时器---