From 8616eb28d77bbc52933d23935708c36def607380 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 28 三月 2019 17:41:09 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(转生系统)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py | 12
/dev/null | 470 -----------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 162 ----------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 18 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 104 ------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py | 21 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 1
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 104 ------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 10
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 39 --
10 files changed, 7 insertions(+), 934 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 7a27e3e..270a833 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -9173,62 +9173,6 @@
#------------------------------------------------------
-# A5 46 兑换灵力 #tagCMExchangeReiki
-
-class tagCMExchangeReiki(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ExType", c_ubyte), #兑换类型0-降级兑换; 1-钻石购买
- ("ExData", c_ubyte), #兑换扩展数据(钻石购买可发送购买的消耗索引)
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x46
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xA5
- self.SubCmd = 0x46
- self.ExType = 0
- self.ExData = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMExchangeReiki)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 46 兑换灵力 //tagCMExchangeReiki:
- Cmd:%s,
- SubCmd:%s,
- ExType:%d,
- ExData:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ExType,
- self.ExData
- )
- return DumpString
-
-
-m_NAtagCMExchangeReiki=tagCMExchangeReiki()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExchangeReiki.Cmd,m_NAtagCMExchangeReiki.SubCmd))] = m_NAtagCMExchangeReiki
-
-
-#------------------------------------------------------
# A5 1C 聚魂合成 #tagCMGatherSoulCompound
class tagCMGatherSoulCompound(Structure):
@@ -10498,54 +10442,6 @@
m_NAtagCMRefreshTreasureFreeCnt=tagCMRefreshTreasureFreeCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshTreasureFreeCnt.Cmd,m_NAtagCMRefreshTreasureFreeCnt.SubCmd))] = m_NAtagCMRefreshTreasureFreeCnt
-
-
-#------------------------------------------------------
-# A5 47 玩家转生 #tagCMReincarnation
-
-class tagCMReincarnation(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x47
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xA5
- self.SubCmd = 0x47
- return
-
- def GetLength(self):
- return sizeof(tagCMReincarnation)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 47 玩家转生 //tagCMReincarnation:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMReincarnation=tagCMReincarnation()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMReincarnation.Cmd,m_NAtagCMReincarnation.SubCmd))] = m_NAtagCMReincarnation
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 6338378..34083f1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -700,24 +700,6 @@
PacketSubCMD_1=0x42
PacketCallFunc_1=OnGetSuccessAward
-
-;转生
-[PlayerReincarnation]
-ScriptName = Player\PlayerReincarnation.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 2
-
-PacketCMD_1=0xA5
-PacketSubCMD_1=0x46
-PacketCallFunc_1=OnExchangeReiki
-
-PacketCMD_2=0xA5
-PacketSubCMD_2=0x47
-PacketCallFunc_2=OnReincarnation
-
-
;大师天赋
[PlayerGreatMaster]
ScriptName = Player\PlayerGreatMaster.py
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 512d6d0..2e57bf2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3180,7 +3180,6 @@
Def_PlayerKey_StoneAtkPer = "StoneAtkPer" # 宝石攻击百分比
Def_PlayerKey_HPCureEnhance = "HPCureEnhance" # 血瓶恢复效果
Def_PlayerKey_HadInitFruitAttr = "HadInitFruitAttr" # 是否已经刷新过果实属性
-Def_PlayerKey_LastReinTick = 'LastReinTick' #上次转生时间
Def_PlayerKey_OnlyFinalHurt = "OnlyFinalHurt" # 额外输出伤害
Def_PlayerKey_PVPAtkBackHP = "PVPAtkBackHP" # PVP攻击回血
Def_PlayerKey_HitSucessRate = "HitSucessRate" # 命中成功率
@@ -3236,34 +3235,21 @@
#玩家存数据库字典类型定义
(
Def_PDictType_Default, # 默认
-Def_PDictType_OnlinePrize, # 在线奖励(暂停使用),领取后重新计时型
-Def_PDictType_FBWipeOut, # fb扫荡
Def_PDictType_FlashSale, #限时抢购
Def_PDictType_TJGNotify, # 脱机挂结果通知
-Def_PDictType_LVAward, # 等级奖励领取信息记录5
-Def_PDictType_GoldGift, # 充值豪礼
+Def_PDictType_LVAward, # 等级奖励领取信息记录
Def_PDictType_OpenServerCampaign, # 开服活动
Def_PDictType_WeekParty, #周狂欢
Def_PDictType_FeastWeekParty, # 节日巡礼
Def_PDictType_LoginAward, # 登录奖励运营活动
-Def_PDictType_OfficialRank, # 官爵
Def_PDictType_Horse, # 坐骑
-Def_PDictType_Wing, # 翅膀
Def_PDictType_FB, # 副本相关
-Def_PDictType_FightPower, # 战斗力15
-Def_PDictType_16,
-Def_PDictType_Activity, # 活跃度
+Def_PDictType_FightPower, # 战斗力
Def_PDictType_GoldInvest, # 投资理财
-Def_PDictType_19,
-Def_PDictType_Success, #成就20
+Def_PDictType_Success, #成就
Def_PDictType_GFPassive, # 被动功法
-Def_PDictType_Totem, # 图腾
-Def_PDictType_GroupFRecharge, # 首充团购
-Def_PDictType_Element, # 元素
-Def_PDictType_Reincarnation, # 转生
Def_PDictType_GreatMaster, # 大师
-Def_PDictType_BloodElf, # 血魔
-) = range(28)
+) = range(15)
# 玩家字典key定义规则, key的长度不能超过29个字节, 注意尽量避免命名重复
# 新增参数TYPE 用于字典分类,默认0
@@ -3703,11 +3689,6 @@
Def_PDict_LuckyTreasurePoint = "LuckyTreasurePoint" #幸运值
Def_PDict_LuckyTreasureCnt = "LuckyTreasureCnt" #鉴宝次数
#-------------------------------------------------------------------------------
-#类型 Def_PDictType_OnlinePrize
-Def_PDict1_OnlinePrizeCnt = "OnlinePrizeCnt" # 新手在线已领取奖励次数
-Def_PDict1_OnlinePrizeTime = "OnlinePrizeTime" # 新手在线奖励时间总和
-Def_PDict1_DayOnlinePrizeCnt = "DayOnlinePrizeCnt" # 今日在线已领取奖励次数
-Def_PDict1_DayOnlinePrizeTime = "DayOnlinePrizeTime" # 今日在线奖励时间总和
#开服活动,Def_PDictType_OpenServerCampaign
#奖励记录 - 从低位到高位,每位表示:0-不可领;1-可领取;2-已领
@@ -3740,7 +3721,7 @@
Def_PDict_FightPower_List = [Def_PDict_FightPower_Total, Def_PDict_FightPower_Horse]
-# 每日活跃度 Def_PDictType_Activity
+# 每日活跃度
Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s" # 活跃度类型对应完成次数
Def_PDict_Activity_TotalPoint = "Activity_TotalPoint" # 当前总活跃值
Def_PDict_ActivityAwardRecord = "ActivityAwardRecord" # 活跃度奖励领取记录,按二进制位标识
@@ -3766,12 +3747,6 @@
Def_PDict_Success_CntValue = "Su_%s_%s" # 当前次数值,参数(成就类型、条件)
Def_PDict_Success_FinishTime = "Succ_FinishTime_%s" # 成就是否已完成,参数(索引)
Def_PDict_Success_CheckVersion = "Succ_CheckVersion" #老玩家某些功能成就检查版本
-
-# 转生 Def_PDictType_Reincarnation
-Def_PDict_Reinc_Reiki = "Reinc_Reiki" # 当前转生灵力
-Def_PDict_Reinc_ChangeReikiCnt = "Reinc_ChangeReikiCnt" # 今日已兑换灵力次数
-Def_PDict_Reinc_ChangeReikiAddCnt = "Reinc_ChangeReikiAddCnt" # 今日物品增加的兑换灵力次数
-Def_PDict_Reinc_AwardRecord = "Reinc_AwardRecord" # 转生奖励领取记录
# 大师 Def_PDictType_GreatMaster
Def_PDict_Master_Exp = "Master_Exp" # 当前大师经验
@@ -4562,14 +4537,13 @@
Def_Cost_FinishTruck, # 完成镖车
Def_Cost_RefreshTimeShop, # 刷新神秘商店
Def_Cost_OpenNoble, # 开通贵族
-Def_Cost_Reincarnation, # 转生
Def_Cost_BuyStallItem, # 购买摆摊物品
Def_Cost_Warehouse, # 仓库
Def_Cost_BuyItemBack, # 回购
Def_Cost_Trade, # 交易
Def_Cost_Rename, # 改名
Def_Cost_SkillLvUp, # 技能升级
-) = range(2000, 2000 + 58)
+) = range(2000, 2000 + 57)
Def_Cost_Reason_SonKey = "reason_name_son" # 消费点原因子类说明key
@@ -4629,7 +4603,6 @@
Def_Cost_Transport:"Transport",
Def_Cost_OffLineExp:"OffLineExp",
Def_Cost_GameServer:"GameServer",
-Def_Cost_Reincarnation:"Reincarnation",
Def_Cost_BuyStallItem:"BuyStallItem",
Def_Cost_Trade:"Trade",
Def_Cost_Rename:"Rename",
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 7a27e3e..270a833 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -9173,62 +9173,6 @@
#------------------------------------------------------
-# A5 46 兑换灵力 #tagCMExchangeReiki
-
-class tagCMExchangeReiki(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ExType", c_ubyte), #兑换类型0-降级兑换; 1-钻石购买
- ("ExData", c_ubyte), #兑换扩展数据(钻石购买可发送购买的消耗索引)
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x46
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xA5
- self.SubCmd = 0x46
- self.ExType = 0
- self.ExData = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMExchangeReiki)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 46 兑换灵力 //tagCMExchangeReiki:
- Cmd:%s,
- SubCmd:%s,
- ExType:%d,
- ExData:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ExType,
- self.ExData
- )
- return DumpString
-
-
-m_NAtagCMExchangeReiki=tagCMExchangeReiki()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExchangeReiki.Cmd,m_NAtagCMExchangeReiki.SubCmd))] = m_NAtagCMExchangeReiki
-
-
-#------------------------------------------------------
# A5 1C 聚魂合成 #tagCMGatherSoulCompound
class tagCMGatherSoulCompound(Structure):
@@ -10498,54 +10442,6 @@
m_NAtagCMRefreshTreasureFreeCnt=tagCMRefreshTreasureFreeCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshTreasureFreeCnt.Cmd,m_NAtagCMRefreshTreasureFreeCnt.SubCmd))] = m_NAtagCMRefreshTreasureFreeCnt
-
-
-#------------------------------------------------------
-# A5 47 玩家转生 #tagCMReincarnation
-
-class tagCMReincarnation(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x47
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xA5
- self.SubCmd = 0x47
- return
-
- def GetLength(self):
- return sizeof(tagCMReincarnation)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 47 玩家转生 //tagCMReincarnation:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMReincarnation=tagCMReincarnation()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMReincarnation.Cmd,m_NAtagCMReincarnation.SubCmd))] = m_NAtagCMReincarnation
#------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index 5c73c8d..770f6ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -90,7 +90,6 @@
# @change: "2014-12-01 19:10" ljd 增加领取合服活动登陆奖励事件记录
# @change: "2014-12-21 23:00" hxp 增加功能奖励物品
# @change: "2014-12-23 00:30" hxp 充值前/消费时流向信息扩展(增加各大功能信息)
-# @change: "2015-01-27 22:30" hxp 增加转生等级变更流向
# @change: "2015-02-05 15:00" hxp 充值送礼流向扩展信息字典
# @change: "2015-02-27 21:00" hxp 增加大师等级升级流向; 重新开启技能学习流向
# @change: "2015-03-30 14:00" hxp 增加击杀NPC流向
@@ -464,26 +463,6 @@
#发送封包
SendEventPack("PlayerUpgrade", dataDict, curPlayer)
- return
-
-## 玩家转生等级变更
-# @param curPlayer: 玩家实例
-# @param reincarnationLvBefore: 之前转生次数
-# @param playerLVExBefore: 之前转生等级
-# @param eventName:
-# @return: None
-def DR_PlayerLVExChange(curPlayer, reincarnationLvBefore, playerLVExBefore, eventName, addDataDict={}):
-
- dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(),
- 'AccID':curPlayer.GetAccID(), 'ReincarnationLv':curPlayer.GetReincarnationLv(),
- 'PlayerLV':curPlayer.GetLV(), 'PlayerLVEx':curPlayer.GetLVEx(),
- 'TotalExp':curPlayer.GetTotalExp(), 'ReincarnationLvBefore':reincarnationLvBefore,
- 'PlayerLVExBefore':playerLVExBefore, "EventName":eventName}
-
- dataDict.update(addDataDict)
-
- #发送封包
- SendEventPack("PlayerLVExChange", dataDict, curPlayer)
return
## 玩家大师等级变更
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Func_16000.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Func_16000.py
deleted file mode 100644
index 0b81bf8..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Func_16000.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-##@package Func_16000
-#转生 逻辑处理
-#
-# @author xdh
-# @date 2016-05-25
-# @version 1.0
-#
-#---------------------------------------------------------------------
-"""Version = 2016-05-25 12:00"""
-#---------------------------------------------------------------------
-
-#---------------------------------------------------------------------
-import PlayerReincarnation
-import EventShell
-#---------------------------------------------------------------------
-## 开始转生
-# @param curPlayer 玩家实例
-# @param tick 时间戳
-# @return 返回值无意义
-# @remarks
-def StartPlayerReincarnation(curPlayer, tick):
- PlayerReincarnation.DoPlayerReincarnation(curPlayer)
- EventShell.DoExitEvent(curPlayer)
- return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 96a3f80..d820532 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -37,7 +37,6 @@
import QuestCommon
import SkillShell
import GameLogInfo
-import PlayerReincarnation
import PlayerMissionCollect
import PlayerFamily
import ShareDefine
@@ -4327,61 +4326,8 @@
curPlayer.SetFreePoint(curPlayerFreePoint + value)
DataRecordPack.DR_Freepoint(curPlayer, "Event", value, {"MissionID":curMission.GetMissionID()})
-
+ return
-#---------------------------------------------------------------------
-#===============================================================================
-# PlayerJob_Warrior, # 剑士,
-# PlayerJob_Wizard, # 魔法师,
-# PlayerJob_Assassin, # 弓箭手,
-# PlayerJob_Chaplain, # 魔剑士,
-# PlayerJob_Knight, # 骑士
-# PlayerJob_ForceUser,# 魔导师
-# PlayerJob_BowMaster,# 圣射手
-#===============================================================================
-##玩家转职业
-# @param curPlayer 玩家实例
-# @param curMission 任务实例
-# @param curActionNode节点信息
-# @return 返回值无意义 <Change_Job checkLV="150" changeJob="4">
-def DoType_Change_Job(curPlayer, curMission, curActionNode):
- playerID = curPlayer.GetID()
-
- checkLV = GameWorld.ToIntDef(curActionNode.GetAttribute("checkLV"), 0)
- if not checkLV:
- GameWorld.Log("change job error! checkLV=%s" % checkLV, playerID)
- return
-
- curLV = curPlayer.GetLV()
- if curLV < checkLV:
- GameWorld.Log("change job error! checkLV=%s curlv=%s" % (checkLV, curLV), playerID)
- return
-
- changeJob = GameWorld.ToIntDef(curActionNode.GetAttribute("changeJob"), 0)
- #验证职业
- if not changeJob:
- GameWorld.Log("change job error! changeJob=%s" % changeJob, playerID)
- return
-
- #curJob = curPlayer.GetJob()
-
- #计算点数, 恢复等级差的点数
- #addPointDict = ReadChConfig.GetEvalChConfig('lvUp_Point')
-
- #addPoint = (curLV - checkLV)*(addPointDict.get(changeJob) - addPointDict.get(curJob))
-
- #设置玩家可加属性点
- #curPlayer.SetFreePoint(curPlayer.GetFreePoint() + addPoint)
- #DataRecordPack.DR_Freepoint(curPlayer, "ChangeJob", addPoint, {"job":changeJob})
-
- #设置职业
- curPlayer.SetJob(changeJob)
-
- playerControl = PlayerControl.PlayerControl(curPlayer)
- playerControl.RefreshAllState()
-
- PlayerReincarnation.DoPlayerReincarnation(curPlayer)
- return True
#---------------------------------------------------------------------
##删除物品
@@ -5255,66 +5201,6 @@
for lvInfo in runAroundReward.Rewards:
if curRewardLV >= lvInfo[0] and curRewardLV <= lvInfo[1]:
return runAroundReward.Rewards[lvInfo]
-
- return
-
-
-##转生后跑环奖励处理
-# @param curPlayer 玩家实例
-# @param curMission 任务实例
-# @return 返回值无意义
-# @remarks 转生后跑环奖励处理
-def __ReinAddRunAroundReward(curPlayer, curMission):
- runAroundReward = FindQuestFunc(curMission.GetMissionID()).RunAroundReward
-
- lvReward = GetRunAroundReward(curPlayer, runAroundReward, rewardLV=0, isMaxLV=True)
- if not lvReward:
- GameWorld.Log("转生跑环奖励错误 id = %d" % curMission.GetMissionID() , curPlayer.GetPlayerID())
- return
-
- #金钱奖励最大等级
- if lvReward.Money != 0:
- curMission.SetProperty(Def_Run_Around_Reward_Money, lvReward.Money)
-
-#---------------------------------------------------------------------
-##转生后每日任务新增奖励
-# @param curPlayer 玩家实例
-# @param curMission 任务实例
-# @param curActionNode节点信息
-# @return 返回值无意义
-# @remarks <Reincarnation_Add_Reward />
-def DoType_Reincarnation_Add_Reward(curPlayer, curMission, curActionNode):
- #没转生不处理
- curReinLV = curPlayer.GetReincarnationLv()
- if curReinLV < 1:
- return
-
- dayEventReward = FindQuestFunc(curMission.GetMissionID()).DayEventReward
-
- if dayEventReward == None:
- GameWorld.Log("转生奖励错误 id = %d" % curMission.GetMissionID() , curPlayer.GetPlayerID())
- return
-
- curRewardLV = dayEventReward.MaxLV
- familyLV = curPlayer.GetFamilyLV()
-
- #当前等级任务奖励结构体
- curLVDayEventReward = dayEventReward.Rewards[curRewardLV]
-
- #金钱奖励最大等级
- if curLVDayEventReward.Money != 0:
- curMission.SetProperty(Def_Day_Event_Reward_Money, curLVDayEventReward.Money)
-
- #家族活跃最大等级
- if curLVDayEventReward.PlayerFamilyActiveValue != 0:
- curMission.SetProperty(Def_Day_Event_Reward_Player_Family_ActiveValue, (curLVDayEventReward.PlayerFamilyActiveValue) * familyLV)
-
- #镖车压金最大等级
- if curLVDayEventReward.TruckMoney != 0:
- curMission.SetProperty(Def_Day_Event_Reward_Truck_Money, curLVDayEventReward.TruckMoney)
-
- #转生后跑环奖励处理
- __ReinAddRunAroundReward(curPlayer, curMission)
return
@@ -6627,52 +6513,6 @@
__NPCAllowResetWorldPos(curPlayer, mapID, bornX, bornY, False)
return
-
-
-
-#---------------------------------------------------------------------
-##执行玩家转生
-# @param curPlayer 玩家实例
-# @param curMission 任务实例
-# @param curActionNode节点信息
-# @return 返回值无意义
-# @remarks <Player_Reincarnation />
-def DoType_Player_Reincarnation(curPlayer, curMission, curActionNode):
- PlayerReincarnation.DoPlayerReincarnation(curPlayer)
- return
-
-#---------------------------------------------------------------------
-##判断玩家是否转生
-# @param curPlayer 玩家实例
-# @param curMission 任务实例
-# @param curConditionNode节点信息
-# @return 返回值, 是否通过检查
-# @remarks <Player_Is_Reincarnation result="期望的结果" />
-def ConditionType_Player_Is_Reincarnation(curPlayer, curMission, curConditionNode):
- #<Player_Is_Reincarnation result=""> 0:没转,1:有转
- result = GameWorld.ToIntDef(curConditionNode.GetAttribute("result"), 0)
- #转生等级
- curReinLV = curPlayer.GetReincarnationLv()
- if curReinLV > 0:
- return True == result
- else:
- return False == result
-
- return
-
-##判断玩家转生数
-# @param curPlayer 玩家实例
-# @param curMission 任务实例
-# @param curConditionNode节点信息
-# @return 返回值, 是否通过检查
-# @remarks <Player_Reincarnation result="期望的结果" />
-def ConditionType_Player_Reincarnation(curPlayer, curMission, curConditionNode):
- #<Player_Reincarnation result="1"> # 玩家是否1转
- result = GameWorld.ToIntDef(curConditionNode.GetAttribute("result"), 0)
- #转生等级
- curReinLV = curPlayer.GetReincarnationLv()
- return curReinLV == result
-
#---------------------------------------------------------------------
##给予玩家技能
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
index 1cbf72d..c924849 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
@@ -269,18 +269,6 @@
return
#---------------------------------------------------------------------
-##获取玩家等级
-# @param curPlayer 玩家实例
-# @return 返回值, 玩家等级, 转生按161算
-# @remarks 获取玩家等级
-def __GetReincarnationLV(curPlayer):
- curReinLV = curPlayer.GetReincarnationLv()
- if curReinLV > 0:
- return 161
-
- return curPlayer.GetLV()
-
-#---------------------------------------------------------------------
##每周工资在线时间替换
# @param curPlayer 玩家实例
# @param curMission 任务实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Reborn.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Reborn.py
deleted file mode 100644
index 2dff04d..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Reborn.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-
-##@package Reborn
-# 转生:每用一次转生等级+1,客户端转生等级超过1级,会一直弹框。
-# 如果GM转生等级超过1级 强制取消转生等级
-#
-# @author hch
-# @date 2010-4-23
-# @version 1.0
-#
-# 修改时间 修改人 修改内容
-# VER = "2010-05-12 18:30" zhengyang 添加注释
-#
-# 模块详细说明
-#导入
-import PlayerReincarnation
-import GameWorld
-#---------------------------------------------------------------------
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param playerList 参数列表 []
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer,playerList):
- if curPlayer.GetReincarnationLv() >= 1:
- curPlayer.SetReincarnationLv(0)
- GameWorld.DebugAnswer(curPlayer, "警告:转生等级不得超过1级,强制取消你的转生等级")
- return
- PlayerReincarnation.DoPlayerReincarnation(curPlayer)
\ No newline at end of file
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 ccd93c5..be5d513 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -493,7 +493,6 @@
#PlayerExam.DoLogic_ExitExam(curPlayer, tick, needRefresh = False)
#清除VIPbuff
#BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_VIPExp_SkillTypeID, tick)
- #PlayerReincarnation.ReincarOnLogin(curPlayer)
#通知玩家的buff
__Sync_ClientBuff(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index ddc9484..dcdb8fb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3667,15 +3667,6 @@
return True
#---------------------------------------------------------------------
- ## 获取下一次转生所需等级
- def GetNextReincarnationLV(self, curPlayer):
- Reincarnation_ConditionDict = ReadChConfig.GetEvalChConfig("Reincarnation_Condition")
- curReinCnt = curPlayer.GetReincarnationLv() # 当前转生次数
- nextReinCnt = curReinCnt + 1
- nextReinLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV")
- if nextReinCnt in Reincarnation_ConditionDict:
- nextReinLV = Reincarnation_ConditionDict[nextReinCnt][0]
- return nextReinLV
## 加经验值
# @param self 类实例
@@ -3706,7 +3697,6 @@
if addExp == 0:
# 不进入计算
return addExp, expViewType
- #nextReinLV = self.GetNextReincarnationLV(curPlayer)
#取得人物当前经验
#curTotalExp = GetPlayerTotalExp(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py
deleted file mode 100644
index 28f4e49..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerReincarnation.py
+++ /dev/null
@@ -1,470 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-##@package PlayerReincarnation
-# 玩家转生逻辑
-#
-# @author hch
-# @date 2010-4-28
-# @version 2.9
-#
-# @change: "2010-10-08 15:00" panwei 拔除服务器版本控制代码
-# @change: "2013-04-11 18:00" wdb 翅膀使用等级与强化等级相关
-# @change: "2013-04-15 11:00" wdb 将ComparePlayerLV_UseItem更名为CheckItemUseLV,放入ItemControler
-# @change: "2015-01-28 19:30" hxp 转生修改
-# @change: "2015-01-29 01:00" hxp 转生同步所有排行榜(更新职业信息)
-# @change: "2015-01-29 11:00" hxp 增加转职广播;兑换灵力提醒
-# @change: "2015-01-30 03:30" hxp 老号满级设置当前经验为0; 满级掉级主动触发一次升阶检测
-# @change: "2015-02-04 18:00" hxp 降级刷新世界等级加成
-# @change: "2015-02-26 12:00" hxp 三转开启大师
-# @change: "2015-04-15 21:00" hxp 一转开启姿态
-# @change: "2015-05-11 14:00" hxp 兑换灵力失败增加流向
-# @change: "2015-07-29 15:20" xdh 大师改成等级开启
-# @change: "2015-08-04 15:00" ljd 二转禁开梅兰
-# @change: "2015-08-24 14:40" zqx 增加转生成就
-# @change: "2015-12-10 12:00" hxp 转生逻辑修改(永恒领主)
-# @change: "2016-05-26 16:20" xdh 增加转生最大开放等级配置
-# @change: "2017-01-13 14:00" xdh 增加转生奖励领取
-# @change: "2017-03-26 17:30" hxp 转生赠送等级开出配置
-#---------------------------------------------------------------------
-#"""Version = 2017-03-26 17:30"""
-#---------------------------------------------------------------------
-import ReadChConfig
-import ChConfig
-import PlayerControl
-import GameWorld
-import IPY_GameWorld
-import PlayerBillboard
-import DataRecordPack
-import ChPyNetSendPack
-import NetPackCommon
-import ShareDefine
-import ItemCommon
-import PlayerWorldAverageLv
-import PlayerSuccess
-import ItemControler
-import ChPlayer
-#---------------------------------------------------------------------
-
-(
-Def_ExReiki_DayFreeCnt, # 每日免费次数
-Def_ExReiki_CostMoney, # 消耗金币数
-Def_ExReiki_SuccRate, # 兑换成功率
-Def_ExReiki_Format, # 获得灵力公式
-) = range(4)
-
-
-## 转生OnDay
-# @param curPlayer:
-# @return: None
-def ReincarOnDay(curPlayer):
- return
-
-## 转生OnLogin
-# @param curPlayer:
-# @return: None
-def ReincarOnLogin(curPlayer):
- SyncReincarnationAwardRecord(curPlayer)
- return
-
-## 获取玩家转生相关字典值
-# @param curPlayer:
-# @return: None
-def __GetPlayerReincDictValue(curPlayer, key, defaultValue=0):
- return curPlayer.NomalDictGetProperty(key, defaultValue, ChConfig.Def_PDictType_Reincarnation)
-
-
-## 设置玩家转生相关字典值
-# @param curPlayer:
-# @return: None
-def __SetPlayerReincDictValue(curPlayer, key, value):
- PlayerControl.NomalDictSetProperty(curPlayer, key, value, ChConfig.Def_PDictType_Reincarnation)
- return
-
-## 计算转职附加属性
-# @param curPlayer 玩家
-# @param allAttrList 属性列表
-# @return None
-def CalcReincarnationAttr(curPlayer, allAttrList):
- curReinCnt = curPlayer.GetReincarnationLv() # 当前转生次数
-
- if curReinCnt <= 0:
- return
-
- Reincarnation_AttrDict = ReadChConfig.GetEvalChConfig("Reincarnation_Attr")
-
- attrNameList = [ChConfig.AttrName_BothAtk, # 双攻
- ChConfig.AttrName_Def, # 防御
- ChConfig.AttrName_Hit, # 命中
- ChConfig.AttrName_DefRate, # 闪避
- ChConfig.AttrName_MaxHP, # 最大血量
- ]
-
- for reinCnt, attrList in Reincarnation_AttrDict.items():
-
- if reinCnt > curReinCnt:
- continue
-
- # 计算自身属性
- for index, value in enumerate(attrList):
- attrName = attrNameList[index]
- PlayerControl.CalcAttrDict_Type(attrName, value, allAttrList)
-
- return
-
-
-## 转生逻辑入口
-# @param curPlayer 当前玩家
-# @return None
-# @remarks 函数详细说明.
-def DoPlayerReincarnation(curPlayer):
- curReinCnt = curPlayer.GetReincarnationLv() # 当前转生次数
- Reincarnation_Condition = ReadChConfig.GetEvalChConfig("Reincarnation_Condition")
- nextReinCnt = curReinCnt + 1
- playerID = curPlayer.GetPlayerID()
-
- GameWorld.Log("玩家转生:已转次数(%s)" % (curReinCnt), playerID)
- ReincarnationMaxLV = ReadChConfig.GetEvalChConfig("ReincarnationMaxLV")
- if nextReinCnt > ReincarnationMaxLV: #大于开放转生等级
- PlayerControl.NotifyCode(curPlayer, 'GeRen_liubo_32161')
- return
-
- if nextReinCnt not in Reincarnation_Condition:
- GameWorld.ErrLog("不存在该转生次数对应条件信息!次数=%s" % (nextReinCnt), playerID)
- return
-
- needLV, nMoney, nZhenQi, nDHPassCnt, nChasmPassCnt, nItemList, prizeLVCnt = Reincarnation_Condition[nextReinCnt]
- curLV = curPlayer.GetLV()
- if not __DoProcessReinCondition(curPlayer, needLV, nMoney, nZhenQi, nDHPassCnt, nChasmPassCnt, nItemList, nextReinCnt):
- return
-
- # 如果转生的时候刚好是转生所需等级,则默认送一级经验
- giveExp = 0
- if curLV == needLV:
- for i in range(prizeLVCnt):
- prizeLV = curLV + i
- prizeLVUPExp = PlayerControl.GetTotalExpByPlayerLv(prizeLV)
- giveExp += prizeLVUPExp
- GameWorld.Log(" 转生赠送等级, prizeLV=%s,prizeLVUPExp=%s,giveExp=%s" % (prizeLV, prizeLVUPExp, giveExp), playerID)
- GameWorld.Log(" 转生累计赠送总经验, prizeLVCnt=%s,giveExp=%s" % (prizeLVCnt, giveExp), playerID)
-
- curPlayer.SetReincarnationLv(nextReinCnt)
- #升级前记录转生时间
- tick = GameWorld.GetGameWorld().GetTick()
- curPlayer.SetDict(ChConfig.Def_PlayerKey_LastReinTick, tick)
-
- playerControl = PlayerControl.PlayerControl(curPlayer)
- playerControl.PlayerLvUp()
- playerControl.AddExp(giveExp)
-
- DataRecordPack.DR_PlayerLVExChange(curPlayer, curReinCnt, curLV, "Reincarnation")
-
- #转职成功的话更新所有排行榜,职业显示信息需要变更
- PlayerBillboard.UpdatePlayerBillboardOnLeaveServer(curPlayer)
-
- #转职成功广播
- PlayerControl.WorldNotify(0, "GeRen_hgg_543685", [curPlayer.GetPlayerName(), nextReinCnt])
-
-
- return
-
-def __DoProcessReinCondition(curPlayer, needLV, nMoney, nZhenQi, nDHPassCnt, nChasmPassCnt, nItemList, nextReinCnt):
- playerID = curPlayer.GetPlayerID()
- curLV = curPlayer.GetLV()
- GameWorld.Log("处理转生条件 curLV=%s,needLV=%s,nMoney=%s,nZhenQi=%s,nDHPassCnt=%s,nItemList=%s"
- % (curLV, needLV, nMoney, nZhenQi, nDHPassCnt, str(nItemList)), playerID)
-
- if curLV < needLV:
- PlayerControl.NotifyCode(curPlayer, 'GeRen_mx_327925')
- GameWorld.Log(" 等级不足,无法转生!needLV=%s,curLV=%s" % (needLV, curLV), playerID)
- return False
-
- if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, nMoney):
- GameWorld.Log(" 金币不足,无法转生!nMoney=%s" % (nMoney), playerID)
- return False
-
- if PlayerControl.GetZhenQi(curPlayer) < nZhenQi:
- PlayerControl.NotifyCode(curPlayer, 'GeRen_pan_367906')
- GameWorld.Log(" 真气不足,无法转生!nZhenQi=%s" % (nZhenQi), playerID)
- return False
-
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- allIndexList = []
- for itemID, needCnt in nItemList:
- enough, indexList, hasBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(itemID, itemPack, needCnt)
- if not enough:
- PlayerControl.NotifyCode(curPlayer, 'Horse_lhs_31379', [itemID])
- GameWorld.Log(" 所需转生物品不足,无法转生!itemID=%s,needCnt=%s" % (itemID, needCnt), playerID)
- return False
- allIndexList.append([indexList, needCnt])
-
- ## 条件判断通过,开始扣除
- # 扣金币
- infoDict = {ChConfig.Def_Cost_Reason_SonKey:nextReinCnt}
- if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, nMoney, ChConfig.Def_Cost_Reincarnation, infoDict):
- GameWorld.ErrLog("Reincarnation pay Err: silver-Money:%s)" % nMoney, playerID)
- return False
-
- # 扣真气
- PlayerControl.PlayerLostZhenQi(curPlayer, nZhenQi, "Reincarnation", {"ReinCount":nextReinCnt})
-
- # 扣物品
- for indexList, delCnt in allIndexList:
- ItemCommon.ReduceItem(curPlayer, itemPack, indexList, delCnt, False, "Reincarnation")
-
- return True
-
-
-## 领取转生奖励
-# @param curPlayer: 玩家实例
-# @param awardType: 领奖类型
-# @param tick: 时间戳
-# @return
-def GetReincarnationAward(curPlayer, dataEx):
- curReinCnt = curPlayer.GetReincarnationLv() # 当前转生次数
- if dataEx > curReinCnt:
- GameWorld.DebugLog('GetReincarnationAward 玩家转生等级%s, 不可领取%s转的奖励' % (curReinCnt, dataEx))
- return
-
- reincarnationAwardDict = ReadChConfig.GetEvalChConfig("Reincarnation_Award")
- if dataEx not in reincarnationAwardDict:
- GameWorld.DebugLog('Reincarnation_Award.txt 不存在该转生等级奖励 dataEx=%s' % dataEx)
- return
- reinLVList = reincarnationAwardDict.keys()
- reinLVList.sort()
- awardIndex = reinLVList.index(dataEx)
-
- awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Reinc_AwardRecord, 0)
- if awardRecord & pow(2, awardIndex):
- GameWorld.DebugLog("转生奖励已经领取过! 不能重复领取!", curPlayer.GetPlayerID())
- return
-
- prizeItemInfo = reincarnationAwardDict[dataEx]
- # 检查背包
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- if len(prizeItemInfo) > packSpace:
- PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
- return
-
- updRecord = awardRecord | pow(2, awardIndex)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Reinc_AwardRecord, updRecord)
-
- SyncReincarnationAwardRecord(curPlayer)
-
- # 给奖励
- for awardItem in prizeItemInfo:
- # 字典结构需要区分职业
- if isinstance(awardItem, dict):
- if curPlayer.GetJob() not in awardItem:
- GameWorld.ErrLog(" Reincarnation_Award.txt 职业(%s)未配置奖励!dataEx=%s" % (curPlayer.GetJob(), dataEx))
- continue
- awardItem = awardItem[curPlayer.GetJob()]
-
- if len(awardItem) != 4:
- GameWorld.ErrLog(" Reincarnation_Award.txt 奖励配置格式错误!len(%s) != 4, dataEx=%s" % (awardItem, dataEx))
- continue
- itemID, itemCount, isBind, isAppoint = awardItem
- if isAppoint:
- ItemControler.GivePlayerAppointItem(curPlayer, itemID, False)
- else:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
-
-
- GameWorld.Log('领取转生奖励成功,dataEx=%s' % dataEx)
- return
-
-## 同步转生奖励领奖记录
-# @param curPlayer: 玩家实例
-# @return
-def SyncReincarnationAwardRecord(curPlayer):
- record = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Reinc_AwardRecord, 0)
- #ChPlayer.Sync_RewardGetRecordInfo(curPlayer, ShareDefine.Def_RewardType_Reincarnation, record)
- return
-
-
-#// A5 46 兑换灵力 #tagCMExchangeReiki
-#
-#struct tagCMExchangeReiki
-#{
-# tagHead Head;
-# BYTE ExType; //兑换类型0-降级兑换; 1-钻石购买
-# BYTE ExData; //兑换扩展数据(钻石购买可发送购买的消耗索引)
-#};
-## 兑换灵力
-# @param index: 玩家索引
-# @param clientData: 封包结构体
-# @param tick: 时间戳
-# @return: None
-def OnExchangeReiki(index, clientData, tick):
- return
-# curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-#
-# ExType = clientData.ExType
-# ExData = clientData.ExData
-#
-# # 降级兑换
-# if ExType == 0:
-# __DoExchangeReikiByDownLVEx(curPlayer)
-# # 钻石购买
-# elif ExType == 1:
-# __DoExchangeReikiByGold(curPlayer, ExData)
-# return
-
-### 钻石兑换灵力
-## @param curPlayer: 玩家索引
-## @param index: 兑换索引
-## @return: None
-#def __DoExchangeReikiByGold(curPlayer, index):
-# playerID = curPlayer.GetPlayerID()
-# ExchangeReikiByGoldList = ReadChConfig.GetEvalChConfig("ExchangeReikiByGold")
-#
-# if index < 0 or index >= len(ExchangeReikiByGoldList):
-# GameWorld.ErrLog("钻石兑换转生灵力配置错误: 没有该索引信息! index=%s" % (index), playerID)
-# return
-#
-# needGold, addReiki = ExchangeReikiByGoldList[index]
-# if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold):
-# # 元宝不足时返回
-# GameWorld.DebugLog("钻石兑换灵力,钻石不足 needGold=%s" % needGold, playerID)
-# return
-#
-# # 支付元宝
-# if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold,
-# costType = ShareDefine.Def_GoldCostType_ExchangeReiki):
-# return
-#
-# curReiki = __GetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_Reiki)
-# updReiki = curReiki + addReiki
-# __SetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_Reiki, updReiki)
-# PlayerControl.NotifyCode(curPlayer, "GeRen_hgg_960792", [addReiki])
-# GameWorld.Log("钻石兑换转生灵力: index=%s,curReiki=%s,addReiki=%s,updReiki=%s"
-# % (index, curReiki, addReiki, updReiki), playerID)
-# Sync_PlayerReikiInfo(curPlayer)
-# return
-
-
-### 降级兑换灵力
-## @param curPlayer: 玩家索引
-## @return: None
-#def __DoExchangeReikiByDownLVEx(curPlayer):
-# curLVEx = curPlayer.GetLVEx()
-# curReincarLV = curPlayer.GetReincarnationLv()
-#
-# Reincarnation_Condition = ReadChConfig.GetEvalChConfig("Reincarnation_Condition")
-# nextReincarLV = curReincarLV + 1
-# playerID = curPlayer.GetPlayerID()
-#
-# # 如果有下一转,则最低不能降到转生所需等级
-# if nextReincarLV in Reincarnation_Condition:
-# needLV = Reincarnation_Condition[nextReincarLV][0]
-# if curLVEx <= needLV:
-# GameWorld.ErrLog("最低不能降到下次转生所需等级: curReincarLV=%s,curLVEx=%s,nextReincarLV=%s,needLV=%s"
-# % (curReincarLV, curLVEx, nextReincarLV, needLV), playerID)
-# return
-#
-# ExchangeReikiByLVExDict = ReadChConfig.GetEvalChConfig("ExchangeReikiByLVEx")
-#
-# if curReincarLV not in ExchangeReikiByLVExDict:
-# return
-#
-# ExchangeReikiByLVEx = ExchangeReikiByLVExDict[curReincarLV]
-#
-# dayFreeCnt = ExchangeReikiByLVEx[Def_ExReiki_DayFreeCnt]
-# costMoney = ExchangeReikiByLVEx[Def_ExReiki_CostMoney]
-# succRate = ExchangeReikiByLVEx[Def_ExReiki_SuccRate]
-# getReikiFormat = ExchangeReikiByLVEx[Def_ExReiki_Format]
-#
-# # 判断次数
-# exCnt = __GetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_ChangeReikiCnt)
-# addCnt = __GetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_ChangeReikiAddCnt)
-# maxCnt = dayFreeCnt + addCnt
-# if exCnt >= maxCnt:
-# GameWorld.Log("降级兑换灵力:兑换次数已满!exCnt=%s,dayFreeCnt=%s,addCnt=%s,maxCnt=%s"
-# % (exCnt, dayFreeCnt, addCnt, maxCnt), playerID)
-# return
-#
-# # 判断金币
-# if costMoney > 0 and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costMoney):
-# return
-#
-# maxExp = PlayerControl.GetTotalExpByPlayerLv(curLVEx)
-# isFull = False
-# # 满级的
-# if maxExp <= 0:
-# # 经验上限改为可超过20亿后,该部分逻辑暂时不处理,只做return, 之后用到该功能再优化
-# return
-# curExp = curPlayer.GetTotalExp()
-# curExp = min(curExp, ChConfig.Def_UpperLimit_DWord)
-# maxExp = ChConfig.Def_UpperLimit_DWord
-# isFull = True
-# else:
-# curExp = PlayerControl.GetPlayerTotalExp(curPlayer)
-#
-# curExpPer = curExp * 1.0 / maxExp
-#
-# updLVEx = curLVEx - 1
-# if updLVEx <= 0:
-# return
-#
-# updMaxExp = PlayerControl.GetTotalExpByPlayerLv(updLVEx)
-# if not updMaxExp:
-# return
-#
-# # 扣钱,增加兑换次数
-# if costMoney > 0:
-# PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costMoney)
-#
-# __SetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_ChangeReikiCnt, exCnt + 1)
-#
-# addDataDict = {"succRate":succRate}
-# # 概率兑换
-# if GameWorld.CanHappen(succRate):
-# addReiki = eval(getReikiFormat)
-# curReiki = __GetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_Reiki)
-# updReiki = curReiki + addReiki
-# addDataDict["isSuccess"] = 1
-# addDataDict.update({"curReiki":curReiki, "addReiki":addReiki, "updReiki":updReiki})
-# __SetPlayerReincDictValue(curPlayer, ChConfig.Def_PDict_Reinc_Reiki, updReiki)
-#
-# PlayerControl.NotifyCode(curPlayer, "GeRen_hgg_960792", [addReiki])
-# updExp = int(updMaxExp * curExpPer) # 降级后的经验
-# curPlayer.SetLVEx(updLVEx)
-# PlayerControl.SetPlayerTotalExp(curPlayer, updExp)
-#
-# addDataDict.update({"curExp":curExp, "maxExp":maxExp, "updExp":updExp, "updMaxExp":updMaxExp})
-# GameWorld.DebugLog("降级兑换灵力:addDataDict=%s" % str(addDataDict), playerID)
-#
-# if isFull:
-# PlayerControl.PlayerControl(curPlayer).PlayerLvUp()
-#
-# #更新世界等级
-# PlayerWorldAverageLv.UpdatePlayerWorldAverageLv(curPlayer)
-# else:
-# addDataDict["isSuccess"] = 0
-# PlayerControl.NotifyCode(curPlayer, "GeRen_hgg_161234")
-#
-# # 转生等级变更流向
-# DataRecordPack.DR_PlayerLVExChange(curPlayer, curReincarLV, curLVEx, "ExchangeReiki", addDataDict)
-# Sync_PlayerReikiInfo(curPlayer)
-# return
-
-
-#// A5 47 玩家转生 #tagCMReincarnation
-#
-#struct tagCMReincarnation
-#{
-# tagHead Head;
-#};
-## 兑换灵力
-# @param index: 玩家索引
-# @param clientData: 封包结构体
-# @param tick: 时间戳
-# @return: None
-def OnReincarnation(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- DoPlayerReincarnation(curPlayer)
- return
-
-##------------------------------------------------------------------------------
--
Gitblit v1.8.0