From 67a84dc38db8f7d0f85b03e2b06ba728d95c1e82 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 07 二月 2026 20:29:42 +0800
Subject: [PATCH] 476 【付费内容】时机礼包-服务端(自定义存储支持;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   90 ++-------------------------------------------
 1 files changed, 4 insertions(+), 86 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 5329d24..b5fde3d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -23,14 +23,12 @@
 import SkillShell
 import BuffSkill
 import BaseAttack
-import ChNetSendPack
 import SkillCommon
 import AttackCommon
 import ItemControler
 import ItemCommon
 import FBLogic
 import ReadChConfig
-import PetControl
 import NPCAI
 import OperControlManager
 import ShareDefine
@@ -40,26 +38,11 @@
 import DataRecordPack
 import NetPackCommon
 import FBCommon
-import PlayerSuccess
-import PlayerPrestigeSys
-import GY_Query_BossFirstKill
 import FormulaControl
-import PlayerBossReborn
-import PlayerCrossYaomoBoss
-import PlayerActCollectWords
-import PlayerTongTianLing
-import CrossPlayerData
-import PlayerFeastWish
-import PlayerFeastTravel
-import PlayerGoldInvest
-import PlayerWeekParty
 import NPCRealmRefresh
-import PlayerActLogin
 import PlayerActTask
-#import PlayerZhanling
 import IpyGameDataPY
 import PlayerState
-import TurnAttack
 import PyGameData
 import GameObj
 import ChNPC
@@ -106,12 +89,6 @@
     # NPC等级
     if hasattr(curNPC, "GetCurLV"):
         return max(curNPC.GetCurLV(), curNPC.GetLV())
-    if curPlayer and PlayerControl.GetRealmDifficulty(curPlayer):
-        npcID = curNPC.GetNPCID()
-        needRealmLV = PlayerControl.GetDifficultyRealmLV(PlayerControl.GetRealmDifficulty(curPlayer))
-        realmNPCIpyData = IpyGameDataPY.GetIpyGameDataNotLog("NPCRealmStrengthen", npcID, needRealmLV)
-        if realmNPCIpyData:
-            return realmNPCIpyData.GetLV()
     return curNPC.GetLV()
 
 def GetNPCDataPy(npcID):
@@ -197,7 +174,7 @@
     #存一个满足要求的所有的物品的列表 然后从当中随机选一个
     #注: 阶、颜色、套装ID、职业、部位,这5个条件可确认唯一一件装备
     
-    if not PyGameData.InitPyItem:
+    if not PyGameData.g_initPyItem:
         GameWorld.ErrLog("地图还未启动好载物品!")
         return []
     
@@ -342,8 +319,7 @@
         ownerDetail = GetSummonOwnerDetel(npcObj)
         
     elif npcObjType == IPY_GameWorld.gnotPet:
-        #查找宠物主人
-        ownerDetail = PetControl.GetPetOwner(npcObj)  
+        pass
 
     return ownerDetail
 #---------------------------------------------------------------------
@@ -832,9 +808,6 @@
             
         ChNPC.OnNPCSetDead(curNPC)
         
-        if npcid == IpyGameDataPY.GetFuncCfg("CrossYaomoBoss", 1):
-            PlayerCrossYaomoBoss.OnCrossYaomoBossDead(curNPC)
-            
     # 清除队伍成员伤血列表
     AttackCommon.ClearTeamPlayerHurtValue(curNPC)
     if curNPC.GetType() == ChConfig.ntRobot:
@@ -2277,7 +2250,6 @@
     
         #宠物特殊处理
         if curNPC.GetGameNPCObjType() == IPY_GameWorld.gnotPet:
-            PetControl.RefurbishPetAttr(curNPC, canSyncClient)
             return
         
         DoNPCAttrStrengthen(curNPC, isReborn)
@@ -2515,7 +2487,6 @@
         
         #宠物死亡调用独立接口
         if curNPC_GameNPCObjType == IPY_GameWorld.gnotPet:
-            PetControl.SetPetDead(curNPC)
             return
         
         #---通用死亡逻辑---
@@ -3133,7 +3104,6 @@
         else:
             if GetNPCLV(curNPC) >= curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
                 PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_KillNPC)
-        #PlayerPrestigeSys.AddRealmTaskValue(curPlayer, PlayerPrestigeSys.RealmTaskType_KillNPC, 1)
         
         if ChConfig.IsGameBoss(curNPC):
             OnPlayerKillBoss(curPlayer, npcID, mapID, False)
