From b73ea3db37f14ffb23392cd7a7adbbab9ae69641 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 16 一月 2019 22:56:14 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/CrossServerBoss/CrossServerBossModel.cs | 10 ++--
Utility/EnumHelper.cs | 1
Core/GameEngine/Model/Player/PlayerDatas.cs | 3 +
System/OpenServerActivity/OpenServerActivityNotifyWin.cs | 6 +++
System/Dungeon/DungeonModel.cs | 2
Core/GameEngine/DataToCtl/PackageRegedit.cs | 27 ++++++-------
Core/NetworkPackage/GameNetSystem.cs | 24 +++++++++---
Fight/MapTransferUtility.cs | 14 +++---
UI/HUD/HeadUpName.cs | 2
System/MainInterfacePanel/InGamePushContainer.cs | 7 +++
System/MainInterfacePanel/MainInterfaceWin.cs | 11 +++--
Fight/GameActor/GActorPlayerBase.cs | 10 ++++-
12 files changed, 76 insertions(+), 41 deletions(-)
diff --git a/Core/GameEngine/DataToCtl/PackageRegedit.cs b/Core/GameEngine/DataToCtl/PackageRegedit.cs
index 8465591..3f83b52 100644
--- a/Core/GameEngine/DataToCtl/PackageRegedit.cs
+++ b/Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -12,9 +12,6 @@
get {
lock (lockojb1) { return m_PackageTable; }
}
- set {
- lock (lockojb1) { m_PackageTable = value; }
- }
}
static object lockojb2 = new object();
@@ -23,22 +20,19 @@
get {
lock (lockojb2) { return m_PackToBusinessTable; }
}
- set {
- lock (lockojb2) { m_PackToBusinessTable = value; }
- }
}
public static void Init()
{
// 鐧昏鐩稿簲鐨勬暟鎹綋鍙婂搴旂殑鏁版嵁杞�昏緫绫�
- Register(typeof(H0208_tagTalkCountry), typeof(DTC0208_tagTalkCountry));
- Register(typeof(HB102_tagMCClothesCoatSkinState), typeof(DTCB102_tagMCClothesCoatSkinState));
- Register(typeof(HA112_tagMCDBPlayer), typeof(DTCA112_tagMCDBPlayer));
- Register(typeof(HC106_tagMCEnterCrossServerError), typeof(DTCC106_tagMCEnterCrossServerError));
- Register(typeof(HC105_tagMCStartEnterCrossServer), typeof(DTCC105_tagMCStartEnterCrossServer));
- Register(typeof(HC104_tagMCPrepareEnterCrossServer), typeof(DTCC104_tagMCPrepareEnterCrossServer));
- Register(typeof(HC103_tagMCCrossRealmPKPlayerHisSeasonInfo), typeof(DTCC103_tagMCCrossRealmPKPlayerHisSeasonInfo));
- Register(typeof(HA31E_tagMCGatherSoulHoleInfo), typeof(DTCA31E_tagMCGatherSoulHoleInfo));
+ Register(typeof(H0208_tagTalkCountry), typeof(DTC0208_tagTalkCountry));
+ Register(typeof(HB102_tagMCClothesCoatSkinState), typeof(DTCB102_tagMCClothesCoatSkinState));
+ Register(typeof(HA112_tagMCDBPlayer), typeof(DTCA112_tagMCDBPlayer));
+ Register(typeof(HC106_tagMCEnterCrossServerError), typeof(DTCC106_tagMCEnterCrossServerError));
+ Register(typeof(HC105_tagMCStartEnterCrossServer), typeof(DTCC105_tagMCStartEnterCrossServer));
+ Register(typeof(HC104_tagMCPrepareEnterCrossServer), typeof(DTCC104_tagMCPrepareEnterCrossServer));
+ Register(typeof(HC103_tagMCCrossRealmPKPlayerHisSeasonInfo), typeof(DTCC103_tagMCCrossRealmPKPlayerHisSeasonInfo));
+ Register(typeof(HA31E_tagMCGatherSoulHoleInfo), typeof(DTCA31E_tagMCGatherSoulHoleInfo));
Register(typeof(HAA1D_tagMCActTotalRechargeInfo), typeof(DTCAA1D_tagMCActTotalRechargeInfo));
Register(typeof(HAA1C_tagMCTotalRechargePlayerInfo), typeof(DTCAA1C_tagMCTotalRechargePlayerInfo));
Register(typeof(HA717_tagMCChatBubbleBoxState), typeof(DTCA717_tagMCChatBubbleBoxState));
@@ -471,6 +465,11 @@
catch (Exception ex)
{
DebugEx.LogError(ex.StackTrace);
+ DebugEx.LogErrorFormat("灏佸寘鏄惁涓篘ull:{0};", _package == null);
+ if (_package != null)
+ {
+ DebugEx.LogErrorFormat("灏佸寘缂栧彿鏄�:{0};", _package.cmd);
+ }
}
}
diff --git a/Core/GameEngine/Model/Player/PlayerDatas.cs b/Core/GameEngine/Model/Player/PlayerDatas.cs
index d7c1a72..5b4eb6a 100644
--- a/Core/GameEngine/Model/Player/PlayerDatas.cs
+++ b/Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -34,7 +34,8 @@
public PlayerRankData rank { get { return m_Rank; } }
StoreModel m_StoreModel;
- StoreModel StoreModel {
+ StoreModel StoreModel
+ {
get { return m_StoreModel ?? (m_StoreModel = ModelCenter.Instance.GetModel<StoreModel>()); }
}
diff --git a/Core/NetworkPackage/GameNetSystem.cs b/Core/NetworkPackage/GameNetSystem.cs
index 5c212a4..9d48632 100644
--- a/Core/NetworkPackage/GameNetSystem.cs
+++ b/Core/NetworkPackage/GameNetSystem.cs
@@ -355,15 +355,27 @@
void OnUpdate()
{
- while (mainProtocolQueue.Count > 0)
+ lock (this)
{
- PackageRegedit.Distribute(mainProtocolQueue.Dequeue());
+ while (mainProtocolQueue.Count > 0)
+ {
+ var package = mainProtocolQueue.Dequeue();
+ if (package != null)
+ {
+ PackageRegedit.Distribute(package);
+ }
+ }
+
+ while (crossSeverProtocolQueue.Count > 0)
+ {
+ var package = crossSeverProtocolQueue.Dequeue();
+ if (package!=null)
+ {
+ PackageRegedit.Distribute(package);
+ }
+ }
}
- while (crossSeverProtocolQueue.Count > 0)
- {
- PackageRegedit.Distribute(crossSeverProtocolQueue.Dequeue());
- }
}
public enum NetState
diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index 9da19aa7..9eac36b 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -236,6 +236,8 @@
HideSecondaryEffect();
HideHorseEffect();
+ m_EquipDict.Clear();
+
if (m_HorseModel)
{
HorseConfig _horseConfig = Config.Instance.Get<HorseConfig>((int)HorseID);
@@ -650,7 +652,7 @@
}
int _baseHandResID = ModelResConfig.GetHandByClothesID((int)ClothesItemID);
int _resID = _baseHandResID;
- if(JobSetup.Job == 2)
+ if (JobSetup.Job == 2)
{
_resID = JobSetup.BaseEquip[2];
}
@@ -1075,7 +1077,10 @@
}
else
{
- SwitchHand(false);
+ if (!m_EquipDict.ContainsKey((int)RoleEquipType.retWeapon2))
+ {
+ SwitchHand(true);
+ }
}
// 閲嶆柊纭畾褰撳墠鐘舵��
@@ -1122,6 +1127,7 @@
}
m_ClothesModel.transform.localRotation = Quaternion.identity;
+
}
if (State == E_ActorState.AutoRun ||
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index 19af071..f69923f 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -276,7 +276,7 @@
{
var _mapConfig = Config.Instance.Get<MapConfig>(_npcLocation.mapId);
// 涓珛鍦板浘
- if (_mapConfig.Camp == 5 && (isWorldBoss || isDogzBoss||isCrossServerBoss))
+ if (_mapConfig.Camp == 5 && (isWorldBoss || isDogzBoss || isCrossServerBoss))
{
if (_npcLocation.mapId == PlayerDatas.Instance.baseData.MapID)
{
@@ -295,19 +295,19 @@
}
// 澧炲姞涓�椤归拡瀵笲OSS鐨勯�昏緫鍒ゆ柇
- if(_config.NPCType == (int)E_NpcType.Fight)
+ if (_config.NPCType == (int)E_NpcType.Fight)
{
var _boss = GAMgr.Instance.GetCloserNPC(_hero.Pos, npcID) as GA_NpcFightBoss;
- if(_boss != null)
+ if (_boss != null)
{
- _hero.MoveToPosition(_boss.Pos,_npcLocation.scope);
+ _hero.MoveToPosition(_boss.Pos, _npcLocation.scope);
_hero.SelectTarget = _hero.LockTarget = _boss;
return;
}
}
- var isFairyBoss = Config.Instance.ContainKey<FairyGrabBossConfig>(npcID);
- bool _isBoss = isWorldBoss || isDogzBoss || isCrossServerBoss|| isFairyBoss ;
+ var isFairyBoss = Config.Instance.ContainKey<FairyGrabBossConfig>(npcID);
+ bool _isBoss = isWorldBoss || isDogzBoss || isCrossServerBoss || isFairyBoss;
if (_isBoss && _findLocation)
{
// Debug.LogFormat("鐩爣鏄痓oss");
@@ -566,7 +566,7 @@
_destPos = npc.Pos;
}
- _hero.MoveToPosition(_destPos, _chkDist);
+ _hero.MoveToPosition(_destPos, _chkDist, true);
}
if (s_OnHeroStartMoveToNPC != null)
diff --git a/System/CrossServerBoss/CrossServerBossModel.cs b/System/CrossServerBoss/CrossServerBossModel.cs
index 5ec5910..b110d70 100644
--- a/System/CrossServerBoss/CrossServerBossModel.cs
+++ b/System/CrossServerBoss/CrossServerBossModel.cs
@@ -426,16 +426,16 @@
public void UpdateRedpoint()
{
- if (!FuncOpen.Instance.IsFuncOpen(162))
- {
- redpoint.count = 0;
- }
- else
+ if (FuncOpen.Instance.IsFuncOpen(162) && TimeUtility.OpenDay >= GeneralDefine.crossServerOneVsOneOpenDay)
{
var wearyValueLimit = GeneralDefine.bossWearyValues[2];
var count = (wearyValueLimit - wearyValue) + (GeneralDefine.dogzBoxLimit - bigBoxCollectCount);
redpoint.count = count;
}
+ else
+ {
+ redpoint.count = 0;
+ }
redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None;
CrossServerUtility.UpdateCrossServerRedpoint();
diff --git a/System/Dungeon/DungeonModel.cs b/System/Dungeon/DungeonModel.cs
index 0173933..3adb88f 100644
--- a/System/Dungeon/DungeonModel.cs
+++ b/System/Dungeon/DungeonModel.cs
@@ -1010,7 +1010,7 @@
&& dungeonResult.leaderID == PlayerDatas.Instance.baseData.PlayerID)
{
RealmBossShow.Instance.Open(realmModel.cacheRealmLv);
- ModelCenter.Instance.GetModel<ChatCenter>().CheckSendRealmThanks();
+ //ModelCenter.Instance.GetModel<ChatCenter>().CheckSendRealmThanks();
}
else
{
diff --git a/System/MainInterfacePanel/InGamePushContainer.cs b/System/MainInterfacePanel/InGamePushContainer.cs
index deaca6c..2ea3482 100644
--- a/System/MainInterfacePanel/InGamePushContainer.cs
+++ b/System/MainInterfacePanel/InGamePushContainer.cs
@@ -34,6 +34,8 @@
ElderGodAreaModel elderGodAreaModel { get { return ModelCenter.Instance.GetModel<ElderGodAreaModel>(); } }
DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
+ CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } }
+
VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } }
DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
FBHelpPointExchageModel exchageModel { get { return ModelCenter.Instance.GetModel<FBHelpPointExchageModel>(); } }
@@ -51,6 +53,7 @@
FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
InSevenDayModel inSevenDayModel { get { return ModelCenter.Instance.GetModel<InSevenDayModel>(); } }
+
public void Init()
{
CheckBetterEquip();
@@ -275,6 +278,10 @@
killable = dogzDungeonModel.wearyValue < GeneralDefine.bossWearyValues[2];
show = !GeneralDefine.dogzNoRebornRemindMaps.Contains(mapId);
break;
+ case FindPreciousType.CrossServerBoss:
+ killable = crossServerBossModel.wearyValue < GeneralDefine.bossWearyValues[2];
+ show = !GeneralDefine.dogzNoRebornRemindMaps.Contains(mapId);
+ break;
}
if (!killable)
diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index 6e17d71..2394347 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -604,11 +604,14 @@
private void SetAtkType()//閫嶉仴鍩庨潪boss鍖哄煙鐗规畩澶勭悊
{
- bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//鏄惁鍦˙oss鍖哄煙
- if (PlayerDatas.Instance.baseData.MapID == 10040 && !IsBossBool && Buffmodel.PkType!=0)
+ if (PlayerDatas.Instance.hero != null)
{
- DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)0);
- Buffmodel.PkType = 0;
+ bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//鏄惁鍦˙oss鍖哄煙
+ if (PlayerDatas.Instance.baseData.MapID == 10040 && !IsBossBool && Buffmodel.PkType != 0)
+ {
+ DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)0);
+ Buffmodel.PkType = 0;
+ }
}
}
private void OnMaininterCDTime()
diff --git a/System/OpenServerActivity/OpenServerActivityNotifyWin.cs b/System/OpenServerActivity/OpenServerActivityNotifyWin.cs
index 011a4a4..f994ed8 100644
--- a/System/OpenServerActivity/OpenServerActivityNotifyWin.cs
+++ b/System/OpenServerActivity/OpenServerActivityNotifyWin.cs
@@ -41,6 +41,12 @@
private void CheckFlashRushToBuy()
{
+ if(CrossServerUtility.IsCrossServerOneVsOne())
+ {
+ flashRushToBuyNotify.gameObject.SetActive(false);
+ return;
+ }
+
OperationFlashRushToBuy.FlashSaleShop saleShop = null;
if(activityNotifyModel.flashSaleShops.Count > 0)
{
diff --git a/UI/HUD/HeadUpName.cs b/UI/HUD/HeadUpName.cs
index c0acd6e..936a65e 100644
--- a/UI/HUD/HeadUpName.cs
+++ b/UI/HUD/HeadUpName.cs
@@ -93,7 +93,7 @@
{
if (m_Realm)
{
- if (_realm > 0)
+ if (_realm > 0 && Config.Instance.ContainKey<RealmConfig>(_realm))
{
m_Realm.gameObject.SetActive(true);
m_PlayerName.alignment = TextAnchor.MiddleLeft;
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index 3d2e0d6..c0af2e8 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -902,6 +902,7 @@
Dogz = 138, //绁炲吔
AddPoint = 145,//鍔犵偣
CrossServer = 157, //璺ㄦ湇澶╂璧�
+ CrossServerBoss=162,
}
//灞炴�х被鍨�
public enum AttrEnum
--
Gitblit v1.8.0