Browse Source

【优化】MMO-21231:召唤物添加仙阶概念

meijun 3 years ago
parent
commit
d87e866969

+ 3 - 11
XmdsCommonServer/Plugin/XmdsVirtual/XmdsVirtual_Monster.cs

@@ -644,18 +644,10 @@ namespace XmdsCommonServer.Plugin
 
 			this.mUnit.Level = lvl_monster;
 			this.mProp.ServerData.BaseInfo.UnitLv = lvl_monster;
-			//等级转仙阶
-			int upLv = lvl_monster - 70;
-			if (upLv > 0)
-			{
-				this.mProp.ServerData.BaseInfo.StateLv = (byte)(upLv / 10);
-			}
-			else
-			{
-				this.mProp.ServerData.BaseInfo.StateLv = 0;
-			}
+            //等级转仙阶
+            this.mProp.ServerData.BaseInfo.StateLv = (byte)(Math.Max(0, (lvl_monster - 70) / 10));
 
-			if (ma.Fight_Type == 1)
+            if (ma.Fight_Type == 1)
 			{
 				MonsterProp prop = XmdsDataMgr.GetInstance().GetSingleMonsterProp(lvl_monster, ma.Type);
 				initProp(prop, ma, ret);

+ 3 - 2
XmdsCommonServer/Plugin/XmdsVirtual/XmdsVirtual_SummonUnit.cs

@@ -51,15 +51,16 @@ namespace XmdsCommonServer.Plugin
 				ret.fateType = ma.FateType;
 			}
 
-
 			XmdsServerScene scene = this.mUnit.Parent as XmdsServerScene;
 			SceneType sceneType = this.mUnit.GetSceneType();
 			int lvl_monster = ma.Level;
 
 			this.mUnit.Level = lvl_monster;
 			this.mProp.ServerData.BaseInfo.UnitLv = lvl_monster;
+            //等级转仙阶
+            this.mProp.ServerData.BaseInfo.StateLv = (byte)(Math.Max(0, (lvl_monster - 70) / 10));
 
-			if (ma.Fight_Type == 1)
+            if (ma.Fight_Type == 1)
 			{
 				MonsterProp prop = XmdsDataMgr.GetInstance().GetSingleMonsterProp(lvl_monster, ma.Type);
 				initProp(prop, ma, ret);