//public void fillGatherMap(YamLikeConfig.Command docCmd) //{ // if (docCmd.SubCommand == null || docCmd.SubCommand.Count == 0) // { // return; // } // if (!docCmd.has("zone")) // return; // int mapId = 0; // if (!docCmd.tryGet("zone", out mapId)) // { // return; // } // GatherNode node = new GatherNode(); // node.zoneId = mapId; // foreach (var c in docCmd.SubCommand) // { // IDrawCommand drawingCmd = CommandDrawingFactory.create(c); // if (drawingCmd == null) // continue; // node.AddDrawItem(drawingCmd); // } // this.GatherNodes.Add(node); //} void resetDrawing() { this.SelfDrawing = new ComplexDrawCommand(); this.TargetDrawing = new ComplexDrawCommand(); this.AllDrawing = new ComplexDrawCommand(); this.HostileDrawing = new ComplexDrawCommand(); this.skipObjects = new HashSet <uint>(); this.skipGameType = new HashSet <ff14bot.Enums.GameObjectType>(); this.CustomObjectTypesDrawing = new Dictionary <ff14bot.Enums.GameObjectType, ComplexDrawCommand>(); this.NpcDrawing = new Dictionary <uint, ComplexDrawCommand>(); this.GatherNodes = new List <GatherNode>(); this.cacheDrawManager = new DrawCacheManager(); CommandDrawingFactoryEx.drawCacheManager = this.cacheDrawManager; }
//public void fillComplexDrawCommand(ref ComplexDrawCommand complex, YamLikeConfig.Command cmd) //{ // if (cmd.SubCommand == null || cmd.SubCommand.Count == 0) // return; // foreach(var c in cmd.SubCommand) // { // IDrawCommand drawingCmd = CommandDrawingFactory.create(c); // if (drawingCmd == null) // continue; // if (complex == null) // { // complex = new ComplexDrawCommand(); // } // complex.AddDrawItem(drawingCmd); // } //} public void fillGameTypeCommand(YamLikeConfig.Command gameTypeCommand) { uint gameTypeInt = 0; if (!uint.TryParse(gameTypeCommand["type"], out gameTypeInt)) { return; } if (gameTypeCommand["hide"] == "1") { skipGameType.Add((ff14bot.Enums.GameObjectType)gameTypeInt); return; } ComplexDrawCommand complex = null; if (gameTypeCommand.SubCommand == null) { CustomObjectTypesDrawing[(ff14bot.Enums.GameObjectType)gameTypeInt] = complex; return; } foreach (var c in gameTypeCommand.SubCommand) { IDrawCommand drawingCmd = CommandDrawingFactoryEx.create(c); if (drawingCmd == null) { continue; } if (complex == null) { complex = new ComplexDrawCommand(); } complex.AddDrawItem(drawingCmd); } CustomObjectTypesDrawing[(ff14bot.Enums.GameObjectType)gameTypeInt] = complex; }
private void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e) { if (e.Key == Keys.O && e.Modifiers == (KeyModifiers.Shift | KeyModifiers.Alt)) { // add circle on me CircleAttack f = new CircleAttack(); f.FixCenter = true; f.Center = Core.Me.Location.Convert(); f.HeadingOffset = Core.Me.Heading; f.Radius = 3; f.Color = Color.FromArgb(0x70, 0x70, 0, 0); f.PointColor = Color.FromArgb(0x70, 0x70, 0x70, 0); customPoints.AddDrawItem(f); } if (e.Key == Keys.I && e.Modifiers == (KeyModifiers.Shift | KeyModifiers.Alt)) { customPoints = new ComplexDrawCommand(); } }
public void fillNpcCommand(YamLikeConfig.Command npcCommand) { if (npcCommand.UnnamedParams == null) { return; } List <uint> npcIdList = new List <uint>(); foreach (var npcIdStr in npcCommand.UnnamedParams) { uint npcId = 0; if (!uint.TryParse(npcIdStr, out npcId)) { continue; } npcIdList.Add(npcId); } if (npcIdList.Count == 0) { return; } if (npcCommand["hide"] == "1") { foreach (uint npcId in npcIdList) { skipObjects.Add(npcId); } return; } ComplexDrawCommand complex = null; if (npcCommand.SubCommand != null) { foreach (var c in npcCommand.SubCommand) { IDrawCommand drawingCmd = CommandDrawingFactoryEx.create(c); if (drawingCmd == null) { continue; } if (complex == null) { complex = new ComplexDrawCommand(); } complex.AddDrawItem(drawingCmd); } } foreach (uint npcId in npcIdList) { NpcDrawing[npcId] = complex; } }