/// <summary> /// 获取副本地图中指定的怪物的个数 /// </summary> public int GetMapMonsterNum(int mapCode, int nMonsterID) { List <MonsterZone> monsterZoneList = null; if (!Map2MonsterZoneDict.TryGetValue(mapCode, out monsterZoneList)) { return(0); } int nCount = 0; for (int i = 0; i < monsterZoneList.Count; i++) { MonsterStaticInfo monsterInfo = null; monsterInfo = monsterZoneList[i].GetMonsterInfo(); if (monsterInfo == null) { continue; } if (monsterInfo.ExtensionID == nMonsterID) { nCount += monsterZoneList[i].TotalNum; } } return(nCount); }
public int GetMapMonsterNum(int mapCode, int nMonsterID) { List <MonsterZone> monsterZoneList = null; int result; if (!this.Map2MonsterZoneDict.TryGetValue(mapCode, out monsterZoneList)) { result = 0; } else { int nCount = 0; for (int i = 0; i < monsterZoneList.Count; i++) { MonsterStaticInfo monsterInfo = monsterZoneList[i].GetMonsterInfo(); if (monsterInfo != null) { if (monsterInfo.ExtensionID == nMonsterID) { nCount += monsterZoneList[i].TotalNum; } } } result = nCount; } return(result); }
public static MonsterStaticInfo GetInfo(int MonsterID) { MonsterStaticInfo info = null; MonsterStaticInfo result; if (!MonsterStaticInfoMgr.AllInfos.TryGetValue(MonsterID, out info)) { result = null; } else { result = info; } return(result); }
public MonsterStaticInfo Clone() { MonsterStaticInfo info = new MonsterStaticInfo(); info.VSName = this.VSName; info.ExtensionID = this.ExtensionID; info.VLevel = this.VLevel; info.VExperience = this.VExperience; info.RebornExp = this.VExperience; info.ExtProps = this.ExtProps; info.VMoney = this.VMoney; info.VLifeMax = this.VLifeMax; info.VManaMax = this.VManaMax; info.ToOccupation = this.ToOccupation; if (null != this.SpriteSpeedTickList) { info.SpriteSpeedTickList = new int[this.SpriteSpeedTickList.Length]; this.SpriteSpeedTickList.CopyTo(info.SpriteSpeedTickList, 0); } if (null != this.EachActionFrameRange) { info.EachActionFrameRange = new int[this.EachActionFrameRange.Length]; this.EachActionFrameRange.CopyTo(info.EachActionFrameRange, 0); } if (null != this.EffectiveFrame) { info.EffectiveFrame = new int[this.EffectiveFrame.Length]; this.EffectiveFrame.CopyTo(info.EffectiveFrame, 0); } info.SeekRange = this.SeekRange; info.EquipmentBody = this.EquipmentBody; info.EquipmentWeapon = this.EquipmentWeapon; info.MinAttack = this.MinAttack; info.MaxAttack = this.MaxAttack; info.Defense = this.Defense; info.MDefense = this.MDefense; info.HitV = this.HitV; info.Dodge = this.Dodge; info.RecoverLifeV = this.RecoverLifeV; info.RecoverMagicV = this.RecoverMagicV; info.MonsterDamageThornPercent = this.MonsterDamageThornPercent; info.MonsterDamageThorn = this.MonsterDamageThorn; info.MonsterSubAttackInjurePercent = this.MonsterSubAttackInjurePercent; info.MonsterSubAttackInjure = this.MonsterSubAttackInjure; info.MonsterIgnoreDefensePercent = this.MonsterIgnoreDefensePercent; info.MonsterIgnoreDefenseRate = this.MonsterIgnoreDefenseRate; info.MonsterLucky = this.MonsterLucky; info.MonsterFatalAttack = this.MonsterFatalAttack; info.MonsterDoubleAttack = this.MonsterDoubleAttack; info.FallGoodsPackID = this.FallGoodsPackID; info.AttackType = this.AttackType; info.BattlePersonalJiFen = this.BattlePersonalJiFen; info.BattleZhenYingJiFen = this.BattleZhenYingJiFen; info.DaimonSquareJiFen = this.DaimonSquareJiFen; info.BloodCastJiFen = this.BloodCastJiFen; info.FallBelongTo = this.FallBelongTo; if (null != this.SkillIDs) { info.SkillIDs = new int[this.SkillIDs.Length]; this.SkillIDs.CopyTo(info.SkillIDs, 0); } info.Camp = this.Camp; info.AIID = this.AIID; info.ChangeLifeCount = this.ChangeLifeCount; if (this.ExtProps != null) { info.ExtProps = new double[177]; Array.Copy(this.ExtProps, info.ExtProps, 177); } return(info); }
public static void SetInfo(int code, MonsterStaticInfo info) { MonsterStaticInfoMgr.AllInfos[code] = info; }