hxp
2025-06-12 edc3910a9d090e5df4deb2dbc37709a740375938
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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package ItemSuit
# @todo: Ì××°»¯
# @author Alee
# @date 2011-01-21 17:00
# @version 1.0
#
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
#
# Ä£¿éÏêϸ˵Ã÷
#
#---------------------------------------------------------------------
"""Version = 2011-01-21 17:00"""
#µ¼Èë
 
import IPY_GameWorld
import ItemCommon
import ShareDefine
import GameWorld
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param msgList ²ÎÊýÁбí[ÎïÆ·Ë÷Òý£¬ÊÇ·ñÌ××°»¯]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, msgList):
    if len(msgList) != 2:
        return
    
    index = int(msgList[0])
    
    curEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem).GetAt(index)
    
    #¼ì²éÊÇ·ñÊÇ×°±¸
    if not ItemCommon.CheckItemIsEquip(curEquip):
        GameWorld.DebugAnswer(curPlayer, "¸ÃλÖà%s ÎïÆ·²»ÊÇ×°±¸"%index)
        return
    
    if curEquip.GetSuiteID() == 0:
        GameWorld.DebugAnswer(curPlayer, "¸ÃλÖà%s ÎïÆ·²»ÊÇ¿ÉÌ××°µÄ×°±¸"%index)
        return 
    
    curEquip.SetIsSuite(msgList[1])
    curEquip.SetUserAttr(ShareDefine.Def_IudetSuiteLV, msgList[1])
    GameWorld.DebugAnswer(curPlayer, "Ì××°»¯ÉèÖóɹ¦")