66 【公会】基础主体-服务端(修复改名没有同步更新名字映射关系bug;)
2个文件已修改
22 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
@@ -589,6 +589,14 @@
            family = Family()
        return family
    
    def FamilyRemainName(self, family, newName):
        if newName in self.__familyNameDict:
            return
        self.__familyNameDict.pop(family.GetName(), None) # 去除旧名
        family.SetName(newName)
        self.__familyNameDict[newName] = family # 设置新名
        return True
    def GetCount(self): return len(self.__familyList)
    def GetAt(self, index):
        family = None
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -1596,13 +1596,19 @@
    if CheckFamilyNameExists(crossPlayer, newName, fromServerID):
        return
    
    zoneMgr = familyMgr.GetZoneFamilyMgrByFamilyID(familyID)
    if not zoneMgr:
        return
    if not zoneMgr.FamilyRemainName(family, newName):
        return
    if cdHours:
        SetRenameTime(family, curTime)
    moneyType, moneyValue = IpyGameDataPY.GetFuncEvalCfg("FamilyRename", 1)
    if moneyType and moneyValue:
        CrossPlayer.CostPlayerResources(crossPlayer, "FamilyRename", costMoneyDict={moneyType:moneyValue})
    family.SetName(newName)
    if cdHours:
        SetRenameTime(family, curTime)
        
    crossPlayerMgr = CrossPlayer.GetCrossPlayerMgr()
    for index in xrange(family.GetCount()):