Skip to content

Commit

Permalink
2.4 changes and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Icehunter committed Oct 30, 2014
1 parent fb4b060 commit a51264d
Show file tree
Hide file tree
Showing 13 changed files with 577 additions and 554 deletions.
12 changes: 6 additions & 6 deletions FFXIVAPP.Plugin.Radar.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVAPP.Plugin.Radar", "FFXIVAPP.Plugin.Radar\FFXIVAPP.Plugin.Radar.csproj", "{BDF0777F-306F-464C-A30B-3FAE6CDDF527}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVAPP.Plugin.Radar", "FFXIVAPP.Plugin.Radar\FFXIVAPP.Plugin.Radar.csproj", "{28499E59-B9C5-44FE-AEE6-447720262A7C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1D51C3C3-63EF-40CA-BFEE-97F98921C157}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -18,10 +18,10 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BDF0777F-306F-464C-A30B-3FAE6CDDF527}.Debug|x86.ActiveCfg = Debug|x86
{BDF0777F-306F-464C-A30B-3FAE6CDDF527}.Debug|x86.Build.0 = Debug|x86
{BDF0777F-306F-464C-A30B-3FAE6CDDF527}.Release|x86.ActiveCfg = Release|x86
{BDF0777F-306F-464C-A30B-3FAE6CDDF527}.Release|x86.Build.0 = Release|x86
{28499E59-B9C5-44FE-AEE6-447720262A7C}.Debug|x86.ActiveCfg = Debug|x86
{28499E59-B9C5-44FE-AEE6-447720262A7C}.Debug|x86.Build.0 = Debug|x86
{28499E59-B9C5-44FE-AEE6-447720262A7C}.Release|x86.ActiveCfg = Release|x86
{28499E59-B9C5-44FE-AEE6-447720262A7C}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
52 changes: 17 additions & 35 deletions FFXIVAPP.Plugin.Radar/Controls/Radar.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,46 +1,21 @@
// FFXIVAPP.Plugin.Radar
// Radar.xaml.cs
//
// Copyright © 2007 - 2014 Ryan Wilson - All Rights Reserved
// Created by Ryan Wilson.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of SyndicatedLife nor the names of its contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// Copyright © 2014 - 2014 Ryan Wilson - All Rights Reserved

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Media;
using FFXIVAPP.Common.Core.Memory;
using FFXIVAPP.Common.Core.Memory.Enums;
using FFXIVAPP.Common.RegularExpressions;
using FFXIVAPP.Common.Utilities;
using FFXIVAPP.Plugin.Radar.Helpers;
using FFXIVAPP.Plugin.Radar.Models;
using FFXIVAPP.Plugin.Radar.Properties;
using FFXIVAPP.Plugin.Radar.ViewModels;
using NLog;
Expand Down Expand Up @@ -132,19 +107,22 @@ protected override void OnRender(DrawingContext drawingContext)