@@ -3158,10 +3128,6 @@
         #不是普通NPC    
         elif npcObjType != IPY_GameWorld.gnotNormal:
             return
-        npcID = curNPC.GetNPCID()
-        #GameWorld.DebugLog("__MissionOnKillNPC isFeel=%s" % (isFeel), curPlayer.GetPlayerID())
-        #击杀特定NPC成就
-        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillSpecificNPC, 1, [npcID])
         return
         
     def __GetIsLog(self):
@@ -3204,47 +3170,7 @@
     #  @return 返回值, 获得经验
     #  @remarks 获得经验, 可能是小数
     def __GetExp(self, playerLV, isTeam=False, player=None):
-        curNPC = self.__Instance
-        baseExp = 0
-        #玩家不在副本中
-        if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
-            baseExp = FBLogic.OnGetNPCExp(player, curNPC)
-        if baseExp > 0:
-            return baseExp
-        
-        npcID = curNPC.GetNPCID()
-        realmLV = PlayerControl.GetDifficultyRealmLV(curNPC.GetSightLevel())
-        realmNPCIpyData = IpyGameDataPY.GetIpyGameDataNotLog("NPCRealmStrengthen", npcID, realmLV)
-        if realmNPCIpyData:
-            baseExp = realmNPCIpyData.GetExp()
-            npcLV = realmNPCIpyData.GetLV()
-        else:
-            baseExp = curNPC.GetExp()
-            npcLV = curNPC.GetLV()
-            
-        if baseExp == 0:
-            #GameWorld.Log("杀怪经验异常,该NPC = %s,无经验"%(curNPC.GetID()))
-            return 0
-        
-        playerID = 0 if not player else player.GetPlayerID()
-        # 如果是队伍,则按伤害贡献度计算所获得经验比例
-        if isTeam:
-            if not player:
-                return 0
-            hurtPer = AttackCommon.GetTeamPlayerHurtPer(player, curNPC)
-            if not hurtPer:
-                return 0
-            #GameWorld.DebugLog("队员击杀基础经验: npcID=%s,baseExp=%s,hurtPer=%s" % (curNPC.GetNPCID(), baseExp, hurtPer), playerID)
-            baseExp *= hurtPer
-        #else:
-        #    GameWorld.DebugLog("个人击杀基础经验: npcID=%s,baseExp=%s" % (curNPC.GetNPCID(), baseExp), playerID)
-        
-        #经验衰减公式 = max(杀怪经验 * max(1-max(玩家等级-怪物等级-10,0)*0.02),0),1)
-        exp = eval(FormulaControl.GetCompileFormula("ExpAttenuation", IpyGameDataPY.GetFuncCfg("ExpAttenuation", 1)))
-        #exp = CalcNPCExp(baseExp, playerLV, npcLV)
-        #GameWorld.DebugLog("击杀NPC最终基础经验: npcID=%s,npcLV=%s,playerLV=%s,baseExp=%s,exp=%s" 
-        #                   % (curNPC.GetNPCID(), npcLV, playerLV, baseExp, exp), playerID)
-        return exp
+        return 0
     
     #---------------------------------------------------------------------
     
@@ -3661,12 +3587,7 @@
     npcData = GameWorld.GetGameData().FindNPCDataByID(npcID)
     if not npcData:
         return 0
-    needRealmLV = PlayerControl.GetDifficultyRealmLV(PlayerControl.GetRealmDifficulty(curPlayer))
-    realmNPCIpyData = IpyGameDataPY.GetIpyGameDataNotLog("NPCRealmStrengthen", npcID, needRealmLV)
-    if realmNPCIpyData:
-        baseExp = realmNPCIpyData.GetExp()
-    else:
-        baseExp = npcData.GetExp()
+    baseExp = npcData.GetExp()
     if not baseExp:
         return 0
     npcLV = npcData.GetLV()
@@ -4123,7 +4044,6 @@
     if not buyTimesVIPPriID:
         return
     canBuyCnt = 0
-    canBuyCnt += PlayerGoldInvest.GetAddBossBuyCnt(curPlayer, killBossMark)
     hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, 0)
     playerID = curPlayer.GetPlayerID()
     if hasBuyCnt >= canBuyCnt:
@@ -4153,8 +4073,6 @@
         return
     # 增加购买次数
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, hasBuyCnt + 1)
-    
-    CrossPlayerData.SendMergePlayerDataNow(curPlayer)
     return
 
 #// A2 23 NPC秀结束 #tagCMNPCShowEnd

--
Gitblit v1.8.0