From 61f8b79f9ba9ae47d8930bd7aead8d6a39a74745 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 26 十一月 2024 18:48:57 +0800
Subject: [PATCH] 10318 【英文】【越南】【BT】【砍树】统一增加奖励获得封包
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 212 +++++++++++++++++++++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 212 +++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLVAward.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerXiangong.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 8
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 56 +++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLoginDayAward.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/OpenServerCampaign.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFuncSysPrivilege.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_BossFirstKill.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py | 4
31 files changed, 541 insertions(+), 25 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index b962d64..092117d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -33083,6 +33083,218 @@
#------------------------------------------------------
+# A8 01 获得奖励信息 #tagMCGiveAwardInfo
+
+class tagMCGiveAwardMoney(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("MoneyType", c_ubyte),
+ ("MoneyValue", c_int),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.MoneyType = 0
+ self.MoneyValue = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCGiveAwardMoney)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A8 01 获得奖励信息 //tagMCGiveAwardInfo:
+ MoneyType:%d,
+ MoneyValue:%d
+ '''\
+ %(
+ self.MoneyType,
+ self.MoneyValue
+ )
+ return DumpString
+
+
+class tagMCGiveAwardItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemID", c_int),
+ ("Count", c_int),
+ ("IsBind", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.ItemID = 0
+ self.Count = 0
+ self.IsBind = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCGiveAwardItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A8 01 获得奖励信息 //tagMCGiveAwardInfo:
+ ItemID:%d,
+ Count:%d,
+ IsBind:%d
+ '''\
+ %(
+ self.ItemID,
+ self.Count,
+ self.IsBind
+ )
+ return DumpString
+
+
+class tagMCGiveAwardInfo(Structure):
+ Head = tagHead()
+ EventLen = 0 #(BYTE EventLen)
+ EventName = "" #(String EventName)
+ Exp = 0 #(DWORD Exp)// 奖励经验,求余亿部分
+ ExpPoint = 0 #(DWORD ExpPoint)// 奖励经验,整除亿部分
+ MoneyLen = 0 #(BYTE MoneyLen)
+ MoneyList = list() #(vector<tagMCGiveAwardMoney> MoneyList)// 奖励货币
+ ItemLen = 0 #(BYTE ItemLen)
+ ItemList = list() #(vector<tagMCGiveAwardItem> ItemList)// 奖励物品
+ DataLen = 0 #(WORD DataLen)
+ DataEx = "" #(String DataEx)// 扩展信息,可由不同的Event自定义信息内容
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA8
+ self.Head.SubCmd = 0x01
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.EventLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.EventName,_pos = CommFunc.ReadString(_lpData, _pos,self.EventLen)
+ self.Exp,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.ExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.MoneyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.MoneyLen):
+ temMoneyList = tagMCGiveAwardMoney()
+ _pos = temMoneyList.ReadData(_lpData, _pos)
+ self.MoneyList.append(temMoneyList)
+ self.ItemLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.ItemLen):
+ temItemList = tagMCGiveAwardItem()
+ _pos = temItemList.ReadData(_lpData, _pos)
+ self.ItemList.append(temItemList)
+ self.DataLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.DataEx,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA8
+ self.Head.SubCmd = 0x01
+ self.EventLen = 0
+ self.EventName = ""
+ self.Exp = 0
+ self.ExpPoint = 0
+ self.MoneyLen = 0
+ self.MoneyList = list()
+ self.ItemLen = 0
+ self.ItemList = list()
+ self.DataLen = 0
+ self.DataEx = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += len(self.EventName)
+ length += 4
+ length += 4
+ length += 1
+ for i in range(self.MoneyLen):
+ length += self.MoneyList[i].GetLength()
+ length += 1
+ for i in range(self.ItemLen):
+ length += self.ItemList[i].GetLength()
+ length += 2
+ length += len(self.DataEx)
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.EventLen)
+ data = CommFunc.WriteString(data, self.EventLen, self.EventName)
+ data = CommFunc.WriteDWORD(data, self.Exp)
+ data = CommFunc.WriteDWORD(data, self.ExpPoint)
+ data = CommFunc.WriteBYTE(data, self.MoneyLen)
+ for i in range(self.MoneyLen):
+ data = CommFunc.WriteString(data, self.MoneyList[i].GetLength(), self.MoneyList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.ItemLen)
+ for i in range(self.ItemLen):
+ data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer())
+ data = CommFunc.WriteWORD(data, self.DataLen)
+ data = CommFunc.WriteString(data, self.DataLen, self.DataEx)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ EventLen:%d,
+ EventName:%s,
+ Exp:%d,
+ ExpPoint:%d,
+ MoneyLen:%d,
+ MoneyList:%s,
+ ItemLen:%d,
+ ItemList:%s,
+ DataLen:%d,
+ DataEx:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.EventLen,
+ self.EventName,
+ self.Exp,
+ self.ExpPoint,
+ self.MoneyLen,
+ "...",
+ self.ItemLen,
+ "...",
+ self.DataLen,
+ self.DataEx
+ )
+ return DumpString
+
+
+m_NAtagMCGiveAwardInfo=tagMCGiveAwardInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGiveAwardInfo.Head.Cmd,m_NAtagMCGiveAwardInfo.Head.SubCmd))] = m_NAtagMCGiveAwardInfo
+
+
+#------------------------------------------------------
# A8 12 守护成功拾取物品 #tagMCGuradPickupItemSucc
class tagMCGuradPickupItemSucc(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index b962d64..092117d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -33083,6 +33083,218 @@
#------------------------------------------------------
+# A8 01 获得奖励信息 #tagMCGiveAwardInfo
+
+class tagMCGiveAwardMoney(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("MoneyType", c_ubyte),
+ ("MoneyValue", c_int),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.MoneyType = 0
+ self.MoneyValue = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCGiveAwardMoney)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A8 01 获得奖励信息 //tagMCGiveAwardInfo:
+ MoneyType:%d,
+ MoneyValue:%d
+ '''\
+ %(
+ self.MoneyType,
+ self.MoneyValue
+ )
+ return DumpString
+
+
+class tagMCGiveAwardItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemID", c_int),
+ ("Count", c_int),
+ ("IsBind", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.ItemID = 0
+ self.Count = 0
+ self.IsBind = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCGiveAwardItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A8 01 获得奖励信息 //tagMCGiveAwardInfo:
+ ItemID:%d,
+ Count:%d,
+ IsBind:%d
+ '''\
+ %(
+ self.ItemID,
+ self.Count,
+ self.IsBind
+ )
+ return DumpString
+
+
+class tagMCGiveAwardInfo(Structure):
+ Head = tagHead()
+ EventLen = 0 #(BYTE EventLen)
+ EventName = "" #(String EventName)
+ Exp = 0 #(DWORD Exp)// 奖励经验,求余亿部分
+ ExpPoint = 0 #(DWORD ExpPoint)// 奖励经验,整除亿部分
+ MoneyLen = 0 #(BYTE MoneyLen)
+ MoneyList = list() #(vector<tagMCGiveAwardMoney> MoneyList)// 奖励货币
+ ItemLen = 0 #(BYTE ItemLen)
+ ItemList = list() #(vector<tagMCGiveAwardItem> ItemList)// 奖励物品
+ DataLen = 0 #(WORD DataLen)
+ DataEx = "" #(String DataEx)// 扩展信息,可由不同的Event自定义信息内容
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA8
+ self.Head.SubCmd = 0x01
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.EventLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.EventName,_pos = CommFunc.ReadString(_lpData, _pos,self.EventLen)
+ self.Exp,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.ExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.MoneyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.MoneyLen):
+ temMoneyList = tagMCGiveAwardMoney()
+ _pos = temMoneyList.ReadData(_lpData, _pos)
+ self.MoneyList.append(temMoneyList)
+ self.ItemLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.ItemLen):
+ temItemList = tagMCGiveAwardItem()
+ _pos = temItemList.ReadData(_lpData, _pos)
+ self.ItemList.append(temItemList)
+ self.DataLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.DataEx,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA8
+ self.Head.SubCmd = 0x01
+ self.EventLen = 0
+ self.EventName = ""
+ self.Exp = 0
+ self.ExpPoint = 0
+ self.MoneyLen = 0
+ self.MoneyList = list()
+ self.ItemLen = 0
+ self.ItemList = list()
+ self.DataLen = 0
+ self.DataEx = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += len(self.EventName)
+ length += 4
+ length += 4
+ length += 1
+ for i in range(self.MoneyLen):
+ length += self.MoneyList[i].GetLength()
+ length += 1
+ for i in range(self.ItemLen):
+ length += self.ItemList[i].GetLength()
+ length += 2
+ length += len(self.DataEx)
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.EventLen)
+ data = CommFunc.WriteString(data, self.EventLen, self.EventName)
+ data = CommFunc.WriteDWORD(data, self.Exp)
+ data = CommFunc.WriteDWORD(data, self.ExpPoint)
+ data = CommFunc.WriteBYTE(data, self.MoneyLen)
+ for i in range(self.MoneyLen):
+ data = CommFunc.WriteString(data, self.MoneyList[i].GetLength(), self.MoneyList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.ItemLen)
+ for i in range(self.ItemLen):
+ data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer())
+ data = CommFunc.WriteWORD(data, self.DataLen)
+ data = CommFunc.WriteString(data, self.DataLen, self.DataEx)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ EventLen:%d,
+ EventName:%s,
+ Exp:%d,
+ ExpPoint:%d,
+ MoneyLen:%d,
+ MoneyList:%s,
+ ItemLen:%d,
+ ItemList:%s,
+ DataLen:%d,
+ DataEx:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.EventLen,
+ self.EventName,
+ self.Exp,
+ self.ExpPoint,
+ self.MoneyLen,
+ "...",
+ self.ItemLen,
+ "...",
+ self.DataLen,
+ self.DataEx
+ )
+ return DumpString
+
+
+m_NAtagMCGiveAwardInfo=tagMCGiveAwardInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGiveAwardInfo.Head.Cmd,m_NAtagMCGiveAwardInfo.Head.SubCmd))] = m_NAtagMCGiveAwardInfo
+
+
+#------------------------------------------------------
# A8 12 守护成功拾取物品 #tagMCGuradPickupItemSucc
class tagMCGuradPickupItemSucc(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index 6887d9f..a1be82f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -805,6 +805,8 @@
if sendMailKey:
PlayerControl.SendMailByKey(sendMailKey, [curPlayer.GetID()], totalItemList, detail=dataDict)
+ else:
+ ItemControler.NotifyGiveAwardInfo(curPlayer, totalItemList, ChConfig.ItemGive_BuyItem)
#触发任务购买物品
EventShell.EventRespons_ShopBuy(curPlayer, shopType)
#curPlayer.ShopResult(itemIndex, IPY_GameWorld.tsrShopOK)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py
index e156504..f98bf54 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_PlayerBuyZhenQi.py
@@ -25,6 +25,7 @@
import ShareDefine
import GameFuncComm
import ItemCommon
+import ItemControler
import PlayerSuccess
import PlayerActivity
import PlayerBossReborn
@@ -129,6 +130,7 @@
giveMoneyType = IPY_GameWorld.TYPE_Price_Gold_Paper
PlayerControl.GiveMoney(curPlayer, giveMoneyType, addMoney, ChConfig.Def_GiveMoney_Pray, addDataDict, False)
PlayerControl.NotifyCode(curPlayer, 'MoneyPray_HowMuch', [addMoney, giveMoneyType])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, [], "Pray", moneyInfo={giveMoneyType:addMoney})
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_MoneyPray, 1)
PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_MoneyPray)
@@ -163,6 +165,7 @@
addExp = eval(GetExpPrayAward())
PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
PlayerControl.NotifyCode(curPlayer, 'ExpPray_HowMuch', [addExp])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, [], "Pray", exp=addExp)
if not isCostItem: #用物品不增加次数
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_HasPrayCnt % buyType, curCnt + 1)
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_ExpPray, 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index 39aa5d3..718f9f7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -45,6 +45,7 @@
import math
import time
+import json
#---------------------------------------------------------------------
## 获得背包的一个空格子
@@ -2878,7 +2879,7 @@
return True
-def GivePlayerItemOrMail(curPlayer, itemList, mailKey=None, event=["", False, {}]):
+def GivePlayerItemOrMail(curPlayer, itemList, mailKey=None, event=["", False, {}], isNotifyAward=True):
##给物品,背包满则发邮件
if not itemList:
return
@@ -2911,6 +2912,59 @@
else:
for itemID, itemCnt, isAuctionItem in giveItemList:
GivePlayerItem(curPlayer, itemID, itemCnt, isAuctionItem, [IPY_GameWorld.rptItem], event=event)
+
+ if isNotifyAward:
+ eventName = event[0] if event else ""
+ NotifyGiveAwardInfo(curPlayer, giveItemList, eventName)
+ return
+
+def NotifyGiveAwardInfo(curPlayer, giveItemInfo, eventName="", exp=0, moneyInfo=None, dataEx=None):
+ '''通知玩家获得奖励信息
+ @param giveItemInfo: 可以是列表 [[itemID,count,isBind], ...] 或 [[itemID,count], ...] 或 {itemID:count, ...}
+ @param moneyInfo: 奖励货币信息 {moneyType:moneyValue, ...} moneyType 可以是字符串或数值
+ '''
+ notifyItemList = []
+ if isinstance(giveItemInfo, dict):
+ notifyItemList = [[a, b] for a, b in giveItemInfo.items()]
+ else:
+ notifyItemList = giveItemInfo
+ eventName = ChConfig.ItemGiveTypeDict.get(eventName, str(eventName))
+ clientPack = ChPyNetSendPack.tagMCGiveAwardInfo()
+ clientPack.EventName = eventName
+ clientPack.EventLen = len(clientPack.EventName)
+ clientPack.ExpPoint = exp / ChConfig.Def_PerPointValue
+ clientPack.Exp = exp % ChConfig.Def_PerPointValue
+ if moneyInfo and isinstance(moneyInfo, dict):
+ for moneyType, moneyValue in moneyInfo.items():
+ if isinstance(moneyType, str):
+ moneyType = int(moneyType)
+ if not moneyType or not moneyValue:
+ continue
+ money = ChPyNetSendPack.tagMCGiveAwardMoney()
+ money.MoneyType = moneyType
+ money.MoneyValue = moneyValue
+ clientPack.MoneyList.append(money)
+ clientPack.MoneyLen = len(clientPack.MoneyList)
+ for itemInfo in notifyItemList:
+ itemID, itemCount = itemInfo[:2]
+ isBind = itemInfo[2] if len(itemInfo) > 2 else 1
+ if not itemID or not itemCount:
+ continue
+ item = ChPyNetSendPack.tagMCGiveAwardItem()
+ item.ItemID = itemID
+ item.Count = itemCount
+ item.IsBind = isBind
+ clientPack.ItemList.append(item)
+ clientPack.ItemLen = len(clientPack.ItemList)
+ if dataEx:
+ if isinstance(dataEx, dict):
+ dataEx = json.dumps(dataEx, ensure_ascii=False)
+ elif not isinstance(dataEx, str):
+ dataEx = str(dataEx)
+ dataEx = dataEx.replace(" ", "")
+ clientPack.DataEx = dataEx
+ clientPack.DataLen = len(clientPack.DataEx)
+ NetPackCommon.SendFakePack(curPlayer, clientPack)
return
def RecycleItem(curPlayer, itemID, notifyMailKey):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index 8f70f3b..6a3a195 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -1663,7 +1663,7 @@
## 给奖励物品
# @param awardItemInfo 奖励物品信息,支持字典按职业给,或者直接list
# @return 布尔值
-def GiveAwardItem(curPlayer, awardItemInfo):
+def GiveAwardItem(curPlayer, awardItemInfo, eventName=""):
job = curPlayer.GetJob()
if isinstance(awardItemInfo, dict):
if str(job) not in awardItemInfo:
@@ -1686,7 +1686,8 @@
for itemInfo in itemList:
itemID, itemCount = itemInfo[:2]
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
-
+ if eventName:
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, eventName)
return True
##对外接口, 交换物品
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 4500f42..2ee9375 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -5752,7 +5752,7 @@
openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
openServerDayLimit = IpyGameDataPY.GetFuncCfg("OpenServerDailyAward", 1)
if openServerDay >= openServerDayLimit:
- OnGiveAwardByClient(curPlayer, rewardType, ChConfig.Def_PDict_OpenSererDailyAward, IpyGameDataPY.GetFuncEvalCfg("OpenServerDailyAward", 2))
+ OnGiveAwardByClient(curPlayer, rewardType, ChConfig.Def_PDict_OpenSererDailyAward, IpyGameDataPY.GetFuncEvalCfg("OpenServerDailyAward", 2), "OpenServerDailyAward")
return
## 领取创角奖励
@@ -5776,12 +5776,12 @@
NetPackCommon.SendFakePack(curPlayer, sendPack)
return
-def OnGiveAwardByClient(curPlayer, rewardType, dictKey, awardCfg):
+def OnGiveAwardByClient(curPlayer, rewardType, dictKey, awardCfg, eventName=""):
## 发放前端控制的奖励,后端只负责发放奖励,是否可领奖前端自行判断
if curPlayer.NomalDictGetProperty(dictKey):
GameWorld.DebugLog("已领取过该奖励! rewardType=%s, dictKey=%s" % (rewardType, dictKey))
return
- if not ItemCommon.GiveAwardItem(curPlayer, awardCfg):
+ if not ItemCommon.GiveAwardItem(curPlayer, awardCfg, eventName):
return
PlayerControl.NomalDictSetProperty(curPlayer, dictKey, 1)
Sync_RewardGetRecordInfo(curPlayer, rewardType, 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
index 881353b..9602f70 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
@@ -214,6 +214,7 @@
# 给物品
for itemID, itemCount in itemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "FuncOpenAward")
Sync_FuncOpenState(curPlayer, [funcID])
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/OpenServerCampaign.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/OpenServerCampaign.py
index f8e8834..0b7b80c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/OpenServerCampaign.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/OpenServerCampaign.py
@@ -336,6 +336,7 @@
isBind = itemInfo[2] if len(itemInfo) > 2 else 1
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem],
event=[ChConfig.ItemGive_OpenServerCampaign, True, drDict])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, giveItemList, ChConfig.ItemGive_OpenServerCampaign)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py
index b58183b..8b298cb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActBuyCountGift.py
@@ -200,7 +200,8 @@
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["ActBuyCountGift", False, {}])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "ActBuyCountGift")
+
addDataDict = {"actNum":actNum, "cfgID":cfgID, "buyCount":buyCount, "awardItemList":str(awardItemList)}
DataRecordPack.DR_FuncGiveItem(curPlayer, "ActBuyCountGift", addDataDict)
GameWorld.Log("购买次数礼包活动领取奖励! actNum=%s,cfgID=%s,buyCount=%s,awardItemList=%s"
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
index 98fcc39..5d10dcf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLoginNew.py
@@ -203,7 +203,7 @@
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["ActLoginNew", False, {}])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "ActLoginNew")
return
def Sync_ActLoginPlayerInfo(curPlayer, actNum):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
index 4ae3247..91d5b4a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActLunhuidian.py
@@ -191,7 +191,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActLunhuidianAward % (actNum, roundType), updState)
GameWorld.DebugLog("领取轮回殿奖励! actNum=%s,roundType=%s,needValue=%s,awardIndex=%s,awardState=%s,updState=%s,curRound=%s"
% (actNum, roundType, needValue, awardIndex, awardState, updState, curRound), playerID)
- ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList)
+ ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["Lunhuidian", False, {}])
GameWorld.DebugLog(" curRound=%s/%s,unGetIndexList=%s,curValue=%s,roundValueMax=%s"
% (curRound, roundMax, unGetIndexList, curValue, roundValueMax), playerID)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py
index c16ecfd..9c5b2ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTask.py
@@ -284,7 +284,8 @@
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem], event=["ActTask", False, {}])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "ActTask")
+
# 检查进入下一轮
if roundMax > 1 and roundNum < roundMax:
roundFinish = True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
index 9a7b033..9ac3712 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
@@ -260,7 +260,8 @@
for itemID, itemCount, _ in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "TotalRechargeAward")
+
addDataDict = {"TemplateID":templateID, "NeedGold":needGold, "AwardIndex":awardIndex,
"ItemList":str(awardItemList), "ActNum":actNum}
DataRecordPack.DR_FuncGiveItem(curPlayer, "TotalRechargeAward", addDataDict)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
index dc82d69..4bc5284 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py
@@ -626,7 +626,7 @@
# 给物品
isAuctionItem = 0
itemList = [[itemID, itemCount, isAuctionItem]]
- ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["tagActXianXiaMJLottery", False, {}])
+ ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["XianXiaMJLottery", False, {}])
# 任务
PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_XianXiaMJLottery, 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index 65cf636..9214f85 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -962,7 +962,8 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityCountTotal, totalCount)
GameWorld.DebugLog("领取活跃放置奖励: totalCount=%s,rewardCount=%s,rewardItemCount=%s,rewardItemList=%s" % (totalCount, rewardCount, rewardItemCount, rewardItemList))
- ItemControler.GivePlayerItemOrMail(curPlayer, rewardItemList)
+ ItemControler.GivePlayerItemOrMail(curPlayer, rewardItemList, event=["ActivityPlace", False, {}])
+
EventShell.EventRespons_ActivityPlace(curPlayer, "getreward")
PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_ActivityPlace, rewardCount)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index 9aaaa08..5bbe285 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -704,6 +704,8 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealTotal, ctgRealTotal)
Sync_CoinToGoldCountInfo(curPlayer, [])
+ orderInfo = addDRDict.get("orderInfo", "")
+ ctgID = ctgIpyData.GetRecordID() if ctgIpyData else 0
notifyMark = ctgIpyData.GetNotifyMark() if ctgIpyData else ""
goldBefore = curPlayer.GetGold()
bourseMoneyBefore = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
@@ -715,14 +717,16 @@
PlayerControl.GiveMoney(curPlayer, moneyType, prizeGold, eventName, addDRDict, isGiveBourseMoney=isAddBourseMoney)
if giveItemList:
- ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList, "", event=[ChConfig.ItemGive_CTG, True, copy.deepcopy(addDRDict)])
+ ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList, "", event=[ChConfig.ItemGive_CTG, True, copy.deepcopy(addDRDict)], isNotifyAward=False)
if notifyMark:
mainItemID = giveItemList[0][0]
PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetName(), mainItemID, ''])
else:
if notifyMark:
PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetName()])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, giveItemList, ChConfig.ItemGive_CTG, moneyInfo={moneyType:addGold+prizeGold},
+ dataEx={"orderInfo":orderInfo, "ctgID":ctgID})
+
addVIPExp = coinExp
PlayerVip.AddVIPExp(curPlayer, addVIPExp)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFuncSysPrivilege.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFuncSysPrivilege.py
index 27cc8b8..ab71e39 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFuncSysPrivilege.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFuncSysPrivilege.py
@@ -143,7 +143,8 @@
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem],
event=["FuncSysPrivilegeAward", False, {}])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "FuncSysPrivilegeAward")
+
Sync_FuncSysPrivilege(curPlayer, [funcSysID])
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
index 2353871..7891538 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
@@ -156,7 +156,8 @@
isAuctionItem = False
for itemID, itemCount in rewardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, rewardItemList, "GoldGiftFirst")
+
# 全服提示
if len(rewardItemList) >= 2:
PlayerControl.WorldNotify(0, "FirstPayReward1", [curPlayer.GetPlayerName(), rewardItemList[0][0], rewardItemList[1][0], giftDay])
@@ -512,6 +513,7 @@
for itemInfo in itemList:
itemID, itemCount = itemInfo[:2]
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "HistoryRecharge")
# 更新已领取成功标记
awardMark = pow(2, awardID)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
index 9f8726e..cdfc5ed 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -363,7 +363,8 @@
for itemID, itemCount, isAuctionItem in rewardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem],
event=["Invest", False, {}])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, rewardItemList, "Invest")
+
# 记录领取事件
DataRecordPack.DR_GetGoldInvestReward(curPlayer, investType, rewardIndex, rewardItemList)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLVAward.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLVAward.py
index aa03861..d4acaee 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLVAward.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLVAward.py
@@ -103,7 +103,8 @@
# 给物品
for itemID, itemCount in itemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "LVAward")
+
# 更新已领取成功标记
awardMark = pow(2, awardID - 1)
awardInfo = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LVAwardGetRecord, 0,
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLoginDayAward.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLoginDayAward.py
index 72cad88..71df261 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLoginDayAward.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLoginDayAward.py
@@ -99,6 +99,7 @@
# 给物品
for itemID, itemCount in itemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "LoginDayAward")
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LoginDayAward, awardInfo | awardMark)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
index 8727b44..0f012cb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -501,6 +501,8 @@
#给钱
for moneyType, value in ipyData.GetMoney():
PlayerControl.GiveMoney(curPlayer, moneyType, value)
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "XBXZ", moneyInfo=ipyData.GetMoney())
+
SyncXBXZAwardRecord(curPlayer, [index])
#成就
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_XBXZ, 1, [ipyData.GetMWID()])
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
index 263fc29..f57f74d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
@@ -119,7 +119,7 @@
return
awardItemList = ipyData.GetAwardItemList()
- if not ItemCommon.GiveAwardItem(curPlayer, awardItemList):
+ if not ItemCommon.GiveAwardItem(curPlayer, awardItemList, "RealmXXZL"):
return
updAwardState = awardState|pow(2, taskID)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py
index db1b2b8..3ae1fd5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py
@@ -286,8 +286,9 @@
if totalExp > 0:
PlayerControl.PlayerControl(curPlayer).AddExp(totalExp)
+ giveMoneyType = IPY_GameWorld.TYPE_Price_Silver_Money
if totalMoney > 0:
- PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, totalMoney, ChConfig.Def_GiveMoney_Recover)
+ PlayerControl.GiveMoney(curPlayer, giveMoneyType, totalMoney, ChConfig.Def_GiveMoney_Recover)
if totalSP > 0:
PlayerControl.PlayerAddZhenQi(curPlayer, totalSP, True, True, "Recover")
@@ -314,6 +315,7 @@
if mapIDInfo:
FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapIDInfo)
GameWorld.DebugLog("==[PlayerRecover]== Out->OnRecoverGain() recoverWay=%s, costMoneyDict=%s, recoverCntDict=%s, totalExp=%s, totalMoney=%s, totalSP=%s, totalItemDict=%s" % (recoverWay, costMoneyDict, recoverCntDict, totalExp, totalMoney, totalSP, totalItemDict))
+ ItemControler.NotifyGiveAwardInfo(curPlayer, totalItemDict, "Recover", totalExp, moneyInfo={giveMoneyType:totalMoney})
return
def __DoLogicBackTimes(curPlayer, recoverData, recoverCnt):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py
index 254a911..286edea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSignDay.py
@@ -162,6 +162,7 @@
"isAddSign":isAddLogin, "CostMoney":str([IPY_GameWorld.TYPE_Price_Gold_Money, signCost])}
DataRecordPack.DR_FuncGiveItem(curPlayer, "DayLoginSignAward", addDataDict)
GameWorld.DebugLog("%s: %s" % ("补签" if isAddLogin else "签到", addDataDict), curPlayer.GetPlayerID())
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardInfoList + contineAwardInfoList, "SignDay")
# 刷签到附加功能属性
PlayerMagicWeapon.CalcMagicWeaponAttr(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
index 5a9250e..b3743a7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
@@ -970,12 +970,16 @@
SetSuccHasGot(curPlayer, succID)
# 给物品
+ giveItemList = []
if isGiveItem:
for itemID, itemCnt in itemDict.items():
isPutIn = ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere])
-
+ if isPutIn:
+ giveItemList.append([itemID, itemCnt])
+
if isPassport:
# 通行证奖励只给物品
+ ItemControler.NotifyGiveAwardInfo(curPlayer, giveItemList, "SuccessAward")
return itemDict
#给钱
@@ -997,6 +1001,7 @@
PlayerMagicWeapon.AddMagicWeaponUpExp(curPlayer, mwID, addExp)
EventReport.WriteEvent_MWSuccess(curPlayer, mwID, succID, ChConfig.CME_Log_End, 1)
GameWorld.DebugLog(" OK! awardItemDict=%s moneyDict=%s" % (itemDict, succData.moneyDict))
+ ItemControler.NotifyGiveAwardInfo(curPlayer, giveItemList, "SuccessAward", exp=succData.exp, moneyInfo=succData.moneyDict)
return itemDict
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
index 0c4b40f..ace36e9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
@@ -196,9 +196,10 @@
GameWorld.DebugLog("vip礼包-%s" % itemList)
for itemid, cnt, isBind in itemList:
ItemControler.GivePlayerItem(curPlayer, int(itemid), int(cnt), 0, [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere],
- event=["buyVIPGift", False, {"VIPLV":vipLV}])
+ event=["BuyVIPGift", False, {"VIPLV":vipLV}])
# else:
# __AwardToPlayerByMail(curPlayer, itemList)
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "BuyVIPGift")
openuiid = IpyGameDataPY.GetFuncEvalCfg('VIPPanel', 1, {}).get(vipLV, 0)
PlayerControl.WorldNotify(0, 'BuyVIPGift', [curPlayer.GetName(), vipLV, itemList[0][0], openuiid])
Sycn_VIPAwardRecord(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
index 1e1d99a..32978bf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
@@ -288,6 +288,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyGotTimes % (day, templateID), newGotTimes, ChConfig.Def_PDictType_WeekParty)
for itemID, itemCnt in awardDict.items():
ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardDict, "WeekParty")
SyncWeekPartyPlayerInfo(curPlayer, day, templateID)
return
@@ -327,6 +328,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyAwardRecord % day, awardRecord | pow(2, getIndex), ChConfig.Def_PDictType_WeekParty)
for itemID, itemCnt, isBind in itemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
+ ItemControler.NotifyGiveAwardInfo(curPlayer, itemList, "WeekParty")
SyncWeekPartyPlayerInfo(curPlayer, day)
DataRecordPack.DR_WeekPartyPoint(curPlayer, day, getPoint)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerXiangong.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerXiangong.py
index 6838367..3c60073 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerXiangong.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerXiangong.py
@@ -84,6 +84,7 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XiangongLikeState % xiangongID, 1)
SyncXiangongInfo(curPlayer, [xiangongID])
PlayerControl.GiveMoney(curPlayer, moneyType, moneyValue, "LikeXiangong", {"xiangongID":xiangongID})
+ ItemControler.NotifyGiveAwardInfo(curPlayer, [], "LikeXiangong", moneyInfo={moneyType:moneyValue})
return
def GetTiandaoTreeAward(curPlayer, awardIndex):
@@ -107,7 +108,7 @@
GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_TiandaoAward, awardIndex, 1)
- ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList)
+ ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["TiandaoTree", False, {}])
SyncTiandaoTreeInfo(curPlayer)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_BossFirstKill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_BossFirstKill.py
index 77b2f9d..bfc728f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_BossFirstKill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_BossFirstKill.py
@@ -106,6 +106,7 @@
awardGoldPaper = ipyData.GetPerPlayerMoneyAward()
addDataDict = {"bossID":bossID}
PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, awardGoldPaper, ChConfig.Def_GiveMoney_BossFirstKill, addDataDict)
+ ItemControler.NotifyGiveAwardInfo(curPlayer, [], "BossFirstKill", moneyInfo={IPY_GameWorld.TYPE_Price_Gold_Paper:awardGoldPaper})
Sync_BossFirstKillState(curPlayer, [bossID])
return
@@ -135,7 +136,8 @@
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
-
+ ItemControler.NotifyGiveAwardInfo(curPlayer, awardItemList, "BossFirstKill")
+
Sync_BossFirstKillState(curPlayer, [bossID])
return
--
Gitblit v1.8.0