|
|
@@ -168,7 +168,7 @@ Loop: |
|
|
|
node.ParentUser.Profit = 0 |
|
|
|
count := len(grade[maxLv].PeerRate) |
|
|
|
if grade[maxLv].NewPeerList != nil { |
|
|
|
count = len(grade[maxLv].PeerRateList) |
|
|
|
count = len(grade[maxLv].NewPeerList) |
|
|
|
} |
|
|
|
var isBreak bool |
|
|
|
zeroList := make(map[string]struct{}) |
|
|
@@ -414,8 +414,10 @@ func getVirtualCoinRatioWineryAdv(typ string, level, peerNum int, grade map[int] |
|
|
|
ok := false |
|
|
|
switch typ { |
|
|
|
case "same_lv": |
|
|
|
ratio, ok = grade[level].PeerRateList[peerNum][coinId] |
|
|
|
ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) |
|
|
|
if grade[level].NewPeerList != nil && len(grade[level].NewPeerList) > 0 { |
|
|
|
ratio, ok = grade[level].NewPeerList[peerNum][coinId] |
|
|
|
ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) |
|
|
|
} |
|
|
|
case "to_extend": |
|
|
|
ratio, ok = grade[level].ToExtendList[coinId] |
|
|
|
ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) |
|
|
|