|  |  |  | 
|---|
|  |  |  | # 回复gm | 
|---|
|  |  |  | return GMCommon.Def_NoTag, '' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | roleDict = {} | 
|---|
|  |  |  | moneyMinusDict = {} | 
|---|
|  |  |  | collection = userdb[UCN_RoleNomalDict] | 
|---|
|  |  |  | docs = collection.find({'PlayerID':dbPlayer.PlayerID}) | 
|---|
|  |  |  | 
|---|
|  |  |  | obj.readRecord(doc['%s'%(i+1)]) | 
|---|
|  |  |  | if obj.DictName.startswith("MoneyMinus_") and obj.DictValue > 0: | 
|---|
|  |  |  | moneyMinusDict[int(obj.DictName[len("MoneyMinus_"):])] = -obj.DictValue # 货币负值 | 
|---|
|  |  |  | if 1 in moneyMinusDict and 2 in moneyMinusDict: | 
|---|
|  |  |  | if 1 in moneyMinusDict and 2 in moneyMinusDict and 4 in moneyMinusDict: | 
|---|
|  |  |  | break | 
|---|
|  |  |  | if obj.DictValue > 0: | 
|---|
|  |  |  | roleDict[obj.DictName] = obj.DictValue | 
|---|
|  |  |  |  | 
|---|
|  |  |  | playerInfo = { | 
|---|
|  |  |  | 'AccID':dbPlayer.AccID,   # 账号 | 
|---|
|  |  |  | 
|---|
|  |  |  | 'Gold':moneyMinusDict[1] if 1 in moneyMinusDict else dbPlayer.Gold,   # 元宝 | 
|---|
|  |  |  | 'GoldPaper':moneyMinusDict[2] if 2 in moneyMinusDict else dbPlayer.GoldPaper,   # 绑钻 | 
|---|
|  |  |  | 'Silver':dbPlayer.Silver,  # 银两 | 
|---|
|  |  |  | 'SilverPaper':moneyMinusDict[4] if 4 in moneyMinusDict else dbPlayer.SilverPaper,   # 神玉 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 'FamilyName':dbPlayer.FamilyName,  # 家族名称 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 'Online':0, | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 需要额外同步的自定义货币 | 
|---|
|  |  |  | CurrencyValueDict = {} | 
|---|
|  |  |  | for moneyType in [99]: | 
|---|
|  |  |  | CurrencyValueDict['PlayerCurrency_%s' % moneyType] = roleDict.get("PlayerCurrency_%s" % moneyType, 0) | 
|---|
|  |  |  | playerInfo.update(CurrencyValueDict) | 
|---|
|  |  |  | return GMCommon.Def_Success, playerInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|