| | |
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import GameWorld
|
| | | import EventShell
|
| | | import IPY_GameWorld
|
| | | import ItemControler
|
| | | import ChConfig
|
| | |
| | | # @return 远程商店的npc
|
| | | def GetDirectNpcID():
|
| | | return 0
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##结束事件
|
| | | # @param curPlayer 玩家实例
|
| | | # @param tick 时间戳
|
| | | # @return 返回值真, 逻辑运行成功
|
| | | # @remarks 结束事件
|
| | | def ExitEvent(curPlayer, tick):
|
| | | |
| | | EventShell.DoExitEvent(curPlayer)
|
| | | return True
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##请求商店物品列表
|
| | |
| | | if not sendMailKey:
|
| | | if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, event=[ChConfig.ItemGive_BuyItem, isForceEvent, dataDict]):
|
| | | GameWorld.ErrLog("购买商城物品放入背包失败! itemID=%s, itemCount=%s" % (itemID, itemCount), curPlayer.GetPlayerID())
|
| | | EventShell.EventRespons_BuyItem(curPlayer, itemID, itemCount)
|
| | | |
| | | |
| | | if ipyData.GetNotifyMark() and itemID == mainItemID:
|
| | | PlayerControl.WorldNotify(0, ipyData.GetNotifyMark(), [curPlayer.GetName(), mainItemID, userData])
|
| | |
|
| | |
| | | PlayerControl.SendMailByKey(sendMailKey, [curPlayer.GetID()], totalItemList, detail=dataDict)
|
| | | else:
|
| | | ItemControler.NotifyGiveAwardInfo(curPlayer, totalItemList, ChConfig.ItemGive_BuyItem, dataEx=shopType)
|
| | | #触发任务购买物品
|
| | | EventShell.EventRespons_ShopBuy(curPlayer, shopType)
|
| | | #curPlayer.ShopResult(itemIndex, IPY_GameWorld.tsrShopOK)
|
| | | SyncShoppingResult(curPlayer, itemIndex, clientBuyCount)
|
| | |
|
| | | if shopType == ShopType_FairyCeremony:
|