#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
#-------------------------------------------------------------------------------
|
#
|
##@package GM.Commands.SetEquipPartStar
|
#
|
# @todo:ÉèÖÃ×°±¸²¿Î»¹«¹²ÐÇÊý
|
# @author xdh
|
# @date 2019-3-2
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ÉèÖÃ×°±¸²¿Î»¹«¹²ÐÇÊý
|
#
|
#---------------------------------------------------------------------
|
"""Version = 2019-3-2 17:00"""
|
#---------------------------------------------------------------------
|
import PlayerControl
|
import ChEquip
|
import GameWorld
|
import IpyGameDataPY
|
#---------------------------------------------------------------------
|
#Â߼ʵÏÖ
|
## GMÃüÁîÖ´ÐÐÈë¿Ú
|
# @param curPlayer µ±Ç°Íæ¼Ò
|
# @param cmdList ²ÎÊýÁбí [classlv, equipPlace, starLV]
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def OnExec(curPlayer, cmdList):
|
if not cmdList:
|
__GMHelpAnswer(curPlayer)
|
return
|
|
if len(cmdList) != 3:
|
return
|
classlv, equipPlace, starLV = cmdList
|
ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
|
if not ipyData:
|
__GMHelpAnswer(curPlayer)
|
return
|
equipPackIndex = ipyData.GetGridIndex()
|
ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
|
ChEquip.NotifyEquipPartStar(curPlayer, equipPackIndex)
|
ChEquip.RefreshPlayerEquipAttribute(curPlayer, classlv)
|
playControl = PlayerControl.PlayerControl(curPlayer)
|
playControl.RefreshPlayerAttrState()
|
return
|
|
|
def __GMHelpAnswer(curPlayer, errorMsg="²ÎÊýÁбí [classlv, equipPlace, starLV]"):
|
if errorMsg:
|
GameWorld.DebugAnswer(curPlayer, "%s" % errorMsg)
|
|
|
return
|