Browse Source

【优化】日志

meijun 3 years ago
parent
commit
f1b8080722

+ 9 - 6
Common/CommonAI/Zone/Instance/InstanceUnit.API.cs

@@ -202,13 +202,16 @@ namespace CommonAI.Zone.Instance
 
 			//排除怪物回血
 #if JSG_DMG_LOG
-			int atkPropID = (source == null || source.Attack == null || source.Attack.Properties == null) ? 0 : source.Attack.Properties.GetAttackID();
-			if (atkPropID != 9999901 && (finalHP < -100000000 || finalHP > 100000000) && !(this.IsMonster && hp == this.MaxHP))
+			if(this.IsPlayer)
 			{
-				string stackInfo = new StackTrace().ToString();
-				log.Error("伤害异常: " + finalHP + ", ID" + this.Info.ID + ", " + (sender == null ? "-1" : sender.PlayerUUID)
-					+ JSGModule.GetAttackSourceDes(source) + ", " + stackInfo);
-			}
+				int atkPropID = (source == null || source.Attack == null || source.Attack.Properties == null) ? 0 : source.Attack.Properties.GetAttackID();
+				if (atkPropID != 9999901 && (finalHP < -100000000 || finalHP > 100000000) && !(this.IsMonster && hp == this.MaxHP))
+				{
+					string stackInfo = new StackTrace().ToString();
+					log.Error("伤害异常: " + finalHP + ", ID" + this.Info.ID + ", " + (sender == null ? "-1" : sender.PlayerUUID)
+						+ JSGModule.GetAttackSourceDes(source) + ", " + stackInfo);
+				}
+			}			
 #endif
 			return finalHP;
 		}

+ 5 - 5
Common/CommonAI/Zone/Instance/InstanceUnit.cs

@@ -143,11 +143,11 @@ namespace CommonAI.Zone.Instance
 
 		protected override void Disposing()
         {
-			if(this.IsMonster && (this.mProcessDeadTime == 0 || this.CurrentHP > 0 || this.mProcessDeadTime == 0))
-			{
-				log.Info("单位Disposing:" + this.Parent.UUID + ", " + this.Parent.GetSceneID() + ", " + this.ID + ", " + this.CurrentHP + "," +
-					this.IsMonster + ", " + mProcessDeadTime);
-			}
+			//if(this.IsMonster && (this.mProcessDeadTime == 0 || this.CurrentHP > 0 || this.mProcessDeadTime == 0))
+			//{
+			//	log.Info("单位Disposing:" + this.Parent.UUID + ", " + this.Parent.GetSceneID() + ", " + this.ID + ", " + this.CurrentHP + "," +
+			//		this.IsMonster + ", " + mProcessDeadTime);
+			//}
 
             if (mUnitVirtual != null)
             {

+ 1 - 1
Common/CommonAI/Zone/ZoneEditor/EditorScene.cs

@@ -119,7 +119,7 @@ namespace CommonAI.Zone.ZoneEditor
 
 		public override int GetSceneID()
 		{
-			return this.mSceneData.ID;
+			return this.mSceneData == null ? -1 : this.mSceneData.ID;
 		}
 
 		protected override void Disposing()

+ 1 - 1
XmdsCommonServer/Plugin/XmdsVirtual/XmdsVirtual.Event.cs

@@ -1112,7 +1112,7 @@ namespace XmdsCommonServer.Plugin
 			int checkValue = (source != null && source.Attack != null && source.Attack.Properties.GetAttackID() / 100 == 1104)
 				? attacker.mUnit.CurrentHP : attacker.MirrorProp.GetFinalAttack(hitter == null ? false : hitter.mUnit.IsMonster);
 
-			if (finalDmg / sourceDmg > 3.5f || finalDmg / checkValue > 60)
+			if (finalDmg / sourceDmg > 5.0f || finalDmg / checkValue > 60)
 			{
 				log.Warn(flag + ", dmg: " + (int)finalDmg + ", src: " + (int)sourceDmg + ", attackerAtk: " + attacker.MirrorProp.MaxAttack + ", "
 					+ attacker.MirrorProp.MaxMonsterAttack + ", atkHP:" + mUnit.CurrentHP

+ 1 - 1
XmdsVSPlugins/XmdsCommonSkill/Plugin/Skills/Warrior/Warrior_110550.cs

@@ -51,7 +51,7 @@ namespace XmdsCommonSkill.Plugin.Skills.Warrior
 			var buff1 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 0) as XmdsBuff_IgnorCtrlAndSpeedChg;
 			buff1.speedChange = mValueSet3.GetValue(gs.TalentSkillLevel2, 1);
 
-			var buff2 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 0) as XmdsBuff_PropChange;
+			var buff2 = unit.GetRegisBuffVirtual(Buff_ID_5_5, 1) as XmdsBuff_PropChange;
 			buff2.CurrentValue = mValueSet3.GetValue(gs.TalentSkillLevel2, 2);
 		}