| | |
| | | import ChEquip
|
| | | import QuestCommon
|
| | | import random
|
| | | import GameObj
|
| | |
|
| | | # 可吞噬的装备位
|
| | | Def_EatItem_EquipPlace = [
|
| | |
| | | ]
|
| | |
|
| | | 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
|
| | |
| | | curPlayer.SetSight(min(ChConfig.Def_PlayerSight_Default, clientData.Sight))
|
| | | GameWorld.DebugLog("OnSightZoom:%s"%clientData.Sight)
|
| | |
|
| | | # 脱机玩家过多,需要隐身一部分
|
| | | if curPlayer.GetLV() < 190:
|
| | | if random.randint(0, 5) != 2:
|
| | | curPlayer.SetVisible(False)
|
| | | return
|
| | |
|
| | | # 需要处理的点,防沉迷
|
| | |
| | | aSkillAtkRate = curPlayer.GetSkillAtkRate() # 技能攻击力加成
|
| | | petMinAtk = PlayerControl.GetPetMinAtk(curPlayer) #灵宠最小攻击
|
| | | petMaxAtk = PlayerControl.GetPetMaxAtk(curPlayer) #灵宠最大攻击
|
| | | petDamPer = PlayerControl.GetPetDamPer(curPlayer) #灵宠增加伤害
|
| | | petDamPer = GameObj.GetPetDamPer(curPlayer) #灵宠增加伤害
|
| | | atkSpeed = PlayerControl.GetAtkSpeed(curPlayer) # 攻击速度
|
| | | aIgnoreDefRate = curPlayer.GetIgnoreDefRate() # 无视防御比率
|
| | | aLuckyHit = curPlayer.GetLuckyHitVal() # 会心一击
|
| | |
| | | #GameWorld.DebugLog("equipScores----%s"%equipScores)
|
| | |
|
| | | eatIndexList = []
|
| | | eatItemIDList = []
|
| | | itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
|
| | | for i in range(0, itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | |
| | | continue
|
| | |
|
| | | eatIndexList.append(i)
|
| | | |
| | | eatItemIDList.append(curItem.GetItemTypeID())
|
| | | #GameWorld.DebugLog("eatIndexList-----------%s"%len(eatIndexList))
|
| | | eatCount, giveCnt = PlayerEquipDecompose.EatItems(curPlayer, eatIndexList)
|
| | | eatCount, giveCnt = PlayerEquipDecompose.EatItems(curPlayer, eatIndexList, eatItemIDList)
|
| | | NoteEatEquip(curPlayer, eatCount, giveCnt)
|
| | | CheckPackFull(curPlayer)
|
| | |
|
| | |
| | | # 此时由服务端重新找一次挂机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)))
|
| | |
|