|  |  | 
 |  |  |     if curPlayer.GetIP() != "127.0.0.1":
 | 
 |  |  |         return
 | 
 |  |  |     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_TJGNPC, clientData.NPCID)
 | 
 |  |  |      | 
 |  |  |     # 先弥补错失的时间
 | 
 |  |  |     LoginFixTJG(curPlayer, True)
 | 
 |  |  |     GameWorld.DebugLog("%s---OnTJGNPC:%s"%(curPlayer.GetName(),clientData.NPCID))
 | 
 |  |  |     return
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  | # 1. 非脱机死亡,2.存在脱机时间,3.离线时间超过5分钟;则一次补齐 离线时间-5分钟的收益并减少脱机时间
 | 
 |  |  | # 按当前经验倍率计算,且不会减buff时间
 | 
 |  |  | # 找到对应的NPC,需读取对应挂机表
 | 
 |  |  | def LoginFixTJG(curPlayer):
 | 
 |  |  | def LoginFixTJG(curPlayer, isTJG=False):
 | 
 |  |  |     # 外层需判断是真实玩家登录
 | 
 |  |  |     tjgTime = GetTJGTime(curPlayer)     # 秒
 | 
 |  |  |     if not tjgTime:
 | 
 |  |  | 
 |  |  |         return
 | 
 |  |  |     times = min(seconds, tjgTime)
 | 
 |  |  | 
 | 
 |  |  |     npcID = FindTJGNPC(curPlayer)
 | 
 |  |  |     if not npcID:
 | 
 |  |  |         return
 | 
 |  |  |     if not isTJG:
 | 
 |  |  |         # 真实上线
 | 
 |  |  |         npcID = FindTJGNPC(curPlayer)
 | 
 |  |  |         if not npcID:
 | 
 |  |  |             return
 | 
 |  |  |          | 
 |  |  |         # 此时由服务端重新找一次挂机NPC
 | 
 |  |  |         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_TJGNPC, npcID)
 | 
 |  |  |     
 | 
 |  |  |     GameWorld.DebugLog("弥补脱机----npcid  %s-%s"%(npcID, times))
 | 
 |  |  |     GameWorld.DebugLog("弥补脱机----npcid  %s-%s"%(curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_TJGNPC), times))
 | 
 |  |  |     
 | 
 |  |  |     # 此时由服务端重新找一次挂机NPC
 | 
 |  |  |     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_TJGNPC, npcID)
 | 
 |  |  |     
 | 
 |  |  |     # 设置脱机登录时的等级, 上线通知清空, 没清空说明多次脱机挂登录 使用旧等级
 | 
 |  |  |     notifyLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDictType_TJGNotify_LV, 0, ChConfig.Def_PDictType_TJGNotify)
 |