#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package GM.Commands.SetVIPKillLV
|
#
|
# @todo:ÉèÖÃVIP»÷ɱNPC¾ÑéµÈ¼¶ÐÅÏ¢
|
# @author hxp
|
# @date 2018-02-06
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ÉèÖÃVIP»÷ɱNPC¾ÑéµÈ¼¶ÐÅÏ¢
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2018-02-06 11:00"""
|
#-------------------------------------------------------------------------------
|
|
import PlayerVip
|
import IpyGameDataPY
|
import PlayerControl
|
import GameWorld
|
import ChConfig
|
|
## GMÃüÁîÖ´ÐÐÈë¿Ú
|
# @param curPlayer µ±Ç°Íæ¼Ò
|
# @param playerList ²ÎÊýÁбí [speed]
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def OnExec(curPlayer, cmdList):
|
|
if not cmdList:
|
GameWorld.DebugAnswer(curPlayer, "SetVIPKillLV µÈ¼¶ ¾Ñé")
|
GameWorld.DebugAnswer(curPlayer, "µ±Ç°É±¹ÖµÈ¼¶=%s,¾Ñé=%s"
|
% (PlayerVip.GetVIPKillNPCLV(curPlayer), PlayerVip.GetVIPKillNPCLVExp(curPlayer)))
|
return
|
|
if not curPlayer.GetVIPLv():
|
GameWorld.DebugAnswer(curPlayer, "·ÇVIPÎÞ·¨ÉèÖÃ!")
|
return
|
|
maxKillLV = IpyGameDataPY.IPY_Data().GetVIPKillNPCCount()
|
killLV = min(max(1, cmdList[0]), maxKillLV)
|
killExp = cmdList[1] if len(cmdList) > 1 else None
|
|
if killExp != None:
|
PlayerVip.SetVIPKillNPCLVExp(curPlayer, killExp)
|
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_VIPKillLV, killLV)
|
PlayerVip.RefreshVIPAttr(curPlayer)
|
PlayerVip.SyncVIPKillNPCLVInfo(curPlayer)
|
GameWorld.DebugAnswer(curPlayer, "ÉèÖÃVIPɱ¹ÖµÈ¼¶:%s,¾Ñé=%s" % (killLV, killExp))
|
return
|
|