public void SetMonsterInfo(MonsterInfo mInfo, SceneInfo sceneInfo, int attScale = 10000, ActorController.EFactionType faction = ActorController.EFactionType.ERed) { if (mInfo == null) { global::Debug.LogError(new object[] { "mInfo == null" }); return; } this.actorType = ActorController.EActorType.EMonster; this.monsterInfo = mInfo; this.factionType = faction; this.Level = this.monsterInfo.Level; this.ElementType = this.monsterInfo.ElementType; if (this.MaxRunSpeed <= 0f) { this.canRotate = false; } if (sceneInfo != null && sceneInfo.Type == 6 && GameUIManager.mInstance.uiState.KRQuest != null) { this.Level = Globals.Instance.Player.Data.Level; KRQuestInfo kRQuest = GameUIManager.mInstance.uiState.KRQuest; this.attInit[1] = (long)mInfo.MaxHP * (long)kRQuest.MaxHPScale / 10000L; this.attInit[2] = (long)mInfo.Attack * (long)kRQuest.AttackScale / 10000L; this.attInit[3] = (long)mInfo.PhysicDefense * (long)kRQuest.PhysicDefenseScale / 10000L; this.attInit[4] = (long)mInfo.MagicDefense * (long)kRQuest.MagicDefenseScale / 10000L; this.attInit[5] = (long)mInfo.Hit * (long)kRQuest.HitScale / 10000L; this.attInit[6] = (long)mInfo.Dodge * (long)kRQuest.DodgeScale / 10000L; this.attInit[7] = (long)mInfo.Crit * (long)kRQuest.CritScale / 10000L; this.attInit[8] = (long)mInfo.CritResist * (long)kRQuest.CritResisScale / 10000L; this.attInit[9] = (long)mInfo.DamagePlus * (long)kRQuest.DamagePlusScale / 10000L; this.attInit[10] = (long)mInfo.DamageMinus * (long)kRQuest.DamageMinusScale / 10000L; } else { this.attInit[1] = (long)mInfo.MaxHP * (long)attScale / 10000L; this.attInit[2] = (long)mInfo.Attack * (long)attScale / 10000L; this.attInit[3] = (long)mInfo.PhysicDefense * (long)attScale / 10000L; this.attInit[4] = (long)mInfo.MagicDefense * (long)attScale / 10000L; this.attInit[5] = (long)mInfo.Hit * (long)attScale / 10000L; this.attInit[6] = (long)mInfo.Dodge * (long)attScale / 10000L; this.attInit[7] = (long)mInfo.Crit * (long)attScale / 10000L; this.attInit[8] = (long)mInfo.CritResist * (long)attScale / 10000L; this.attInit[9] = (long)mInfo.DamagePlus * (long)attScale / 10000L; this.attInit[10] = (long)mInfo.DamageMinus * (long)attScale / 10000L; } this.resist[1] = mInfo.StunResist; this.resist[2] = mInfo.RootResist; this.resist[3] = mInfo.FearResist; this.resist[4] = mInfo.HitBackResist; this.resist[5] = mInfo.HitDownResist; this.resist[6] = mInfo.SilenceResist; for (int i = 0; i < this.monsterInfo.SkillID.Count; i++) { if (this.monsterInfo.SkillID[i] != 0) { this.AddSkill(i, this.monsterInfo.SkillID[i], false); } } this.Init(); this.CastPassiveSkill(); }
public void SetLopetData(LopetDataEx lpData, ActorController.EFactionType faction) { if (lpData == null) { global::Debug.LogError(new object[] { "lpData == null" }); return; } this.playerSkillID = lpData.Info.PlayerSkillID; this.actorType = ActorController.EActorType.ELopet; this.factionType = faction; this.Unattacked = true; this.Unhealed = true; int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; lpData.GetAttribute(ref num, ref num2, ref num3, ref num4); this.attInit[1] = (long)num; this.attInit[2] = (long)num2; this.attInit[3] = (long)num3; this.attInit[4] = (long)num4; this.Init(); }
public void SetData(SocketDataEx socket, ActorController.EFactionType faction) { if (socket == null) { global::Debug.LogError(new object[] { "socket == null" }); return; } PetDataEx pet = socket.GetPet(); if (pet == null) { global::Debug.LogError(new object[] { "socket pet == null" }); return; } this.SocketSlot = pet.GetSocketSlot(); if (socket.IsPlayer()) { this.actorType = ActorController.EActorType.EPlayer; this.ElementType = 0; this.playerGender = pet.Info.Type; this.playerName = pet.Info.Name; } else { this.actorType = ActorController.EActorType.EPet; this.ElementType = pet.Info.ElementType; this.petInfo = pet.Info; this.playerSkillID = pet.GetPlayerSkillID(); int skillID = pet.GetSkillID(0); if (skillID != 0) { this.AddSkill(0, skillID, false); } skillID = pet.GetSkillID(1); if (skillID != 0) { this.AddSkill(1, skillID, false); } skillID = pet.GetSkillID(2); if (skillID != 0 && pet.Data.Further >= 3u) { this.AddSkill(2, skillID, false); } skillID = pet.GetSkillID(3); if (skillID != 0 && pet.Data.Further >= 4u) { this.AddSkill(3, skillID, false); } } this.factionType = faction; this.Level = pet.Data.Level; for (int i = 1; i < 11; i++) { this.attInit[i] = (long)socket.GetAtt(i); } for (int j = 1; j < 7; j++) { this.resist[j] = socket.GetResist(j); } LevelInfo info = Globals.Instance.AttDB.LevelDict.GetInfo((int)this.Level); if (info == null) { global::Debug.LogError(new object[] { "socket pet == null" }); return; } this.MaxMP = (long)((ulong)info.MaxMP); for (int k = 0; k < 6; k++) { LegendSkillData legendSkill = socket.GetLegendSkill(k); if (legendSkill != null && legendSkill.EffectType != 0) { legendSkill.Cooldown = 0f; switch (legendSkill.EffectType) { case 3: this.doubleDamage = legendSkill; break; case 4: this.reflexDamage = legendSkill; break; case 5: this.reduceDamage = legendSkill; break; case 6: this.damageToHeal = legendSkill; break; case 7: this.ignoreDefense = legendSkill; break; case 8: this.attackToHeal = legendSkill; break; } } } this.Init(); }
public void SetFactionType(ActorController.EFactionType type) { this.factionType = type; }
public void SetAssistInfo(PetInfo pInfo, MonsterInfo mInfo, bool addSkill = true) { if (pInfo == null || mInfo == null) { global::Debug.LogError(new object[] { "pInfo == null || mInfo == null" }); return; } this.actorType = ActorController.EActorType.EPet; this.petInfo = pInfo; this.factionType = ActorController.EFactionType.EBlue; this.Level = mInfo.Level; this.ElementType = pInfo.ElementType; this.attInit[1] = (long)mInfo.MaxHP; this.attInit[2] = (long)mInfo.Attack; this.attInit[3] = (long)mInfo.PhysicDefense; this.attInit[4] = (long)mInfo.MagicDefense; this.attInit[5] = (long)mInfo.Hit; this.attInit[6] = (long)mInfo.Dodge; this.attInit[7] = (long)mInfo.Crit; this.attInit[8] = (long)mInfo.CritResist; this.attInit[9] = (long)((ulong)mInfo.DamagePlus); this.attInit[10] = (long)((ulong)mInfo.DamageMinus); this.resist[1] = mInfo.StunResist; this.resist[2] = mInfo.RootResist; this.resist[3] = mInfo.FearResist; this.resist[4] = mInfo.HitBackResist; this.resist[5] = mInfo.HitDownResist; this.resist[6] = mInfo.SilenceResist; if (addSkill) { for (int i = 0; i < mInfo.SkillID.Count; i++) { if (mInfo.SkillID[i] != 0) { this.AddSkill(i, mInfo.SkillID[i], false); } } } this.Init(); }