| | |
| | | faceID = ipyData.GetFaceID()
|
| | | if ipyData.GetUnlockDefault():
|
| | | continue
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FaceLightTime % faceID):
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID):
|
| | | continue
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceLightTime % faceID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceExpireTimes % faceID, 0)
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceEndTime % faceID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceStar % faceID, 0)
|
| | | syncFaceIDList.append(faceID)
|
| | | else:
|
| | |
| | | if ipyData.GetUnlockDefault():
|
| | | GameWorld.DebugAnswer(curPlayer, "该头像默认激活:%s" % faceID)
|
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceLightTime % faceID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceExpireTimes % faceID, 0)
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceEndTime % faceID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceStar % faceID, 0)
|
| | | syncFaceIDList.append(faceID)
|
| | | GameWorld.DebugAnswer(curPlayer, "删除头像:%s" % syncFaceIDList)
|
| | |
| | | faceID = msgList[1] if len(msgList) > 1 else 0
|
| | | expireTimes = msgList[2] if len(msgList) > 2 else None
|
| | | if PlayerFace.AddFace(curPlayer, faceID, expireTimes):
|
| | | endTimeStr = PlayerFace.GetEndTimeStr(PlayerFace.GetFaceEndTime(curPlayer, faceID))
|
| | | GameWorld.DebugAnswer(curPlayer, "添加头像成功:%s,%s" % (faceID, endTimeStr))
|
| | | endTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FaceEndTime % faceID)
|
| | | endTimeStr = "永久" if not endTime else GameWorld.ChangeTimeNumToStr(endTime)
|
| | | GameWorld.DebugAnswer(curPlayer, "添加头像成功:%s,到期:%s" % (faceID, endTimeStr))
|
| | | else:
|
| | | GameWorld.DebugAnswer(curPlayer, "添加头像失败:%s" % (faceID))
|
| | |
|
| | |
| | | facePicID = ipyData.GetFacePicID()
|
| | | if ipyData.GetUnlockDefault():
|
| | | continue
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FacePicLightTime % facePicID):
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FacePicState, facePicID):
|
| | | continue
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicLightTime % facePicID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicExpireTimes % facePicID, 0)
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FacePicState, facePicID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicEndTime % facePicID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicStar % facePicID, 0)
|
| | | syncFacePicIDList.append(facePicID)
|
| | | else:
|
| | |
| | | if ipyData.GetUnlockDefault():
|
| | | GameWorld.DebugAnswer(curPlayer, "该头像框默认激活:%s" % facePicID)
|
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicLightTime % facePicID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicExpireTimes % facePicID, 0)
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FacePicState, facePicID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicEndTime % facePicID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FacePicStar % facePicID, 0)
|
| | | syncFacePicIDList.append(facePicID)
|
| | | GameWorld.DebugAnswer(curPlayer, "删除头像框:%s" % syncFacePicIDList)
|
| | |
| | | facePicID = msgList[1] if len(msgList) > 1 else 0
|
| | | expireTimes = msgList[2] if len(msgList) > 2 else None
|
| | | if PlayerFace.AddFacePic(curPlayer, facePicID, expireTimes):
|
| | | endTimeStr = PlayerFace.GetEndTimeStr(PlayerFace.GetFacePicEndTime(curPlayer, facePicID))
|
| | | GameWorld.DebugAnswer(curPlayer, "添加头像框成功:%s,%s" % (facePicID, endTimeStr))
|
| | | endTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FacePicEndTime % facePicID)
|
| | | endTimeStr = "永久" if not endTime else GameWorld.ChangeTimeNumToStr(endTime)
|
| | | GameWorld.DebugAnswer(curPlayer, "添加头像框成功:%s,到期:%s" % (facePicID, endTimeStr))
|
| | | else:
|
| | | GameWorld.DebugAnswer(curPlayer, "添加头像框失败:%s" % (facePicID))
|
| | |
|