#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # #------------------------------------------------------------------------------- # ##@package CTG # # @todo: µãȯתԪ±¦£¬²»¿Ûµãȯ£¬Ö»´¥·¢Âß¼­ # @author Alee # @date 2011-11-15 14:30 # @version 1.6 # # ÏêϸÃèÊö: # @change: "2012-01-30 19:00" wdb Ôö¼Ó¼ÓÔùË͵ãȯ # @change: "2012-01-31 10:00" wdb ´«µÝ²ÎÊýÐÞ¸Ä # @change: "2012-04-25 15:10" Alee ³äÖµÖ§³ÖÔùËÍ # @change: "2012-08-21 12:00" Alee ²»¼Ç¼³äÖµÕ˵¥ # @change: "2013-12-27 16:30" Alee ·ö³ÖÕ˺Š# @change: "2016-07-20 14:30" hxp Ôö¼ÓÁ÷ÏòÀàÐͱê¼Ç #------------------------------------------------------------------------------ #"""Version = 2016-07-20 14:30""" #------------------------------------------------------------------------------ import GameWorld import PlayerCoin import PlayerControl import IpyGameDataPY import ShareDefine import ChConfig ## GMÃüÁîÖ´ÐÐÈë¿Ú # @param curPlayer µ±Ç°Íæ¼Ò # @param msgList ²ÎÊýÁбí # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def OnExec(curPlayer, msgList): if not msgList: GameWorld.DebugAnswer(curPlayer, "CTG ½ð¶îÔª ÊÇ·ñÔö¼Ó¼¯ÊйºÂò¶î¶ÈĬÈÏÊÇ") GameWorld.DebugAnswer(curPlayer, "CTG ÉÌÆ·±àºÅ appID ÊÇ·ñÔö¼Ó¼¯ÊйºÂò¶î¶È") return ctgValue = str(msgList[0]) orderInfoIpyData = None if len(msgList) > 1: value2 = str(msgList[1]) orderInfoIpyData = IpyGameDataPY.GetIpyGameDataNotLog("OrderInfo", ctgValue, value2) orderRMB = GameWorld.ToNumDef(ctgValue, None) if not orderInfoIpyData and orderRMB != None: isAddBourseMoney = msgList[1] if len(msgList) > 1 else 1 if not PlayerCoin.PlayerCoinToGoldEx(curPlayer, orderRMB, ChConfig.Def_GiveMoney_CTG, isAddBourseMoney): GameWorld.DebugAnswer(curPlayer, "³äֵʧ°Ü£¡Çë²é¿´·þÎñ¶ËÈÕÖ¾!") return else: orderInfo = ctgValue appID = str(msgList[1]) if len(msgList) > 1 else "" isAddBourseMoney = msgList[2] if len(msgList) > 2 else 1 if not appID or appID == "0": appID = GameWorld.GetPlayerPlatform(curPlayer) if not appID: GameWorld.DebugAnswer(curPlayer, "ÐèÒªÖ¸¶¨ÉÌÆ·±àºÅËùÊôAppID!") return isOK = PlayerCoin.DoGMCTG(curPlayer, orderInfo, appID, isAddBourseMoney, ChConfig.Def_GiveMoney_CTG) if not isOK: GameWorld.DebugAnswer(curPlayer, "³äֵʧ°Ü£¡Çë²é¿´·þÎñ¶ËÈÕÖ¾!") return GameWorld.DebugAnswer(curPlayer, "³äÖµ³É¹¦£¡¼¯ÊйºÂò¶î¶È:%s" % PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)) return