hxp
2025-06-12 96c0ba31f74064e59c746921fcd1386cddf78d42
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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.LoveRing
#
# @todo:Çé½ä
# @author hxp
# @date 2021-11-09
# @version 1.0
#
# ÏêϸÃèÊö: Çé½ä
#
#-------------------------------------------------------------------------------
#"""Version = 2021-11-09 20:00"""
#-------------------------------------------------------------------------------
 
import GameWorld
import PlayerControl
import PlayerLove
import ChConfig
 
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param msgList ²ÎÊýÁбí [addSkillID]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, msgList):
    
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃÇé½ä: LoveRing 0")
        GameWorld.DebugAnswer(curPlayer, "ÉèÖÃÇé½ä: LoveRing ½×  [¿ÉÑ¡ÐÇ  ÒѳԸöÊý]")
        return
    
    classLV = msgList[0] if len(msgList) > 0 else 1
    if classLV == 0:
        starLV, eatCount = 0, 0
    else:
        starLV = msgList[1] if len(msgList) > 1 else 1
        eatCount = msgList[2] if len(msgList) > 2 else 0
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LoveRingClassLV, classLV)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LoveRingStarLV, starLV)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LoveRingEatCount, eatCount)
    PlayerLove.Sync_LoveRingInfo(curPlayer)
    PlayerLove.RefreshLoveAttr(curPlayer)
    GameWorld.DebugAnswer(curPlayer, "ÉèÖÃÇé½ä: ½×:%s ÐÇ:%s ¿Å:%s" % (classLV, starLV, eatCount))
    return