hxp
2018-11-27 5a5c81a1284cf22d38fc7c61239caf5b7f6815cd
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
@@ -67,6 +67,15 @@
]
Def_EatSpace = 5    # 低于X格自动吞噬
def DoTJGOpen(curPlayer):
    ##脱机挂功能开启 赠送脱机时间
    addTime = IpyGameDataPY.GetFuncCfg('TJGGiftTime')
    AddTJGTime(curPlayer, addTime)
    GameWorld.DebugLog('脱机挂功能开启 赠送脱机时间 %s'%addTime, curPlayer.GetID())
    return
#===============================================================================
# //B2 01 脱机挂状态 # tagCMLoginState
# struct    tagCMLoginState
@@ -176,6 +185,7 @@
        return
    curPlayer.SetSight(min(ChConfig.Def_PlayerSight_Default, clientData.Sight))
    GameWorld.DebugLog("OnSightZoom:%s"%clientData.Sight)
    return
# 需要处理的点,防沉迷
@@ -450,7 +460,10 @@
    
    # 击杀特定NPC成就
    PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillSpecificNPC, killCnt, [npcID])
    # 日常活动
    if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGOnDayEx):
        if npcData.GetLV()>=curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
            PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC, killCnt)
    # 击杀任务怪, 杀怪日常已经没有了,暂时屏蔽
    #for _ in xrange(killCnt):
    #    EventShell.Event_OnKillByID(curPlayer, npcID)
@@ -654,7 +667,8 @@
    if curPlayer.GetIP() == "127.0.0.1":
        LoginFixTJG(curPlayer, True)
        return
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDictType_TJGOnDayEx, 0)
    # 脱机挂没有运作情况下 弥补收益
    LoginFixTJG(curPlayer)
    
@@ -776,12 +790,16 @@
 
# 过天清理
def TJGOnDay(curPlayer):
    times = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TJGDeadPayTime)
    if times == 0:
        return
    ResetTJGDeadInfo(curPlayer)
def TJGOnDay(curPlayer, onEventType):
    if onEventType == ShareDefine.Def_OnEventType:
        times = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TJGDeadPayTime)
        if times == 0:
            return
        ResetTJGDeadInfo(curPlayer)
    elif onEventType == ShareDefine.Def_OnEventTypeEx:
        if GetIsTJG(curPlayer):
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDictType_TJGOnDayEx, 1)
    return
def ResetTJGDeadInfo(curPlayer):
@@ -909,7 +927,7 @@
        # 此时由服务端重新找一次挂机NPC
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_TJGNPC, npcID)
    
    GameWorld.DebugLog("弥补脱机----npcid  %s-%s-%s"%(
    GameWorld.DebugLog("弥补脱机----playerID:%s ,npcid  %s-%s-%s"%(curPlayer.GetID(),
                    curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_TJGNPC), times,
                    curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)))