public SkillData(int index, string name, bool useButton, int extra, byte unk, SkillCategory category) { _index = index; _category = category; _name = name; _useButton = useButton; _extra = extra; _unknown = unk; }
public Skill(SkillVars data) { m_Data = data; m_Index = m_Data.Index; m_UseButton = m_Data.UseButton; m_Name = m_Data.Name; m_Category = m_Data.Category; m_Unknown = m_Data.Unknown; }
public PowerScrollFilter(GenericReader reader) { int version = reader.ReadEncodedInt(); switch (version) { case 1: m_SkillCat = (SkillCategory)reader.ReadEncodedInt(); m_SkillValue = reader.ReadEncodedInt(); break; } }
/// <summary> /// Turns a line in the skills resource file into a skill to be used in play. /// </summary> /// <param name="fileLine">the line from the resource</param> public Skill(string fileLine) { string[] split = fileLine.Split(new char[] { '|' }); uint index = 0; if (uint.TryParse(split[0], out index) && !_library.ContainsKey(index)) { Id = index; SkillCategory cat; if(Enum.TryParse<SkillCategory>(split[1], out cat)) { Category = cat; } else { Category = SkillCategory.Error; } Name = split[2]; uint desc; if (uint.TryParse(split[3], out desc)) { Description = desc; } else { Description = uint.MaxValue; } } else { Id = uint.MaxValue; Name = "Error: "+fileLine; Category = SkillCategory.Error; Description = uint.MaxValue; } }
public static LocalisedString Localisable(SkillCategory bonus) => new LocalisedString(BASE_PATH + bonus.ToString().ToUpper());
public void FillModel(SkillCategory model) { model.Name = Name; }
public SkillsGump(Mobile from, Mobile target, SkillCategory selected) : base(GumpOffsetX, GumpOffsetY) { m_From = from; m_Target = target; m_Selected = selected; int count = Enum.GetValues(typeof(SkillCategory)).Length - 1; SkillName[] sks = SkillInfo.GetCategory(m_Selected); count += sks.Length; int totalHeight = OffsetSize + ((EntryHeight + OffsetSize) * (count + 1)); AddPage(0); AddBackground(0, 0, BackWidth, BorderSize + totalHeight + BorderSize, BackGumpID); AddImageTiled(BorderSize, BorderSize, TotalWidth - (OldStyle ? SetWidth + OffsetSize : 0), totalHeight, OffsetGumpID); int x = BorderSize + OffsetSize; int y = BorderSize + OffsetSize; int emptyWidth = TotalWidth - PrevWidth - NextWidth - (OffsetSize * 4) - (OldStyle ? SetWidth + OffsetSize : 0); if (OldStyle) { AddImageTiled(x, y, TotalWidth - (OffsetSize * 3) - SetWidth, EntryHeight, HeaderGumpID); } else { AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID); } x += PrevWidth + OffsetSize; if (!OldStyle) { AddImageTiled(x - (OldStyle ? OffsetSize : 0), y, emptyWidth + (OldStyle ? OffsetSize * 2 : 0), EntryHeight, HeaderGumpID); } x += emptyWidth + OffsetSize; if (!OldStyle) { AddImageTiled(x, y, NextWidth, EntryHeight, HeaderGumpID); } foreach (SkillCategory sc in Enum.GetValues(typeof(SkillCategory))) { if (sc == SkillCategory.Aucun) { continue; } x = BorderSize + OffsetSize; y += EntryHeight + OffsetSize; AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID); if (sc == selected) { AddButton(x + PrevOffsetX, y + PrevOffsetY, 0x15E2, 0x15E6, GetButtonID(0, (int)sc), GumpButtonType.Reply, 0); } else { AddButton(x + PrevOffsetX, y + PrevOffsetY, 0x15E1, 0x15E5, GetButtonID(0, (int)sc), GumpButtonType.Reply, 0); } x += PrevWidth + OffsetSize; x -= (OldStyle ? OffsetSize : 0); AddImageTiled(x, y, emptyWidth + (OldStyle ? OffsetSize * 2 : 0), EntryHeight, EntryGumpID); AddLabel(x + TextOffsetX, y, TextHue, sc.ToString()); x += emptyWidth + (OldStyle ? OffsetSize * 2 : 0); x += OffsetSize; if (SetGumpID != 0) { AddImageTiled(x, y, SetWidth, EntryHeight, SetGumpID); } if (sc == selected) { int indentMaskX = BorderSize; int indentMaskY = y + EntryHeight + OffsetSize; int j = 0; foreach (SkillName skN in sks) { Skill sk = target.Skills[skN]; x = BorderSize + OffsetSize; y += EntryHeight + OffsetSize; x += OffsetSize; x += IndentWidth; AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID); AddButton(x + PrevOffsetX, y + PrevOffsetY, 0x15E1, 0x15E5, GetButtonID(1, j), GumpButtonType.Reply, 0); x += PrevWidth + OffsetSize; x -= (OldStyle ? OffsetSize : 0); AddImageTiled(x, y, emptyWidth + (OldStyle ? OffsetSize * 2 : 0) - OffsetSize - IndentWidth, EntryHeight, EntryGumpID); AddLabel(x + TextOffsetX, y, TextHue, sk == null ? "(null)" : sk.Name); x += emptyWidth + (OldStyle ? OffsetSize * 2 : 0) - OffsetSize - IndentWidth; x += OffsetSize; if (SetGumpID != 0) { AddImageTiled(x, y, SetWidth, EntryHeight, SetGumpID); } if (sk != null) { int buttonID1, buttonID2; int xOffset, yOffset; switch (sk.Lock) { default: case SkillLock.Up: buttonID1 = 0x983; buttonID2 = 0x983; xOffset = 6; yOffset = 4; break; case SkillLock.Down: buttonID1 = 0x985; buttonID2 = 0x985; xOffset = 6; yOffset = 4; break; case SkillLock.Locked: buttonID1 = 0x82C; buttonID2 = 0x82C; xOffset = 5; yOffset = 2; break; } AddButton(x + xOffset, y + yOffset, buttonID1, buttonID2, GetButtonID(2, j), GumpButtonType.Reply, 0); y += 1; x -= OffsetSize; x -= 1; x -= 50; AddImageTiled(x, y, 50, EntryHeight - 2, OffsetGumpID); x += 1; y += 1; AddImageTiled(x, y, 48, EntryHeight - 4, EntryGumpID); AddLabelCropped(x + TextOffsetX, y - 1, 48 - TextOffsetX, EntryHeight - 3, TextHue, sk.Base.ToString("F1")); y -= 2; j++; } } AddImageTiled(indentMaskX, indentMaskY, IndentWidth + OffsetSize, (sks.Length * (EntryHeight + OffsetSize)) - ((int)sc < (Enum.GetValues(typeof(SkillCategory)).Length - 2) ? OffsetSize : 0), BackGumpID + 4); j++; } } }
public static bool CheckCategory(this SkillName skill, SkillCategory category) { return GetCategory(skill) == category; }
/// <summary> /// 创建一个新的技能 /// </summary> /// <param name="skillID"></param> /// <returns></returns> private SkillBase CreateSkill(int skillID) { SkillCategory skillType = (SkillCategory)m_CfgSkillProxy.GetSkillGrow(skillID).CastWay; SkillBase newSkillInstance = null; switch (skillType) { case SkillCategory.Immediate: case SkillCategory.Immediate_Trigger: newSkillInstance = new SkillImmediate(); break; case SkillCategory.Immediate_MultiShot: newSkillInstance = new SkillImmediateMultiShot(); break; case SkillCategory.Chanting: case SkillCategory.Chanting_Trigger: newSkillInstance = new SkillChanting(); break; case SkillCategory.Charge: newSkillInstance = new SkillCharging(); break; case SkillCategory.AutoChannel: newSkillInstance = new SkillChannellingBeam(SkillChannellingBeam.ChannellingType.Auto); break; case SkillCategory.ManualChannel: newSkillInstance = new SkillChannellingBeam(SkillChannellingBeam.ChannellingType.Manual); break; case SkillCategory.RapidFire: newSkillInstance = new SkillRapidFire(); break; case SkillCategory.Immediate_MultiShot_MultiTarget: newSkillInstance = new SkillImmediateMultiShot_MultiTarget(); break; case SkillCategory.Immediate_MultiTarget: newSkillInstance = new SkillImmediate_MultiTarget(); break; case SkillCategory.SelectSkillByBuff: newSkillInstance = new SkillSelectByBuff(); break; case SkillCategory.MiningBeam: newSkillInstance = new SkillMiningBeam(SkillMiningBeam.ChannellingType.Manual); break; default: newSkillInstance = new SkillBase(); break; } if (newSkillInstance == null) { return(null); } // FIXME 技能, 重构这部分代码 // 消除动态分配, 弄一个池子 if (m_Property.IsMain()) { if (m_SkillProxy.GetSkillByID(skillID) != null) { newSkillInstance.Initialize(m_Property, m_SkillProxy.GetSkillByID(skillID), OnSkillStopped); } else { return(null); } } else { PlayerSkillVO skillVO = PlayerSkillVO.CreateSkillVO(skillID); if (skillVO != null) { newSkillInstance.Initialize(m_Property, skillVO, OnSkillStopped); } else { return(null); } } return(newSkillInstance); }
public void Clear() { m_SkillCat = SkillCategory.None; m_SkillValue = 0; }
public void PushSkill(GameObject obj, SkillCategory category, UnityEngine.Vector3 targetpos) { LogicSystem.NotifyGfxStartSkill(obj, category, targetpos); }
public virtual bool IsCategorySkillInCD(SkillCategory category) { return(IsSkillInCD(GetHead(category))); }
// child should override this function public virtual float GetLockInputTime(SkillNode node, SkillCategory category) { return(0); }
public virtual void BreakSkill(SkillCategory category) { BreakCurSkill(SwordManSkillController.SKILL_PRESS_UP, category); }
/// <summary> /// Produces a new skill with a definition of its properties /// </summary> /// <param name="id">the skill's id</param> /// <param name="nam">the skill's name</param> /// <param name="cat">the skill's category</param> /// <param name="description">the uint reference to the skill's description</param> public Skill(uint id, string nam, SkillCategory cat, uint description) { Id = id; Name = nam; Category = cat; Description = description; }
public static SkillIcon GetIcon(this SkillCategory cat) { return(Icons[(int)cat]); }
public static bool CheckCategory(this SkillName skill, SkillCategory category) { return(GetCategory(skill) == category); }
public virtual bool BreakCurSkill(int breaktype, SkillCategory category) { return(true); }
public void SetSkillId(SkillCategory id) { m_SkillCat = id; SetIcon(); }
public static void Initialize(JustMyResumeContext context) { context.Database.EnsureCreated(); // Look for any users. if (context.Users.Any()) { return; // DB has been seeded } var Users = new User[] { new User { FirstName = "Thomas", LastName = "Woodward", StreetAddress = "809 E. Bellville St.", City = "Marion", State = "KY", Phone = "615.517.5194", Email = "*****@*****.**" } }; foreach (User s in Users) { context.Users.Add(s); } context.SaveChanges(); var userId = context.Users.FirstOrDefault(item => item.LastName == "Woodward").Id; var jobs = new Job[] { new JustMyResumeApi.Models.Job { UserId = userId, Employer = "Pure Air Internet", Title = "Founder", Role = "Network Designer/Entrepreneur", StartDate = "Jan 2016", EndDate = "May 2018", Description = "<ul><li>Created business plan and pro forma financials based on demographic and statistical data.</li><li>Designed a Fixed Wireless network to service all of western Kentucky.</li><li>Interfaced with vendors and government funding sources.</li></ul>", SortOrder = 1 }, new JustMyResumeApi.Models.Job { UserId = userId, Employer = "Data Dimensions Corp.", Title = "Systems Analyst III", Role = "Full Stack Developer", StartDate = "Aug 2002", EndDate = "Oct 2015", Description = "<ul><li>Designed, developed, maintained, and migrated internal accounting package responsible for employee incentive-based pay calculation, AR, AP, and Profit/Loss. Used Windows Forms, VB.NET, SQL Server.</li><li>Implemented and maintained intranet end-to-end workflow tracking that enabled piece-incentive pay resulting in 200% productivity increase. Used IIS, C#, ASP.NET, SQL Server.</li><li>Designed, implemented, and maintained package tracking portal for clients as an internet solution with nearly 1,000 registered users. Used IIS, C#, ASP.NET, SQL Server.</li><li>Created a REST service to interface with an Android application I built to provide tablet access to the production rate system.</li></ul>", SortOrder = 2 }, new JustMyResumeApi.Models.Job { UserId = userId, Employer = "Investment Scorecard", Title = "Programmer Analyst", Role = "Full Stack Microsoft Developer", StartDate = "Apr 2001", EndDate = "Mar 2003", Description = "<ul><li>Maintained a classic ASP web application with thousands of users for investment performance reporting. Used ASP, DCOM, SQL Server, IIS, Active Directory.</li><li>Replaced Active Directory with SQL Server user authentication resulting in greater features and vastly improved scalability.</li><li>Implemented advanced financial analysis and charting feature set which resulted in large new sales.</li></ul>", SortOrder = 3 }, new JustMyResumeApi.Models.Job { UserId = userId, Employer = "Progressive Design Software (Insync, Inc.)", Title = "Business Partner", Role = "Java Developer", StartDate = "Dec 1999", EndDate = "Apr 2001", Description = "<ul><li>Designed n-tiered platform to support web and internet applications.</li><li>Designed and coded CASE tool to automate the majority of application creation.</li><li>Interfaced with clients and coded a large n-tiered, object-oriented development effort in Visual Basic 6 and SQL Server to replace a legacy system.</li></ul>", SortOrder = 4 }, new JustMyResumeApi.Models.Job { UserId = userId, Employer = "United Systems and Software", Title = "Programmer Analyst", Role = "Full Stack Microsoft Developer", StartDate = "May 1997", EndDate = "Dec 1999", Description = "<ul><li>Designed, built and maintained multiple object-oriented Visual Basic/SQL Server Line-of-business accounting solutions.</li><li>Designed an n-tiered object-oriented infrastructure and architecture which served as the basis for re-development of the company’s entire product line. Trained and assisted other developers in the use of that architecture.</li></ul>", SortOrder = 5 } }; foreach (JustMyResumeApi.Models.Job job in jobs) { context.Jobs.Add(job); } context.SaveChanges(); var skillCategories = new SkillCategory[] { new SkillCategory { Name = "Languages", SortOrder = 1 }, new SkillCategory { Name = "APIs", SortOrder = 2 }, new SkillCategory { Name = "Databases", SortOrder = 3 } }; foreach (SkillCategory skillCategory in skillCategories) { context.SkillCategories.Add(skillCategory); } context.SaveChanges(); long lang = context.SkillCategories.FirstOrDefault(item => item.Name.Equals("Languages")).Id; long api = context.SkillCategories.FirstOrDefault(item => item.Name.Equals("APIs")).Id; long db = context.SkillCategories.FirstOrDefault(item => item.Name.Equals("Databases")).Id; var techSkills = new TechSkill[] { new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "C#", SkillLevel = "Expert", SortOrder = 1 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "Java", SkillLevel = "Proficient", SortOrder = 2 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "Visual Basic/VB.NET", SkillLevel = "Proficient", SortOrder = 3 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "Javascript", SkillLevel = "Proficient", SortOrder = 4 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "SQL", SkillLevel = "Expert", SortOrder = 5 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "HTML", SkillLevel = "Proficient", SortOrder = 6 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "CSS", SkillLevel = "Proficient", SortOrder = 7 }, new TechSkill { UserId = userId, SkillCategoryId = lang, Name = "TypeScript", SkillLevel = "Proficient", SortOrder = 8 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "ASP.NET MVC", SkillLevel = "Proficient", SortOrder = 10 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "ASP.NET Core 2.2", SkillLevel = "Proficient", SortOrder = 10 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "ASP.NET Core Web API", SkillLevel = "Proficient", SortOrder = 10 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Windows Forms", SkillLevel = "Expert", SortOrder = 12 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "ASP.NET Web Forms", SkillLevel = "Expert", SortOrder = 12 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Angular 7", SkillLevel = "Proficient", SortOrder = 13 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Angular Material", SkillLevel = "Proficient", SortOrder = 13 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "AJAX", SkillLevel = "Proficient", SortOrder = 14 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "JQuery", SkillLevel = "Proficient", SortOrder = 15 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Entity Framework", SkillLevel = "Proficient", SortOrder = 16 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Entity Framework Core", SkillLevel = "Proficient", SortOrder = 16 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "REST Services", SkillLevel = "Expert", SortOrder = 17 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Android", SkillLevel = "Entry", SortOrder = 18 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "LINQ", SkillLevel = "Proficient", SortOrder = 19 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "JSON", SkillLevel = "Proficient", SortOrder = 23 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "JSON Web Tokens", SkillLevel = "Proficient", SortOrder = 27 }, new TechSkill { UserId = userId, SkillCategoryId = api, Name = "Auth0", SkillLevel = "Entry", SortOrder = 28 }, new TechSkill { UserId = userId, SkillCategoryId = db, Name = "Microsoft SQL Server", SkillLevel = "Expert", SortOrder = 24 }, new TechSkill { UserId = userId, SkillCategoryId = db, Name = "MySQL", SkillLevel = "Proficient", SortOrder = 25 }, new TechSkill { UserId = userId, SkillCategoryId = db, Name = "Oracle", SkillLevel = "Entry", SortOrder = 26 } }; foreach (var item in techSkills) { context.TechSkills.Add(item); } context.SaveChanges(); var educationItems = new EducationItem[] { new EducationItem { UserId = userId, Description = "Harvard University", Degree = "One year, studied economics and some computer science.", SortOrder = 1 }, new EducationItem { UserId = userId, Description = "Vanderbilt University School of Engineering", Degree = "One and a half years, completed computer science curriculum but not degree requirements.", SortOrder = 2 } }; foreach (var item in educationItems) { context.EducationItems.Add(item); } context.SaveChanges(); var projects = new Project[] { new Project { UserId = userId, Name = "Dynamic Resume", Description = "A dynamically built resume application capable of hosting multiple resumes. The front end is built using Angular 7 and Angular 7 Material. The business object and data service tier is built using C# for .Net Core 2.2. The business and data tiers employ Wep API and Entity Framework Core. All content is stored in a database hosted in Microsoft SQL Server and accessed asynchronously for scalability.", DemoUrl = "https://www.justmyresume.com", GitHubUrl = "https://github.com/inputoverload/JustMyResumeWeb and https://github.com/inputoverload/JustMyResumeAPI", SortOrder = 1 } }; foreach (var item in projects) { context.Projects.Add(item); } context.SaveChanges(); context.LoginModels.Add(new LoginModel { UserName = "******", FirstName = "John", LastName = "Doe", Email = "*****@*****.**", IsAdmin = true, Password = DBSecurity.hashPassword("def@123") }); context.SaveChanges(); }
public static ILocalisable <string> ToLocalisable(this SkillCategory category) => SkillCategoryText.Localisable(category);
private UserInfo CreateArenaTarget(ArenaTargetInfo target) { if (target == null) { return(null); } int image_res_id = target.HeroId; UserInfo image_player = m_UserMgr.AddUser(image_res_id); if (null != image_player) { image_player.SceneContext = m_SceneContext; int campid = NetworkSystem.Instance.CampId == (int)CampIdEnum.Blue ? (int)CampIdEnum.Red : (int)CampIdEnum.Blue; image_player.SetCampId(campid); Data_Unit unit = m_CurScene.StaticData.ExtractData(DataMap_Type.DT_Unit, GlobalVariables.GetUnitIdByCampId(campid)) as Data_Unit; if (null != unit) { image_player.GetAiStateInfo().AiLogic = unit.m_AiLogic; image_player.SetAIEnable(true); image_player.GetMovementStateInfo().SetPosition(unit.m_Pos); image_player.GetMovementStateInfo().SetFaceDir(unit.m_RotAngle); } image_player.SetLevel(target.Level); image_player.SetNickName(target.Nickname); image_player.SkillController = new SwordManSkillController(image_player, GfxModule.Skill.GfxSkillSystem.Instance); if (null != m_SpatialSystem) { m_SpatialSystem.AddObj(image_player.SpaceObject); } /// skills if (null != target.Skills) { image_player.GetSkillStateInfo().RemoveAllSkill(); int skill_ct = target.Skills.Count; for (int i = 0; i < skill_ct; i++) { SkillInfo info = target.Skills[i]; if (null != info) { SkillCategory cur_skill_pos = SkillCategory.kNone; if (info.Postions.Presets[0] == SlotPosition.SP_A) { cur_skill_pos = SkillCategory.kSkillA; } else if (info.Postions.Presets[0] == SlotPosition.SP_B) { cur_skill_pos = SkillCategory.kSkillB; } else if (info.Postions.Presets[0] == SlotPosition.SP_C) { cur_skill_pos = SkillCategory.kSkillC; } else if (info.Postions.Presets[0] == SlotPosition.SP_D) { cur_skill_pos = SkillCategory.kSkillD; } info.Category = cur_skill_pos; image_player.GetSkillStateInfo().AddSkill(info); WorldSystem.Instance.AddSubSkill(image_player, info.SkillId, cur_skill_pos, info.SkillLevel); } } } Data_PlayerConfig playerData = PlayerConfigProvider.Instance.GetPlayerConfigById(image_player.GetLinkId()); if (null != playerData && null != playerData.m_FixedSkillList && playerData.m_FixedSkillList.Count > 0) { foreach (int skill_id in playerData.m_FixedSkillList) { SkillInfo info = new SkillInfo(skill_id, 1); image_player.GetSkillStateInfo().AddSkill(info); } } image_player.ResetSkill(); /// equips if (null != target.Equips) { int equip_ct = target.Equips.Length; for (int i = 0; i < equip_ct; i++) { ItemDataInfo image_equip = target.Equips[i]; if (null != image_equip) { image_player.GetEquipmentStateInfo().ResetEquipmentData(i); image_equip.ItemConfig = ItemConfigProvider.Instance.GetDataById(image_equip.ItemId); if (null != image_equip.ItemConfig) { image_player.GetEquipmentStateInfo().SetEquipmentData(i, image_equip); } } } } /// if (null != target.Legacys) { int legacy_ct = target.Legacys.Length; for (int i = 0; i < legacy_ct; i++) { ItemDataInfo image_legacy = target.Legacys[i]; if (null != image_legacy && image_legacy.IsUnlock) { image_player.GetLegacyStateInfo().ResetLegacyData(i); image_legacy.ItemConfig = ItemConfigProvider.Instance.GetDataById(image_legacy.ItemId); if (null != image_legacy.ItemConfig) { image_player.GetLegacyStateInfo().SetLegacyData(i, image_legacy); } } } image_player.GetLegacyStateInfo().UpdateLegacyComplexAttr(); } foreach (ArenaXSoulInfo x in target.XSoulInfo) { ItemDataInfo item = new ItemDataInfo(); item.ItemId = x.ItemId; item.Level = x.Level; item.Experience = x.Experience; item.UpdateLevelByExperience(); ItemConfig config = ItemConfigProvider.Instance.GetDataById(item.ItemId); if (config == null) { continue; } item.ItemConfig = config; XSoulPartInfo part = new XSoulPartInfo((XSoulPart)config.m_WearParts, item); part.ShowModelLevel = x.ModelLevel; image_player.GetXSoulInfo().SetXSoulPartData((XSoulPart)config.m_WearParts, part); } image_player.SetPartnerInfo(target.ActivePartner); SetArenaCharacterCoefficient(image_player); UserAttrCalculator.Calc(image_player); image_player.SetHp(Operate_Type.OT_Absolute, image_player.GetActualProperty().HpMax); image_player.SetRage(Operate_Type.OT_Absolute, 0); image_player.SetEnergy(Operate_Type.OT_Absolute, image_player.GetActualProperty().EnergyMax); target.CreatedPartners.Clear(); int total_hp = image_player.GetActualProperty().HpMax; //LogSystem.Error("---challenge target hp=" + image_player.GetActualProperty().HpMax); foreach (PartnerInfo partner in target.FightPartners) { NpcInfo partner_npc = CreateParterner(image_player, partner); if (partner_npc != null) { target.CreatedPartners.Add(partner.Id, partner_npc); //LogSystem.Error("---parnter {0} hp={1}", partner.Id, partner_npc.GetBaseProperty().HpMax); total_hp += partner_npc.GetBaseProperty().HpMax; } } //LogSystem.Error("-----challenge target total hp=" + total_hp); EntityManager.Instance.CreateUserView(image_player.GetId()); UserView image_view = EntityManager.Instance.GetUserViewById(image_player.GetId()); image_view.UpdateEquipment(); image_view.UpdateXSoulEquip(); } SyncGfxUserInfo(image_player.GetId()); return(image_player); }
public IEnumerable <SkillLevel> GetSkillsOfCategory(SkillCategory category, bool orderByDefault = true) { return(this.SkillLevels.GetSkillLevelsOfCategory(category, orderByDefault)); }
private static unsafe SkillCategory[] LoadCategories() { SkillCategory[] list = new SkillCategory[0]; string grpPath = FileManager.GetFilePath("skillgrp.mul"); if (grpPath == null) { return new SkillCategory[0]; } else { List<SkillCategory> toAdd = new List<SkillCategory>(); using (FileStream stream = new FileStream(grpPath, FileMode.Open, FileAccess.Read, FileShare.Read)) { BinaryReader bin = new BinaryReader(stream); byte[] START = new byte[4]; //File Start Offset bin.Read(START, 0, 4); int index = 0; long x = stream.Length, y = 0; while (y < x) //Position < Length { string name = ParseName(stream); long fileIndex = stream.Position - name.Length; if (name.Length > 0) { toAdd.Add(new SkillCategory(new SkillCategoryData(fileIndex, index, name))); y = stream.Position; ++index; } } } if (toAdd.Count > 0) { list = new SkillCategory[toAdd.Count]; for (int i = 0; i < toAdd.Count; i++) { list[i] = toAdd[i]; } toAdd.Clear(); } } return list; }
public override void OnResponse(NetState sender, RelayInfo info) { int buttonID = info.ButtonID - 1; int index = buttonID / 3; int type = buttonID % 3; switch (type) { case 0: { if (index >= 0 && index < Enum.GetValues(typeof(SkillCategory)).Length) { SkillCategory newSelection = (SkillCategory)index; if (m_Selected != newSelection) { m_From.SendGump(new SkillsGump(m_From, m_Target, newSelection)); } else { m_From.SendGump(new SkillsGump(m_From, m_Target, SkillCategory.Aucun)); } } break; } case 1: { SkillName[] sks = SkillInfo.GetCategory(m_Selected); if (m_Selected != SkillCategory.Aucun && index >= 0 && index < sks.Length) { Skill sk = m_Target.Skills[sks[index]]; if (sk != null) { if (m_From.AccessLevel >= AccessLevel.Batisseur) { m_From.SendGump(new EditSkillGump(m_From, m_Target, sk, m_Selected)); } else { m_From.SendMessage("You may not change that."); m_From.SendGump(new SkillsGump(m_From, m_Target, m_Selected)); } } else { m_From.SendGump(new SkillsGump(m_From, m_Target, m_Selected)); } } break; } case 2: { SkillName[] sks = SkillInfo.GetCategory(m_Selected); if (m_Selected != SkillCategory.Aucun && index >= 0 && index < sks.Length) { Skill sk = m_Target.Skills[sks[index]]; if (sk != null) { if (m_From.AccessLevel >= AccessLevel.Batisseur) { switch (sk.Lock) { case SkillLock.Up: sk.SetLockNoRelay(SkillLock.Down); sk.Update(); break; case SkillLock.Down: sk.SetLockNoRelay(SkillLock.Locked); sk.Update(); break; case SkillLock.Locked: sk.SetLockNoRelay(SkillLock.Up); sk.Update(); break; } } else { m_From.SendMessage("You may not change that."); } m_From.SendGump(new SkillsGump(m_From, m_Target, m_Selected)); } } break; } } }
public void ResetFromData() { m_Index = m_Data.Index; m_UseButton = m_Data.UseButton; m_Name = m_Data.Name; m_Category = m_Data.Category; m_Unknown = m_Data.Unknown; }
public SkillsCategoryViewModel(SkillCategory model) { Name = model.Name; Id = model.Id; Skills = model.Skills.Select(x => new SkillViewModel("DeleteSkill", x)).ToList(); }
public override void ShowSkillTip(SkillCategory category, Vector3 targetpos) { m_SkillManager.ShowSkillTip(targetpos); }
public override void HideSkillTip(SkillCategory category) { m_SkillManager.CancelSkillTip(); }
protected override GestureRecognitionState OnRecognize(EasyGesture gesture, TouchManager.IFingerList touches) { if (touches.Count != RequiredFingerCount) { if (touches.Count < RequiredFingerCount) { if (((int)CurActiveSection >= 0) && ((int)CurActiveSection <= SectionNumber - 1)) { /* * if (RecognizeCustom(gesture)) { * return GestureRecognitionState.Recognized; * } * gesture.HintFlag = HintType.RFailure; * RaiseHintEvent(gesture); * return GestureRecognitionState.Failed;*/ } return(GestureRecognitionState.Failed); } return(GestureRecognitionState.Failed); } /// ³¬Ê± /* * if (IsTimeOut(gesture)) { * gesture.HintFlag = HintType.RFailure; * return GestureRecognitionState.Failed; * }*/ /// ³¬³ö¾àÀë if (IsExceedDistance(gesture)) { if (RecognizeCustom(gesture)) { SkillCategory skill_tags = CaclSkillTag(gesture); if (SkillCategory.kSkillQ == skill_tags || SkillCategory.kSkillE == skill_tags) { gesture.IsInvalid = true; } if (0 == SkillSection[(int)CurActiveSection].PathLength) { SkillSection[(int)CurActiveSection].PathLength = Vector2.Distance(SkillSection[(int)CurActiveSection].StartPos, touches.GetAveragePosition()); } else { SkillSection[(int)CurActiveSection].PathLength += Vector2.Distance(WasInputPos, gesture.Position); } return(GestureRecognitionState.Recognized); } gesture.IsInvalid = true; return(GestureRecognitionState.Failed); } if (CurActiveSection > 0) { CalcSectionStartPos(gesture, touches.GetAveragePosition(), LastInputPos, CurActiveSection, SkillSection[(int)(CurActiveSection - 1)].EndPos); } gesture.Position = touches.GetAveragePosition(); if (Vector2.zero == WasInputPos) { SkillSection[(int)CurActiveSection].PathLength += Vector2.Distance(SkillSection[(int)CurActiveSection].StartPos, gesture.Position); } else { SkillSection[(int)CurActiveSection].PathLength += Vector2.Distance(WasInputPos, gesture.Position); } LastInputPos = gesture.Position; WasInputPos = gesture.Position; return(GestureRecognitionState.InProgress); }
public static int GetIconID(this SkillCategory cat) { return((int)GetIcon(cat)); }
internal void AddSkill() { //Click on ShareSkill Tab SkillTab.Click(); //Populate the Excel Sheet GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill"); Thread.Sleep(1000); //Add in ShareSkill Title SkillTitle.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title")); Assert.That(SkillTitle != null); //Add in ShareSkill Discription SkillDescription.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description")); Assert.That(SkillDescription != null); //Click on ShareSkill Category SkillCategory.Click(); //Select Category SkillCategory.SendKeys(Keys.ArrowDown + Keys.ArrowDown + Keys.Enter); //Click on ShareSkill SubCategory SkillSubCategory.Click(); //Select SubCategory SkillSubCategory.SendKeys(Keys.ArrowDown + Keys.ArrowDown + Keys.Enter); for (int i = 1; i < 3; i++) { //Click on ShareSkill Tag SkillTag.Click(); if (i == 1) { //Add in Tag1 Thread.Sleep(1000); SkillTag.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Tag1") + Keys.Enter); } else { //Add in Tag2 Thread.Sleep(1000); SkillTag.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Tag2") + Keys.Enter); } } //Click on redio button [One-off service] ServiceType.Click(); //Click on redio button [On-site] LocationType.Click(); //Add Start Date StartDate.SendKeys("08/11/2019"); //Add End Date EndDate.SendKeys("09/11/2019"); //Tick on weekdays checkbox, Add Start time and End time for (int i = 1; i <= 7; i++) { Thread.Sleep(1000); GlobalDefinitions.driver.FindElement(By.XPath("(//INPUT[@tabindex='0'])[" + (i + 4) + "]")).Click(); Thread.Sleep(1000); GlobalDefinitions.driver.FindElement(By.XPath("(//INPUT[@name='StartTime'])[" + i + "]")).SendKeys("10:00AM"); Thread.Sleep(1000); GlobalDefinitions.driver.FindElement(By.XPath("(//INPUT[@name='EndTime'])[" + i + "]")).SendKeys("08:00PM"); } //Click on Skill Trade [Credit] SkillTrade.Click(); //Add value in Credit Credit.SendKeys("6"); //Upload File using AutoIT UploadBtn.Click(); AutoItX3 autoIt = new AutoItX3(); autoIt.WinActivate("Open"); Thread.Sleep(1000); autoIt.Send(@"C:\Users\nilay\Documents\Richa 2019\Richa Vyas-Test Analyst.pdf"); Thread.Sleep(1000); autoIt.Send("{ENTER}"); //Click on Active [Active] Active.Click(); //Click on Save Button SaveBtn.Click(); }
public CompetenceGump(PlayerMobile from, SkillCategory Comp, bool ShowCaps) : base(0, 0) { m_From = from; m_Comp = Comp; m_ShowCaps = ShowCaps; Closable = true; Disposable = true; Dragable = true; Resizable = false; AddPage(0); //Restore AddButton(242, 55, 2093, 2093, 1, GumpButtonType.Reply, 0); //Titre if (m_Comp == SkillCategory.Aucun) { AddBackground(80, 72, 345, 215, 5170); } else if (m_Comp == SkillCategory.Magie) { AddBackground(80, 72, 345, 475, 5170); } else if (m_Comp == SkillCategory.Combat) { AddBackground(80, 72, 345, 515, 5170); } else if (m_Comp == SkillCategory.Roublardise) { AddBackground(80, 72, 345, 475, 5170); } else if (m_Comp == SkillCategory.Artisanat) { AddBackground(80, 72, 345, 395, 5170); } AddHtml(215, 78, 200, 20, "<h3><basefont color=#025a>Compétences<basefont></h3>", false, false); //Ligne AddImage(150, 105, 2091); int ybase = 120; int ypos = 0; //Categories SkillCategory[] cds = (SkillCategory[])Enum.GetValues(typeof(SkillCategory)); SkillName[] sns = SkillInfo.CatTable; foreach (SkillCategory cd in cds) { if (cd == SkillCategory.Aucun) { continue; } if (m_Comp == cd) { AddButton(100, (ybase + ypos + 2), 2086, 2086, 3 + (int)cd, GumpButtonType.Reply, 0); } else { AddButton(100, ybase + ypos, 2087, 2087, 3 + (int)cd, GumpButtonType.Reply, 0); } AddHtml(115, ybase + ypos, 200, 20, String.Format("<h3><basefont color=#025a>{0}<basefont></h3>", cd.ToString()), false, false); int textoffset = 0; switch (cd) { case SkillCategory.Artisanat: textoffset = 70; break; case SkillCategory.Combat: textoffset = 50; break; case SkillCategory.Magie: textoffset = 48; break; case SkillCategory.Roublardise: textoffset = 82; break; } AddImageTiled(115 + textoffset, ybase + ypos + 7, 250 - textoffset, 5, 2101); ypos += 20; if (m_Comp == cd) { foreach (SkillName sn in sns) { int i = (int)sn; SkillInfo si = null; si = SkillInfo.Table[i]; if (si.Category != cd) { continue; } if (si.Callback != null) { AddButton(110, (ybase + ypos + 3), 2103, 2104, 300 + (int)sn, GumpButtonType.Reply, 0); } AddHtml(125, (ybase + ypos), 200, 20, String.Format("<h3><basefont color=#5A4A31>{0}<basefont></h3>", si.Name), false, false); AddTooltip(3006369 + i); //TODO: Fix those. if (m_ShowCaps) { AddHtml(m_From.Skills[sn].Cap > 99 ? 327 : 332, (ybase + ypos), 200, 20, "<h3><basefont color=#5A4A31>" + m_From.Skills[sn].Cap + "<basefont></h3>", false, false); } else { AddHtml(m_From.Skills[sn].Value > 99 ? 327 : 332, (ybase + ypos), 200, 20, "<h3><basefont color=#5A4A31>" + m_From.Skills[sn].Value + "<basefont></h3>", false, false); } if (Competences.CanRaise(from, m_From.Skills[sn])) { AddButton(353, (ybase + ypos + 3), 2089, 2089, 100 + i, GumpButtonType.Reply, 0); } if (Competences.CanLower(from, m_From.Skills[sn])) { AddButton(368, (ybase + ypos + 3), 2086, 2086, 200 + i, GumpButtonType.Reply, 0); } ypos += 20; } } } //Ligne AddImage(150, (ybase + ypos + 2), 2091); //PC if (m_From is PlayerMobile) { AddImage(105, (ybase + ypos + 20), 5411); AddTooltip(3006366); //AddHtml(128, (ybase + ypos + 20), 200, 20, "<h3><basefont color=#025a>" + Competences.GetDisponibleComp(((PlayerMobile)m_From)) + " | " + (Competences.GetRemainingComp(((PlayerMobile)m_From)) - Competences.GetDisponibleComp(((PlayerMobile)m_From))) + "<basefont></h3>", false, false); } //Cap Total AddImage(370, (ybase + ypos + 20), 2092); AddTooltip(3006367); AddHtml(290, (ybase + ypos + 20), 200, 20, "<h3><basefont color=#025a>" + (m_From.SkillsTotal / 10) + " | " + (m_From.SkillsCap / 10) + "<basefont></h3>", false, false); //Cap Individuel if (m_ShowCaps) { AddButton(390, (ybase + ypos + 45), 2223, 2223, 3, GumpButtonType.Reply, 0); AddTooltip(3006368); AddHtml(242, (ybase + ypos + 43), 200, 20, "<h3><basefont color=#025a>Montrer les Valeurs<basefont></h3>", false, false); AddTooltip(3006368); } else { AddButton(390, (ybase + ypos + 45), 2224, 2224, 3, GumpButtonType.Reply, 0); AddTooltip(3006368); AddHtml(265, (ybase + ypos + 43), 200, 20, "<h3><basefont color=#025a>Montrer les Caps<basefont></h3>", false, false); AddTooltip(3006368); } //Scroll AddImage(385, 100, 2089); AddImage(385, 115, 2088); AddImage(385, (ybase + ypos + 25), 2086); //AddButton(242, (ybase + ypos + 59), 2094, 2095, 2, GumpButtonType.Reply, 0); //Ligne //AddImage(150, (222 + ypos), 2091); //Libre //AddImage(365, (240 + ypos), 5411); //AddHtml(320, (240 + ypos), 200, 20, "<h3><basefont color=#025a>" + (m_From.SkillsTotal / 10).ToString("N1") + "<basefont></h3>", false, false); //Cap //AddImage(105, (240 + ypos), 2092); //AddHtml(120, (240 + ypos), 200, 20, "<h3><basefont color=#025a>" + (m_From.SkillsCap / 10).ToString("N1") + "<basefont></h3>", false, false); //Scroll //AddImage(385, (100 + ypos), 2089); //AddImage(385, (115 + ypos), 2088); //AddImage(385, (245 + ypos), 2086); //AddButton(242, (279 + ypos), 2094, 2095, 2, GumpButtonType.Reply, 0); }
public static IEnumerable <MagusTtkSkillDefinition> GetSkillDefinitionsOfCategory(this IEnumerable <MagusTtkSkillDefinition> skillDefinitions, SkillCategory category, bool orderByDefault = true) { if (category == null) { throw new ArgumentNullException(nameof(category)); } if (skillDefinitions == null) { return(Enumerable.Empty <MagusTtkSkillDefinition>()); } var skillDefs = skillDefinitions.Where(skillDef => skillDef.Category.Code == category.Code); return(orderByDefault ? skillDefs.OrderBy(skillDef => skillDef.Group).ThenBy(skillDef => skillDef.DisplayOrderInGroup).ThenBy(skillDef => skillDef.Code) : skillDefs); }
public void BreakSkill(GameObject obj, SkillCategory category) { LogicSystem.NotifyGfxBreakSkill(obj, category); }
public static IEnumerable <SkillLevel> GetSkillLevelsOfCategory(this IEnumerable <SkillLevel> skillLevels, SkillCategory category, bool orderByDefault = true) { if (category == null) { throw new ArgumentNullException(nameof(category)); } if (skillLevels == null) { return(Enumerable.Empty <SkillLevel>()); } var skillLvls = skillLevels.Where(skillLevel => skillLevel.Definition.Category.Code == category.Code); return(orderByDefault ? skillLvls.OrderBy(skillLevel => skillLevel.Definition.Group).ThenBy(skillLevel => skillLevel.Definition.DisplayOrderInGroup).ThenBy(skillLevel => skillLevel.Definition.Code) : skillLvls); }
private IEnumerable<Skill> RelevantSkills(SkillCategory category) { return Skills.Where(x => x.SkillCategory == category); }
public CategoryAttribute(SkillCategory category) { Category = category; }