|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #先设置对象,任务可采集得到对象NPC | 
|---|
|  |  |  | curPlayer.SetActionObj(curNPC) | 
|---|
|  |  |  | if curNPC.GetNPCID() in ReadChConfig.GetEvalChConfig("CollectNPCLostHP"): | 
|---|
|  |  |  | curPlayer.SetDict(ChConfig.Def_PlayerKey_CollectLostHPTick, tick) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 自定义的采集NPC | 
|---|
|  |  |  | if NPCCommon.DoCollectNPCBegin(curPlayer, curNPC): | 
|---|
|  |  |  | if NPCCommon.OnCollectNPCBegin(curPlayer, curNPC, tick): | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | EventShell.EventRespons_MisCollectTime(curPlayer, curNPC) | 
|---|
|  |  |  | 
|---|
|  |  |  | if not ChNPC.OnCollectEnd(curPlayer, curNPC): | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | PlayerState.DoCollectingLostHP(curPlayer, npcID, tick, True) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 自定义的采集NPC | 
|---|
|  |  |  | if NPCCommon.DoCollectNPCOK(curPlayer, npcID): | 
|---|
|  |  |  | EventShell.EventRespons_MisCollectSuccess(curPlayer, curNPC) # 先直接写这边触发一下,自定义采集的不再处理后面的代码 | 
|---|
|  |  |  | FBLogic.OnCollectOK(curPlayer, npcID, GameWorld.GetGameWorld().GetTick()) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | NPCCommon.DoCollectNPCOK(curPlayer, npcID, tick) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | EventShell.EventRespons_MisCollectSuccess(curPlayer, curNPC) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|