#!/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  
 | 
  
 | 
  
 |