#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
  
 | 
##@package ClearBuff  
 | 
# ½â³ýbuf  
 | 
#  
 | 
# @author Mark  
 | 
# @date 2010-4-21  
 | 
# @version 1.2  
 | 
#  
 | 
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ  
 | 
# @change: "2010-12-07 12:00" Alee Çå¿ÕÐÐΪBUFF  
 | 
# @change: "2010-12-31 17:00" Alee Ìí¼ÓйÜÀíÆ÷ÐÞ¸ÄÂß¼  
 | 
#  
 | 
# Ä£¿éÏêϸ˵Ã÷  
 | 
  
 | 
"""Version = 2010-12-31 17:00"""  
 | 
  
 | 
import GameWorld  
 | 
import PlayerControl  
 | 
import SkillCommon  
 | 
import IPY_GameWorld  
 | 
import NPCCommon  
 | 
import GMCommon  
 | 
  
 | 
  
 | 
## Êä³öbuff״̬  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param buffState buffÐÅÏ¢  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def PrintBuffState(curPlayer, tagObj, buffType):  
 | 
    GameWorld.DebugAnswer(curPlayer, "---------" + GMCommon.BuffNameList[buffType])  
 | 
    buffTuple = SkillCommon.GetBuffManagerByBuffType(tagObj, buffType)  
 | 
      
 | 
    if buffTuple == ():  
 | 
        return  
 | 
    buffState = buffTuple[0]  
 | 
      
 | 
    GameWorld.DebugAnswer(curPlayer, "%d"%buffState.GetBuffCount())  
 | 
    buffState.Clear()  
 | 
  
 | 
## GMÃüÁîÖ´ÐÐÈë¿Ú  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param list ²ÎÊýÁбí [NPCID]  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def OnExec(curPlayer, list):  
 | 
    PlayerControl.ClearPKValue(curPlayer)  
 | 
  
 | 
    GameWorld.DebugAnswer(curPlayer, "¿ªÊ¼Çå¿ÕbuffÁбí,ÈçÎÞ´òÓ¡,¼ÈÎÞBuff")  
 | 
    for buffType in range(IPY_GameWorld.bfBuff, IPY_GameWorld.btBufMax):  
 | 
        PrintBuffState(curPlayer, curPlayer, buffType)  
 | 
      
 | 
    curControl = PlayerControl.PlayerControl(curPlayer)  
 | 
    #Ë¢ÐÂËùÓÐÊôÐÔ  
 | 
    curControl.RefreshAllState()  
 | 
      
 | 
    if len(list) == 0:  
 | 
        return  
 | 
      
 | 
    #Êä³öNPCBuff  
 | 
    curNPC = GameWorld.GetNPCManager().FindNPCByID(list[0])  
 | 
      
 | 
    if curNPC == None:  
 | 
        GameWorld.DebugAnswer(curPlayer, "NPCID ÕÒ²»µ½£¬¶ÔÓ¦NPC")  
 | 
        return  
 | 
      
 | 
    curNPC = GameWorld.GetObjDetail(curNPC)  
 | 
    GameWorld.DebugAnswer(curPlayer, "NPCÐÅÏ¢ %s %s"%(curNPC.GetName(), curNPC.GetID()))  
 | 
      
 | 
    for buffType in GMCommon.GetNPCBuffTypeList(curNPC):  
 | 
        PrintBuffState(curPlayer, curNPC, buffType)  
 | 
          
 | 
    npcControl = NPCCommon.NPCControl(curNPC)  
 | 
    npcControl.RefreshNPCState()  
 | 
      
 | 
     
 |