xdh
2019-03-02 8df2bbe894731fb3691dfde36fa8e583bc8f5576
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
#!/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