From 3a1090fc50fcd4cbffec27dc13f08130c417bc79 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 17 六月 2022 19:11:00 +0800
Subject: [PATCH] 9559 【越南】服务器调整只用C盘(中心相关工具:开关服、机器人、语音、媒体卡)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_196.py | 71 -----------------------------------
1 files changed, 1 insertions(+), 70 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_196.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_196.py
index d77b4ee..3242144 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_196.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_196.py
@@ -20,12 +20,8 @@
import GameWorld
import NPCCommon
import IPY_GameWorld
-import PlayerControl
-import IpyGameDataPY
-import AttackCommon
-import ItemCommon
+import AICommon
import GameObj
-import ChItem
import random
@@ -246,14 +242,10 @@
# @param tick
# @return 具体伤害值
def OnAttacked(atkObj, curNPC, skill, tick):
- npcControl = NPCCommon.NPCControl(curNPC)
if GameObj.GetHP(curNPC) < GameObj.GetMaxHP(curNPC) / 2:
GameObj.SetHP(curNPC, GameObj.GetMaxHP(curNPC))
GameWorld.DebugLog("半血回满血!")
curNPC.SetDict(Def_NPCKey_Goblin_AttackedTick, tick) # 设置被攻击时间
-
- # 每次被攻击掉落物品
- __OnAttackedDropItem(atkObj, curNPC, npcControl)
return
def OnCheckCanDie(atkObj, curNPC, skill, tick):
@@ -261,65 +253,4 @@
GameObj.SetHP(curNPC, GameObj.GetMaxHP(curNPC))
GameWorld.DebugLog("死亡回满血!")
return False
-
-
-## 每次被攻击掉落物品
-# @param atkObj 攻击发起者
-# @param curNPC 被攻击NPC
-# @return None
-def __OnAttackedDropItem(atkObj, curNPC, npcControl):
- attackPlayer, npcObjType = AttackCommon.GetAttackPlayer(atkObj)
- if npcObjType:
- return
- if not attackPlayer:
- return
- npcID = curNPC.GetNPCID()
- ipyData = IpyGameDataPY.GetIpyGameDataNotLog("TreasureNPC", npcID)
- if not ipyData:
- return
- attackCountDropWeightInfo = ipyData.GetAttackCountDropWeightInfo()
- attackDropWeightList = ipyData.GetAttackDropWeightList()
- attackDropWeightListEx = ipyData.GetAttackDropWeightListEx()
- dropCountEx = ipyData.GetDropCountEx()
- alchemyDiffLV = ipyData.GetAlchemyDiffLV()
-
- mainItemWeightList = []
- if attackCountDropWeightInfo:
- maxCount = max(attackCountDropWeightInfo)
- attackCount = attackPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NPCAttackCount % npcID) + 1
- if attackCount <= maxCount:
- if attackCount in attackCountDropWeightInfo:
- mainItemWeightList = attackCountDropWeightInfo[attackCount]
- NPCCommon.UpdateNPCAttackCount(attackPlayer, npcID, attackCount, maxCount)
-
- if mainItemWeightList:
- mainItemWeightList = ItemCommon.GetWeightItemListByAlchemyDiffLV(attackPlayer, mainItemWeightList, alchemyDiffLV)
- elif attackDropWeightList:
- mainItemWeightList = ItemCommon.GetWeightItemListByAlchemyDiffLV(attackPlayer, attackDropWeightList, alchemyDiffLV)
-
- mainItemInfo = GameWorld.GetResultByWeightList(mainItemWeightList)
-
- if not mainItemInfo:
- notDropNotify = ipyData.GetNotDropNotify()
- if notDropNotify:
- PlayerControl.NotifyCode(attackPlayer, notDropNotify)
- return
-
- dropItemList = []
- if mainItemInfo:
- dropItemList.append(mainItemInfo)
-
- if attackDropWeightListEx and dropCountEx:
- weightListEx = ItemCommon.GetWeightItemListByAlchemyDiffLV(attackPlayer, attackDropWeightListEx, alchemyDiffLV)
- for _ in xrange(dropCountEx):
- itemInfo = GameWorld.GetResultByWeightList(weightListEx)
- if itemInfo:
- dropItemList.append(itemInfo)
-
- if not dropItemList:
- return
-
- dropPosX, dropPosY = curNPC.GetPosX(), curNPC.GetPosY()
- ChItem.DoMapDropItem(attackPlayer, dropItemList, npcID, dropPosX, dropPosY, isOnlySelfSee=False)
- return
--
Gitblit v1.8.0