10261 【越南】【砍树】【英文】增加玩家定制头像支持;
| | |
| | | DWORD _FaceID; //头像ID
|
| | | BYTE UnlockDefault; //是否默认激活
|
| | | DWORD ExpireMinutes; //时效分钟,0永久
|
| | | DWORD CustomPlayerID; //定制玩家ID
|
| | | list LightAttrType; //点亮属性类型
|
| | | list LightAttrValue; //点亮属性值
|
| | | DWORD LightFightPower; //点亮附加战力
|
| | |
| | | faceID = ipyData.GetFaceID()
|
| | | if ipyData.GetUnlockDefault():
|
| | | continue
|
| | | if ipyData.GetCustomPlayerID():
|
| | | continue
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID):
|
| | | continue
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0)
|
| | |
| | | if ipyData.GetUnlockDefault():
|
| | | GameWorld.DebugAnswer(curPlayer, "该头像默认激活:%s" % faceID)
|
| | | return
|
| | | if ipyData.GetCustomPlayerID():
|
| | | GameWorld.DebugAnswer(curPlayer, "定制头像不处理:%s" % faceID)
|
| | | return
|
| | | 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)
|
| | |
| | | ("DWORD", "FaceID", 1),
|
| | | ("BYTE", "UnlockDefault", 0),
|
| | | ("DWORD", "ExpireMinutes", 0),
|
| | | ("DWORD", "CustomPlayerID", 0),
|
| | | ("list", "LightAttrType", 0),
|
| | | ("list", "LightAttrValue", 0),
|
| | | ("DWORD", "LightFightPower", 0),
|
| | |
| | | def GetFaceID(self): return self.attrTuple[0] # 头像ID DWORD
|
| | | def GetUnlockDefault(self): return self.attrTuple[1] # 是否默认激活 BYTE
|
| | | def GetExpireMinutes(self): return self.attrTuple[2] # 时效分钟,0永久 DWORD
|
| | | def GetLightAttrType(self): return self.attrTuple[3] # 点亮属性类型 list
|
| | | def GetLightAttrValue(self): return self.attrTuple[4] # 点亮属性值 list
|
| | | def GetLightFightPower(self): return self.attrTuple[5] # 点亮附加战力 DWORD |
| | | def GetCustomPlayerID(self): return self.attrTuple[3] # 定制玩家ID DWORD
|
| | | def GetLightAttrType(self): return self.attrTuple[4] # 点亮属性类型 list
|
| | | def GetLightAttrValue(self): return self.attrTuple[5] # 点亮属性值 list
|
| | | def GetLightFightPower(self): return self.attrTuple[6] # 点亮附加战力 DWORD |
| | | |
| | | # 头像升星表 |
| | | class IPY_PlayerFaceStar(): |
| | |
| | | if ipyData.GetUnlockDefault():
|
| | | # 默认激活的不处理
|
| | | continue
|
| | | if ipyData.GetCustomPlayerID():
|
| | | # 玩家定制的不处理
|
| | | continue
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID):
|
| | | # 未激活的不处理
|
| | | continue
|
| | |
| | | if ipyData.GetUnlockDefault():
|
| | | GameWorld.DebugLog("默认解锁的头像不用添加: faceID=%s" % (faceID), playerID)
|
| | | return
|
| | | if ipyData.GetCustomPlayerID():
|
| | | GameWorld.DebugLog("玩家定制的头像不用添加: faceID=%s" % (faceID), playerID)
|
| | | return
|
| | | ipyExpireSeconds = ipyData.GetExpireMinutes() * 60
|
| | |
|
| | | curTime = int(time.time())
|
| | |
| | | if not ipyData:
|
| | | return
|
| | | if ipyData.GetUnlockDefault():
|
| | | return
|
| | | if ipyData.GetCustomPlayerID():
|
| | | return
|
| | | GameWorld.Log("删除头像: faceID=%s,notifyMail=%s" % (faceID, notifyMail), playerID)
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0)
|
| | |
| | | if ipyData:
|
| | | if ipyData.GetUnlockDefault():
|
| | | return True
|
| | | if ipyData.GetCustomPlayerID() and ipyData.GetCustomPlayerID() == curPlayer.GetPlayerID():
|
| | | return True
|
| | |
|
| | | return False
|
| | |
|