hxp
2018-08-23 e45410c415266e12c20439fd2c32429a8c8b7e5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/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 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])
    if ctgValue.isdigit():
        orderRMB = int(ctgValue)
        isAddBourseMoney = msgList[1] if len(msgList) > 1 else 1
        PlayerCoin.PlayerCoinToGoldEx(curPlayer, orderRMB, ChConfig.Def_GiveMoney_CTG, isAddBourseMoney)
    else:
        orderInfo = ctgValue
        appID = str(msgList[1]) if len(msgList) > 1 else ""
        isAddBourseMoney = msgList[2] if len(msgList) > 2 else 1
        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