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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/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()