From 46c9d7d80fb93f053bd64acd1fa94ee3dc181bf3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 11 二月 2020 13:41:51 +0800
Subject: [PATCH] 8377 新增任务接口(上架橙装、购买橙装、货币变更、更新货币;活跃放置各状态接口)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 23 +++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 10 +++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_AuctionHouseGiveItem.py | 4 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py | 26 +++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 5 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py | 3 +
6 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
index 61e389c..d60f3d7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1997,6 +1997,32 @@
RunQuestEvent(curPlayer, "xbxz", MWID, Def_RunQuestType_Normal)
return
+def EventRespons_AddAuctionEquip(curPlayer, color):
+ # 上架装备拍品
+ RunQuestEvent(curPlayer, "addauctionequip", color, Def_RunQuestType_Normal)
+ return
+
+def EventRespons_BuyAuctionEquip(curPlayer, color):
+ # 购买装备拍品
+ RunQuestEvent(curPlayer, "buyauctionequip", color, Def_RunQuestType_Normal)
+ return
+
+def EventRespons_OnMoneyChange(curPlayer, moneyType):
+ # 货币变更时
+
+ # 暂开放灵石
+ if moneyType not in [IPY_GameWorld.TYPE_Price_Gold_Paper]:
+ return
+ RunQuestEvent(curPlayer, "onmoneychange", moneyType, Def_RunQuestType_Normal)
+ return
+
+def EventRespons_ActivityPlace(curPlayer, event, runall=True):
+ ''' 活跃放置事件
+ @param event: 可启动 canstart、启动 start、可领奖 cangetreward、领奖 getreward
+ '''
+ RunQuestEvent(curPlayer, "activityplace", event, Def_RunQuestType_RunAll if runall else Def_RunQuestType_Normal)
+ return
+
#---------------------------------------------------------------------
#================================================================================
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 54c80cd..e27aa3c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7403,6 +7403,29 @@
value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Activity_TotalPoint, 0) >= value
+##活跃放置判断可否领奖
+# @param None
+# @return None <Check_Activityplacereward />
+def ConditionType_Check_Activityplacereward(curPlayer, curMission, curActionNode):
+ return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardCount) > 0
+
+##设置当前货币类型对应值
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Money key="任务存值key名" moneytype="货币类型"/>
+def DoType_Set_Money(curPlayer, curMission, curActionNode):
+ key = curActionNode.GetAttribute("key")
+ moneytype = GameWorld.ToIntDef(curActionNode.GetAttribute("moneytype"), 0)
+ if not moneytype:
+ return
+ questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+ if questID != 0:
+ curMission = curPlayer.FindMission(questID)
+ curMission.SetProperty(key, PlayerControl.GetMoney(curPlayer, moneytype))
+ return
+
##设置仙宝寻主领奖进度
# @param curPlayer 玩家实例
# @param curMission 任务实例
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 826a031..c4f93df 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -323,6 +323,10 @@
return
updPoint = curPoint + addValue
__SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, updPoint)
+
+ costPoint = IpyGameDataPY.GetFuncCfg("ActivityPlace", 2) # 单次放置消耗的活跃点数
+ if updPoint >= costPoint:
+ EventShell.EventRespons_ActivityPlace(curPlayer, "canstart", True)
return
def CostActivityPoint(curPlayer, costPoint, isOnlyCheck=False):
@@ -692,6 +696,8 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceExpCount, 0)
GameWorld.DebugLog(" 没有剩余次数,更新启动时间: %s" % curTime)
+ EventShell.EventRespons_ActivityPlace(curPlayer, "start")
+
Sync_ActivityPlaceInfo(curPlayer)
return
@@ -881,6 +887,8 @@
if isQuick:
PlayerControl.NotifyCode(curPlayer, "ActivityPlaceQuickFinishOK")
+ EventShell.EventRespons_ActivityPlace(curPlayer, "cangetreward")
+
Sync_ActivityPlaceInfo(curPlayer)
return
@@ -910,6 +918,8 @@
GameWorld.DebugLog("领取活跃放置奖励: rewardItemCount=%s,rewardItemList=%s" % (rewardItemCount, rewardItemList))
ItemControler.GivePlayerItemOrMail(curPlayer, rewardItemList)
+ EventShell.EventRespons_ActivityPlace(curPlayer, "getreward")
+
Sync_ActivityPlaceInfo(curPlayer)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py
index c3fe1c7..7e448fd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAuctionHouse.py
@@ -25,6 +25,7 @@
import ChConfig
import ShareDefine
import PlayerActivity
+import EventShell
import NPCCommon
import random
@@ -191,6 +192,8 @@
#扣物品
if curPlayer and not familyID:
+ if ItemCommon.CheckItemIsEquip(curItem):
+ EventShell.EventRespons_AddAuctionEquip(curPlayer, curItem.GetItemColor())
ItemCommon.DelItem(curPlayer, curItem, curItem.GetCount())
else:
if not ItemControler.GetIsAuctionItem(curItem):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 1db7192..6be3b4d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3008,6 +3008,8 @@
elif type_Price == IPY_GameWorld.TYPE_Price_Silver_Paper:
__PayMoneyAfterBySilverPaper(curPlayer, price)
+ EventShell.EventRespons_OnMoneyChange(curPlayer, type_Price)
+
#活跃度处理
PlayerActivity.OnPayMoneyActivity(curPlayer, type_Price, price)
@@ -3233,6 +3235,9 @@
def __GiveMoneyAfter(curPlayer, priceType, value, giveType, addDataDict):
# 除钻石及绑钻外,未指定操作类型的不记录
+
+ EventShell.EventRespons_OnMoneyChange(curPlayer, priceType)
+
if priceType not in [IPY_GameWorld.TYPE_Price_Gold_Money, IPY_GameWorld.TYPE_Price_Gold_Paper] \
and giveType == ChConfig.Def_GiveMoney_Unknown:
#GameWorld.DebugLog("该货币没有指定来源类型不记录!priceType=%s,giveType=%s" % (priceType, giveType))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_AuctionHouseGiveItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_AuctionHouseGiveItem.py
index 822cfab..d5e9d4f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_AuctionHouseGiveItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_AuctionHouseGiveItem.py
@@ -20,6 +20,7 @@
import ItemControler
import IPY_GameWorld
import PlayerControl
+import EventShell
import ChConfig
@@ -59,6 +60,9 @@
curCreateItem.SetUserData(userData, len(userData))
ItemCommon.MakeEquipGS(curCreateItem)
+ if ItemCommon.CheckItemIsEquip(curCreateItem):
+ EventShell.EventRespons_BuyAuctionEquip(curPlayer, curCreateItem.GetItemColor())
+
drDict = {"ItemGUID":itemGUID, "ItemID":itemID, "ItemCount":itemCount, "UserData":userData}
isOK = ItemControler.DoLogic_PutItemInPack(curPlayer, curCreateItem, event=[ChConfig.ItemGive_BourseItem, True, drDict],
packIndexList=[IPY_GameWorld.rptItem])
--
Gitblit v1.8.0