#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GM.Commands.testMail # # @todo:²âÊÔÓʼþÄÚÈÝ # @author hxp # @date 2016-07-04 # @version 1.0 # # ÏêϸÃèÊö: ²âÊÔÓʼþÄÚÈÝ # #------------------------------------------------------------------------------- #"""Version = 2016-07-04 20:30""" #------------------------------------------------------------------------------- import PlayerCompensation import GameWorld import ShareDefine import ChConfig ## Ö´ÐÐÂß¼­ # @param curPlayer µ±Ç°Íæ¼Ò # @param gmList [] # @return None def OnExec(curPlayer, gmList): if not gmList: GameWorld.DebugAnswer(curPlayer, "testMail Ä£°å±àºÅ ÎïÆ·Êý ÏÉÓñ °óÓñ Í­Ç® »õ±ÒÀ´Ô´ ¿Éѡģ°å²ÎÊý1 ²ÎÊý2 ...") return paramCnt = len(gmList) mailNum = gmList[0] if not mailNum or mailNum == "0": mailNum = ShareDefine.DefaultLackSpaceMailType itemCnt = gmList[1] if paramCnt > 1 else 0 gold = gmList[2] if paramCnt > 2 else 0 goldPaper = gmList[3] if paramCnt > 3 else 0 silver = gmList[4] if paramCnt > 4 else 0 moneySource = gmList[5] if paramCnt > 5 else ChConfig.Def_GiveMoney_Mail paramList = gmList[6:] itemCfg = [(29,2000000000,0),(912,5,1),(10161,1,1),(10162,1,0),(10163,1,0)] addItemList = itemCfg[0:itemCnt] content = "%s%s" % (mailNum, paramList) mailGUID = PlayerCompensation.SendPersonalItemMailEx("", content, 1, [curPlayer.GetPlayerID()], addItemList, gold, goldPaper, silver, moneySource=moneySource) GameWorld.DebugAnswer(curPlayer, "SendMail mailGUID=%s" % mailGUID) return