From 02a9f1326fd99fc60ee14c70bb55d714803607f0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 08 七月 2019 15:25:56 +0800
Subject: [PATCH] 4438 【主干】【2.0.200】打boss状态下发起匹配可以进入跨服,回来后归属不会清,boss不会回血
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py | 53 +++++++++++++++++++++++++++++++++--------------------
1 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py
index e47f125..4cc3984 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py
@@ -25,6 +25,7 @@
import NetPackCommon
import PlayerBourse
import PlayerFamily
+import ShareDefine
import ChConfig
import operator
@@ -463,20 +464,23 @@
# 拍卖成功收益,都以玩家收益向上取整
if familyID and auctionItem.FamilyPlayerIDInfo:
familyPlayerIDList = json.loads(auctionItem.FamilyPlayerIDInfo)
- taxRate = IpyGameDataPY.GetFuncCfg("AuctionTaxrate", 2) # 仙盟拍品税率百分比
- personMaxRate = IpyGameDataPY.GetFuncCfg("AuctionTaxrate", 3) # 仙盟拍品个人最大收益百分比
- taxGold = max(1, int(bidderPrice * taxRate / 100.0)) # 最少收税1
- giveTotalGold = max(0, bidderPrice - taxGold)
- giveMaxGold = int(math.ceil(giveTotalGold * personMaxRate / 100.0))
- memCount = len(familyPlayerIDList)
- giveGoldAverage = min(giveMaxGold, int(math.ceil(giveTotalGold * 1.0 / memCount))) # 有收益的人平分
-
- # 仙盟拍品收益邮件
- detail = {"ItemGUID":itemGUID, "ItemID":itemID, "Count":itemCount, "BidderPrice":bidderPrice, "FamilyPlayerIDList":familyPlayerIDList}
- paramList = [itemID, itemID, auctionItem.BidderName, bidderPrice, taxRate, giveGoldAverage, personMaxRate]
- PlayerCompensation.SendMailByKey("PaimaiMail6", familyPlayerIDList, [], paramList, gold=giveGoldAverage,
- detail=detail, moneySource=ChConfig.Def_GiveMoney_AuctionGain)
-
+ if familyPlayerIDList:
+ taxRate = IpyGameDataPY.GetFuncCfg("AuctionTaxrate", 2) # 仙盟拍品税率百分比
+ personMaxRate = IpyGameDataPY.GetFuncCfg("AuctionTaxrate", 3) # 仙盟拍品个人最大收益百分比
+ taxGold = max(1, int(bidderPrice * taxRate / 100.0)) # 最少收税1
+ giveTotalGold = max(0, bidderPrice - taxGold)
+ giveMaxGold = int(math.ceil(giveTotalGold * personMaxRate / 100.0))
+ memCount = len(familyPlayerIDList)
+ giveGoldAverage = min(giveMaxGold, int(math.ceil(giveTotalGold * 1.0 / memCount))) # 有收益的人平分
+
+ # 仙盟拍品收益邮件
+ detail = {"ItemGUID":itemGUID, "ItemID":itemID, "Count":itemCount, "BidderPrice":bidderPrice, "FamilyPlayerIDList":familyPlayerIDList}
+ paramList = [itemID, itemID, bidderPrice, taxRate, giveGoldAverage, personMaxRate]
+ PlayerCompensation.SendMailByKey("PaimaiMail8", familyPlayerIDList, [], paramList, gold=giveGoldAverage,
+ detail=detail, moneySource=ChConfig.Def_GiveMoney_AuctionGain)
+ else:
+ GameWorld.ErrLog("仙盟拍品没有人获得收益!familyID=%s,itemID=%s,itemGUID=%s" % (familyID, itemID, itemGUID))
+
elif playerID:
taxRate = IpyGameDataPY.GetFuncCfg("AuctionTaxrate", 1) # 全服拍品税率百分比
taxGold = max(1, int(bidderPrice * taxRate / 100.0)) # 最少收税1
@@ -484,15 +488,16 @@
# 个人拍卖收益邮件
detail = {"ItemGUID":itemGUID, "ItemID":itemID, "Count":itemCount, "BidderPrice":bidderPrice}
- paramList = [itemID, itemID, auctionItem.BidderName, bidderPrice, taxRate, givePlayerGold]
- PlayerCompensation.SendMailByKey("PaimaiMail5", [playerID], [], paramList, gold=givePlayerGold,
+ paramList = [itemID, itemID, bidderPrice, taxRate, givePlayerGold]
+ PlayerCompensation.SendMailByKey("PaimaiMail7", [playerID], [], paramList, gold=givePlayerGold,
detail=detail, moneySource=ChConfig.Def_GiveMoney_AuctionGain)
AddAuctionRecord(auctionItem, AuctionRecordResult_SellOK)
- ipyData = IpyGameDataPY.GetIpyGameData("AuctionItem", itemID)
- if ipyData and ipyData.GetNeedWorldNotify():
- PlayerControl.WorldNotify(0, "Paimai6", [auctionItem.BidderName, bidderID, auctionItem.AuctionType, bidderPrice, itemID])
+ #策划需求屏蔽掉成交广播
+ #ipyData = IpyGameDataPY.GetIpyGameData("AuctionItem", itemID)
+ #if ipyData and ipyData.GetNeedWorldNotify():
+ # PlayerControl.WorldNotify(0, "Paimai6", [auctionItem.BidderName, bidderID, auctionItem.AuctionType, bidderPrice, itemID])
else:
# 仙盟拍品回收
if familyID:
@@ -1080,7 +1085,7 @@
# 载入对应查询条件拍品缓存
auctionItemQueryList = []
for worldAuctionItem in auctionItemMgr.worldAuctionItemList:
- if job and worldAuctionItem.ItemJobLimit != job:
+ if job and worldAuctionItem.ItemJobLimit != job and worldAuctionItem.ItemJobLimit:
continue
if itemTypeList and worldAuctionItem.ItemType not in itemTypeList:
continue
@@ -1381,3 +1386,11 @@
DataRecordPack.SendEventPack("AuctionHouse", dataDict, curPlayer)
return
+def DoAddFamilyAuctionItem(mapID, familyAuctionItemDict):
+ ''' 上架仙盟拍品,因为仙盟拍品默认上架,所以使用批量上架
+ @param familyAuctionItemDict: {仙盟ID:[[享受收益的成员ID, ...], [[拍品ID,个数], [拍品ID,个数,是否拍品], ...]], ...}
+ '''
+ GameWorld.Log("发送地图上架仙盟拍品: mapID=%s, %s" % (mapID, familyAuctionItemDict))
+ GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_AddFamilyAuctionItem, [mapID, familyAuctionItemDict])
+ return
+
--
Gitblit v1.8.0