if (Settings.Default.FilterRadarItems)
{
var npcFilters = PluginViewModel.Instance.Filters.Where(filter => filter.Type != Actor.Type.PC && filter.Type != Actor.Type.Monster).ToList();
var npcFilters = PluginViewModel.Instance.Filters.Where(filter => filter.Type != Actor.Type.PC && filter.Type != Actor.Type.Monster)
.ToList();
if (npcFilters.Any())
{
npcEntites = RadarFilterHelper.ResolveFilteredEntities(npcFilters, npcEntites);
}

var monsterFilters = PluginViewModel.Instance.Filters.Where(filter => filter.Type == Actor.Type.Monster).ToList();
var monsterFilters = PluginViewModel.Instance.Filters.Where(filter => filter.Type == Actor.Type.Monster)
.ToList();
if (monsterFilters.Any())
{
monsterEntites = RadarFilterHelper.ResolveFilteredEntities(monsterFilters, monsterEntites);
}

var pcFilters = PluginViewModel.Instance.Filters.Where(filter => filter.Type == Actor.Type.PC).ToList();
var pcFilters = PluginViewModel.Instance.Filters.Where(filter => filter.Type == Actor.Type.PC)
.ToList();
if (pcFilters.Any())
{
pcEntites = RadarFilterHelper.ResolveFilteredEntities(pcFilters, pcEntites);
Expand Down Expand Up @@ -239,9 +217,6 @@ protected override void OnRender(DrawingContext drawingContext)
case Actor.Job.CUL:
drawingContext.DrawImage(RadarIconHelper.Culinarian, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.Chocobo:
drawingContext.DrawImage(RadarIconHelper.Chocobo, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.DRG:
drawingContext.DrawImage(RadarIconHelper.Dragoon, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
Expand Down Expand Up @@ -269,19 +244,26 @@ protected override void OnRender(DrawingContext drawingContext)
case Actor.Job.MRD:
drawingContext.DrawImage(RadarIconHelper.Marauder, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.NIN:
drawingContext.DrawImage(RadarIconHelper.Ninja, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.PGL:
drawingContext.DrawImage(RadarIconHelper.Pugilist, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.PLD:
drawingContext.DrawImage(RadarIconHelper.Paladin, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.Pet:
drawingContext.DrawImage(RadarIconHelper.Sheep, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
case Actor.Job.ROG:
drawingContext.DrawImage(RadarIconHelper.Rogue, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.SCH:
drawingContext.DrawImage(RadarIconHelper.Scholar, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
break;
case Actor.Job.Unknown:
if (actorEntity.OwnerID > 0 && actorEntity.OwnerID < 3758096384)
{
drawingContext.DrawImage(RadarIconHelper.Chocobo, new Rect(new Point(screen.X, screen.Y), new Size(16, 16)));
}
useJob = false;
break;
case Actor.Job.WAR:
Expand Down
17 changes: 11 additions & 6 deletions FFXIVAPP.Plugin.Radar/FFXIVAPP.Plugin.Radar.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{BDF0777F-306F-464C-A30B-3FAE6CDDF527}</ProjectGuid>
<ProjectGuid>{28499E59-B9C5-44FE-AEE6-447720262A7C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FFXIVAPP.Plugin.Radar</RootNamespace>
Expand Down Expand Up @@ -46,19 +46,21 @@
<Reference Include="FFXIVAPP.Localization">
<HintPath>..\..\ffxivapp-resources\FFXIVAPP.Localization.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack">
<HintPath>..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\ffxivapp-aio\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro">
<HintPath>..\..\ffxivapp-resources\MahApps.Metro.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\ffxivapp-aio\packages\Newtonsoft.Json.6.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net45\NLog.dll</HintPath>
<Reference Include="NLog, Version=3.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\ffxivapp-aio\packages\NLog.3.1.0.0\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
Expand Down Expand Up @@ -175,6 +177,8 @@
<Resource Include="Media\RadarIcons\zone.png" />
<Resource Include="Defaults\Filters.xml" />
<Resource Include="Media\RadarIcons\chocobo_personal.png" />
<Resource Include="Media\RadarIcons\ninja.png" />
<Resource Include="Media\RadarIcons\rogue.png" />
<Content Include="PluginInfo.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand All @@ -191,6 +195,7 @@
<Resource Include="Media\Images\About.png" />
<Resource Include="Media\Images\Main.png" />
<Resource Include="Media\Images\Settings.png" />
<None Include="app.config" />
<Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down
2 changes: 2 additions & 0 deletions FFXIVAPP.Plugin.Radar/Helpers/RadarIconHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ public static class RadarIconHelper
public static ImageSource Monster = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/monster.png"));
public static ImageSource MonsterClaimed = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/monster_claimed.png"));
public static ImageSource NPC = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/npc.png"));
public static ImageSource Ninja = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/ninja.png"));
public static ImageSource Paladin = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/paladin.png"));
public static ImageSource Player = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/player.png"));
public static ImageSource Pugilist = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/pugilist.png"));
public static ImageSource RadarHeading = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/radar_heading.png"));
public static ImageSource Rogue = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/rogue.png"));
public static ImageSource Scholar = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/scholar.png"));
public static ImageSource Sheep = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/sheep.png"));
public static ImageSource SilverChest = new BitmapImage(new Uri(Constants.LibraryPack + "/Media/RadarIcons/silver_chest.png"));
Expand Down
Binary file added FFXIVAPP.Plugin.Radar/Media/RadarIcons/ninja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FFXIVAPP.Plugin.Radar/Media/RadarIcons/rogue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion FFXIVAPP.Plugin.Radar/NLog.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<!--
See http://nlog-project.org/wiki/Configuration_file
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets>
Expand Down
Loading

0 comments on commit a51264d

Please sign in to comment.