From 094b99fdbd566444b3e029bae944e0263e23a458 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 07 三月 2019 17:09:01 +0800
Subject: [PATCH] 6307 【后端】【2.0】多套装备开发单(镶嵌)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py |   66 ++++++++++++++++++++++++++++-----
 1 files changed, 56 insertions(+), 10 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 8a0fa4a..074f0ec 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -539,11 +539,11 @@
     SyncPKModel(curPlayer)
         
     #通用强化星级信息
-    ChEquip.NotifyEquipPartStarLV(curPlayer)
+    ChEquip.NotifyEquipPartPlusLV(curPlayer)
+    ChEquip.NotifyEquipPartStar(curPlayer)
     Operate_EquipWash.OnEquipWashLogin(curPlayer)
     #通知套装信息
-    ChEquip.NotifyEquipPartSuiteLV(curPlayer)
-    ChEquip.SyncAllEquipAttrActiveInfo(curPlayer)
+    #ChEquip.SyncAllEquipAttrActiveInfo(curPlayer)
     #装备位宝石镶嵌通知
     Operate_EquipStone.OnLogin(curPlayer)
     
@@ -831,13 +831,15 @@
     # 重置首充双倍
     PlayerCoin.DoResetCTGCount(curPlayer, "MixServer")
     
-    # 重置商店购买次数
-    FunctionNPCCommon.ResetShopItemBuyCount(curPlayer)
+    # 重置商店购买次数,暂定只重置类型 7 的
+    FunctionNPCCommon.ResetShopItemBuyCount(curPlayer, [7])
     
     # 合服邮件,盟主专属邮件在GameServer处理
     mailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 1)
     worldLVMailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 2)
     mailMoneyList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 3)
+    worldLVDown = IpyGameDataPY.GetFuncCfg("MixServerMail", 5) # 等级丹相对合服世界等级差值
+    itemWorldLV = max(150, mixServerWorldLV - worldLVDown)
     goldPaper, silver = mailMoneyList
     worldLVItemList = []
     for itemID, itemCount, isBind in worldLVMailItemList:
@@ -851,14 +853,14 @@
         lvLimit = curEff.GetEffectValue(1)
         if not lvLimit:
             continue
-        if lvLimit <= mixServerWorldLV:
+        if lvLimit <= itemWorldLV:
             worldLVItemList = [[itemID, itemCount, isBind]]
         else:
             break
-    detailDict = {"MixServerWorldLV":mixServerWorldLV, "LastMixServerDay":lastMixServerDay}
+    detailDict = {"MixServerWorldLV":mixServerWorldLV, "LastMixServerDay":lastMixServerDay, "ItemWorldLV":itemWorldLV}
     addItemList = mailItemList + worldLVItemList
     PlayerControl.SendMailByKey("MixServer1", [playerID], addItemList, goldPaper=goldPaper, silver=silver, detail=detailDict)
-    GameWorld.Log("    发送合服补偿邮件: addItemList=%s" % (addItemList), playerID)
+    GameWorld.Log("    发送合服补偿邮件: itemWorldLV=%s,addItemList=%s" % (itemWorldLV, addItemList), playerID)
     
     # 同步排行榜
     PlayerBillboard.UpdatePlayerBillboardOnLeaveServer(curPlayer, isAll=True)
@@ -1352,7 +1354,7 @@
 
     #设置装备实际个数
     curPack = itemManager.GetPack(IPY_GameWorld.rptEquip)
-    curPack.SetCount(ShareDefine.retMax)
+    curPack.SetCount(ChConfig.Def_PackCnt_Equip)
     
     #初始化垃圾桶
     #curPack = itemManager.GetPack(IPY_GameWorld.rptRecycle)
@@ -1823,6 +1825,42 @@
     return
 
 #===============================================================================
+# //B4 14 根据类型来决定移动的方式 #tagMCMoveByType
+# 
+# struct    tagMCMoveByType
+# {
+#    tagHead        Head;
+#    DWORD        ID;    //玩家ID
+#    WORD        PosX;    // 目标X
+#    WORD        PosY;    // 目标Y
+#    BYTE        MoveType;    //移动方式
+# };
+#===============================================================================
+def OnMoveByType(index, clientData, tick):
+    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    
+    #玩家移动通用检查
+    if not __CheckPlayerCanMove(curPlayer):
+        return
+    
+    #先验证目标点是否合法
+    if not GameWorld.GetMap().CanMove(clientData.PosX, clientData.PosY):
+        return
+    
+    curPlayer.StopMove()
+    curPlayer.ChangePos(clientData.PosX, clientData.PosY)
+    sendPack = ChPyNetSendPack.tagMCMoveByType()
+    sendPack.Clear()
+    sendPack.ID = curPlayer.GetID()
+    sendPack.ObjType = curPlayer.GetGameObjType()
+    sendPack.PosX = clientData.PosX
+    sendPack.PosY = clientData.PosY
+    sendPack.MoveType = clientData.MoveType
+    
+    PlayerControl.PyNotifyAll(curPlayer, sendPack, False, -1)
+    return
+
+#===============================================================================
 # //B4 04 战前冲锋 #tagCMRush
 # 
 # struct    tagCMRush
@@ -1854,6 +1892,14 @@
     
     #超出视野
     if GameWorld.GetDist(curPlayer.GetPosX(), curPlayer.GetPosY(), clientData.PosX, clientData.PosY) > curPlayer.GetSight():
+        return
+    
+    #玩家移动通用检查
+    if not __CheckPlayerCanMove(curPlayer):
+        return
+    
+    #先验证目标点是否合法
+    if not GameWorld.GetMap().CanMove(clientData.PosX, clientData.PosY):
         return
     
     curPlayer.StopMove()
@@ -5797,7 +5843,7 @@
         PlayerControl.SendMailByKey('SubpackageDownload', [curPlayer.GetID()], awardItemList)
     else:
         for itemID, itemCnt, isBind in awardItemList:
-            ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
+            ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
     SyncPackDownloadAward(curPlayer)
     return
 

--
Gitblit v1.8.0