├── AlbionRadaro
├── favicon.ico
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Mobs
│ ├── MobTypes.cs
│ ├── MobsHandler.cs
│ ├── Mob.cs
│ └── MobInfo.cs
├── PhotonPacketHandler
│ ├── PhotonPackageParser.cs
│ └── PhotonPacketHandler.cs
├── MouseClickMessageFilter.cs
├── MapForm.cs
├── Harvestable
│ ├── HarvestableHandler.cs
│ ├── HarvestableType.cs
│ └── Harvestable.cs
├── Program.cs
├── Player
│ ├── PlayerHandler.cs
│ └── Player.cs
├── MapForm.Designer.cs
├── Win32.cs
├── PerPixelAlphaForm.cs
├── AppSettings.settings
├── App.config
├── Form1.resx
├── MapForm.resx
├── PerPixelAlphaForm.resx
├── Settings.cs
├── AlbionRadaro.csproj
├── AOEnums
│ ├── EventCodes.cs
│ └── OperationCodes.cs
├── PacketHandler.cs
├── AppSettings.Designer.cs
└── Form1.cs
├── AlbionRadaro.sln
├── README.md
└── .gitignore
/AlbionRadaro/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rafalfigura/AO-Radar/HEAD/AlbionRadaro/favicon.ico
--------------------------------------------------------------------------------
/AlbionRadaro/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AlbionRadaro/Mobs/MobTypes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro.Mobs
8 | {
9 | public enum MobType {
10 | SKINNABLE,
11 | HARVESTABLE,
12 | RESOURCE,
13 | OTHER
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/AlbionRadaro/PhotonPacketHandler/PhotonPackageParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro
8 | {
9 | public interface IPhotonPackageHandler
10 | {
11 | void OnEvent(byte code, Dictionary parameters);
12 |
13 | void OnResponse(byte operationCode, short returnCode, Dictionary parameters);
14 |
15 | void OnRequest(byte operationCode, Dictionary parameters);
16 | }
17 | }
--------------------------------------------------------------------------------
/AlbionRadaro/MouseClickMessageFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace AlbionRadaro
9 | {
10 | public class MouseClickMessageFilter : IMessageFilter
11 | {
12 | private const int LButtonDown = 0x201;
13 | private const int LButtonUp = 0x202;
14 | private const int LButtonDoubleClick = 0x203;
15 | public bool PreFilterMessage(ref Message m)
16 | {
17 | switch (m.Msg)
18 | {
19 | case LButtonDown:
20 | case LButtonUp:
21 | case LButtonDoubleClick:
22 | return true;
23 | }
24 | return false;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/AlbionRadaro.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlbionRadaro", "AlbionRadaro\AlbionRadaro.csproj", "{B2402084-D713-410E-AD73-2D6CAABF32EC}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {B2402084-D713-410E-AD73-2D6CAABF32EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {B2402084-D713-410E-AD73-2D6CAABF32EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {B2402084-D713-410E-AD73-2D6CAABF32EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {B2402084-D713-410E-AD73-2D6CAABF32EC}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/AlbionRadaro/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AlbionRadaro.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/AlbionRadaro/Mobs/MobsHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro.Mobs
8 | {
9 | class MobsHandler
10 | {
11 | private List mobsList;
12 |
13 | public MobsHandler()
14 | {
15 | mobsList = new List();
16 | }
17 |
18 | public void AddMob(int id, int typeId, Single posX, Single posY, int health)
19 | {
20 | Mob h = new Mob(id, typeId, posX, posY, health, 0);
21 | if (!mobsList.Contains(h)) {
22 | mobsList.Add(h);
23 | // Console.WriteLine("Add mob: " + h.ToString());
24 | }
25 | }
26 | public bool RemoveMob(int id)
27 | {
28 | return mobsList.RemoveAll(x => x.Id == id) > 0;
29 | }
30 |
31 | internal List MobList
32 | {
33 | get { return mobsList; }
34 | }
35 |
36 |
37 | internal void UpdateMobEnchantmentLevel(int mobId, byte enchantmentLevel)
38 | {
39 | mobsList.First(x => x.Id == mobId).EnchantmentLevel = enchantmentLevel;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/AlbionRadaro/MapForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace AlbionRadaro
12 | {
13 | public partial class MapForm : PerPixelAlphaForm
14 | {
15 | public MapForm()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void MapForm_Load(object sender, EventArgs e)
21 | {
22 | this.ShowIcon = false;
23 | this.ShowInTaskbar = false;
24 | this.DoubleBuffered = true;
25 |
26 | // this.SetStyle( ControlStyles.AllPaintingInWmPaint, true);
27 | // this.SetStyle( ControlStyles.UserPaint, true);
28 | // this.SetStyle( ControlStyles.DoubleBuffer, true);
29 | // this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
30 |
31 |
32 | // this.BackColor = Color.Magenta;
33 | // this.TransparencyKey = Color.Magenta;
34 | }
35 |
36 | private void MapForm_Paint(object sender, PaintEventArgs e)
37 | {
38 | // e.Graphics.FillRectangle(Brushes.Transparent, e.ClipRectangle);
39 |
40 | }
41 |
42 |
43 |
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/AlbionRadaro/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AlbionRadaro")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AlbionRadaro")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e23a2ea4-6473-4273-886b-9450d8463d3b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AlbionRadaro/Harvestable/HarvestableHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Concurrent;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace AlbionRadaro
8 | {
9 | class HarvestableHandler
10 | {
11 | private List harvestableList;
12 |
13 | public HarvestableHandler()
14 | {
15 | harvestableList = new List();
16 | }
17 |
18 | public void AddHarvestable(int id, byte type, byte tier, Single posX, Single posY, byte charges, byte size)
19 | {
20 | Harvestable h = new Harvestable(id, type, tier, posX, posY, charges, size);
21 | if (!harvestableList.Contains(h))
22 | {
23 | harvestableList.Add(h);
24 | // Console.WriteLine("New Harvestable: " + h.ToString());
25 | }
26 | }
27 | public bool RemoveHarvestable(int id)
28 | {
29 | //return false;
30 | return harvestableList.RemoveAll(x => x.Id == id) > 0;
31 | }
32 | internal List HarvestableList
33 | {
34 | get { return harvestableList; }
35 | }
36 |
37 |
38 | internal void UpdateHarvestable(int harvestableId, byte count)
39 | {
40 | harvestableList.ForEach(h =>
41 | {
42 | if (h.Id == harvestableId)
43 | {
44 | //TODO - update count of ores in place
45 | // h.Count = count;
46 | }
47 | });
48 |
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/AlbionRadaro/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 | using System.Windows.Forms;
8 |
9 | namespace AlbionRadaro
10 | {
11 | static class Program
12 | {
13 | ///
14 | /// The main entry point for the application.
15 | ///
16 | [STAThread]
17 | static void Main()
18 | {
19 | try
20 | {
21 | Application.EnableVisualStyles();
22 | Application.SetCompatibleTextRenderingDefault(false);
23 | Application.Run(new Form1());
24 | }
25 | catch (Exception ex)
26 | {
27 | //ErrorLogging(ex);
28 | throw ex;
29 | }
30 | }
31 | public static void ErrorLogging(Exception ex)
32 | {
33 | string strPath = @"C:\Log.txt";
34 | if (!File.Exists(strPath))
35 | {
36 | File.Create(strPath).Dispose();
37 | }
38 | using (StreamWriter sw = File.AppendText(strPath))
39 | {
40 | sw.WriteLine("=============Error Logging ===========");
41 | sw.WriteLine("===========Start============= " + DateTime.Now);
42 | sw.WriteLine("Error Message: " + ex.Message);
43 | sw.WriteLine("Stack Trace: " + ex.StackTrace);
44 | sw.WriteLine("Stack Trace2: " + ex.ToString());
45 | sw.WriteLine("===========End============= " + DateTime.Now);
46 |
47 | }
48 | }
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/AlbionRadaro/Player/PlayerHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace AlbionRadaro
7 | {
8 | class PlayerHandler
9 | {
10 | private List playersInRange;
11 | private Player localPlayer;
12 |
13 | public PlayerHandler()
14 | {
15 | playersInRange = new List();
16 | localPlayer = new Player();
17 | }
18 | public void AddPlayer(Single posX, Single posY, string nickname, string guild, string alliance, int id)
19 | {
20 | Player p = new Player(posX, posY, nickname, guild, alliance, id);
21 | if(!playersInRange.Contains(p))
22 | playersInRange.Add(p);
23 | //Console.WriteLine("Added player: " + p.ToString());
24 | }
25 | public bool RemovePlayer(int id)
26 | {
27 | return playersInRange.RemoveAll(x => x.Id == id) > 0;
28 | }
29 | internal List PlayersInRange
30 | {
31 | get { return playersInRange; }
32 | }
33 | public void UpdateLocalPlayerPosition(Single posX, Single posY)
34 | {
35 | localPlayer.PosX = posX;
36 | localPlayer.PosY = posY;
37 | }
38 | internal void UpdatePlayerPosition(int id, float posX, float posY)
39 | {
40 | playersInRange.ForEach(p =>
41 | {
42 | if (p.Id == id)
43 | {
44 | p.PosX = posX;
45 | p.PosY = posY;
46 | }
47 | });
48 |
49 | }
50 | public Single localPlayerPosX()
51 | {
52 | return localPlayer.PosX;
53 | }
54 | public Single localPlayerPosY()
55 | {
56 | return localPlayer.PosY;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/AlbionRadaro/Player/Player.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace AlbionRadaro
7 | {
8 | class Player
9 | {
10 | private Single posX;
11 | private Single posY;
12 | private string nickname;
13 | private string guild;
14 | private string alliance;
15 | private int id;
16 | public Player()
17 | {
18 | posX = 0;
19 | posY = 0;
20 | nickname = "";
21 | guild = "";
22 | alliance = "";
23 | id = 0;
24 | }
25 | public Player(Single posX, Single posY, string nickname, string guild, string alliance, int id)
26 | {
27 | this.posX = posX;
28 | this.posY = posY;
29 | this.nickname = nickname;
30 | this.guild = guild;
31 | this.alliance = alliance;
32 | this.id = id;
33 | }
34 | public override string ToString()
35 | {
36 | return nickname + "(" + id + "):" + guild + " " + alliance + " [" + posX + " " + posY + "]";
37 | }
38 | public Single PosX
39 | {
40 | get { return posX; }
41 | set { posX = value; }
42 | }
43 | public Single PosY
44 | {
45 | get { return posY; }
46 | set { posY = value; }
47 | }
48 | public string Nickname
49 | {
50 | get { return nickname; }
51 | set { nickname = value; }
52 | }
53 | public string Guild
54 | {
55 | get { return guild; }
56 | set { guild = value; }
57 | }
58 | public string Alliance
59 | {
60 | get { return alliance; }
61 | set { alliance = value; }
62 | }
63 | public int Id
64 | {
65 | get { return id; }
66 | set { id = value; }
67 | }
68 |
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/AlbionRadaro/Harvestable/HarvestableType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro
8 | {
9 | public enum HarvestableType
10 | {
11 | WOOD,
12 | WOOD_GIANTTREE,
13 | WOOD_CRITTER_GREEN,
14 | WOOD_CRITTER_RED,
15 | WOOD_CRITTER_DEAD,
16 | WOOD_GUARDIAN_RED,
17 | ROCK,
18 | ROCK_CRITTER_GREEN,
19 | ROCK_CRITTER_RED,
20 | ROCK_CRITTER_DEAD,
21 | ROCK_GUARDIAN_RED,
22 | FIBER,
23 | FIBER_CRITTER,
24 | FIBER_GUARDIAN_RED,
25 | FIBER_GUARDIAN_DEAD,
26 | HIDE,
27 | HIDE_FOREST,
28 | HIDE_STEPPE,
29 | HIDE_SWAMP,
30 | HIDE_MOUNTAIN,
31 | HIDE_HIGHLAND,
32 | HIDE_CRITTER,
33 | HIDE_GUARDIAN,
34 | ORE,
35 | ORE_CRITTER_GREEN,
36 | ORE_CRITTER_RED,
37 | ORE_CRITTER_DEAD,
38 | ORE_GUARDIAN_RED,
39 | DEADRAT,
40 | SILVERCOINS_NODE,
41 | SILVERCOINS_LOOT_STANDARD_TRASH,
42 | SILVERCOINS_LOOT_VETERAN_TRASH,
43 | SILVERCOINS_LOOT_ELITE_TRASH,
44 | SILVERCOINS_LOOT_ROAMING,
45 | SILVERCOINS_LOOT_ROAMING_MINIBOSS,
46 | SILVERCOINS_LOOT_ROAMING_BOSS,
47 | SILVERCOINS_LOOT_STANDARD,
48 | SILVERCOINS_LOOT_VETERAN,
49 | SILVERCOINS_LOOT_ELITE,
50 | SILVERCOINS_LOOT_STANDARD_MINIBOSS,
51 | SILVERCOINS_LOOT_VETERAN_MINIBOSS,
52 | SILVERCOINS_LOOT_ELITE_MINIBOSS,
53 | SILVERCOINS_LOOT_STANDARD_BOSS,
54 | SILVERCOINS_LOOT_VETERAN_BOSS,
55 | SILVERCOINS_LOOT_ELITE_BOSS,
56 | SILVERCOINS_LOOT_CHEST_STANDARD,
57 | SILVERCOINS_LOOT_CHEST_STANDARD_TRASH,
58 | SILVERCOINS_LOOT_CHEST_VETERAN,
59 | SILVERCOINS_LOOT_CHEST_DEMON,
60 | CHEST_EXP_SILVERCOINS_LOOT_STANDARD,
61 | CHEST_EXP_SILVERCOINS_LOOT_VETERAN,
62 | SILVERCOINS_LOOT_SARCOPHAGUS_STANDARD_MINIBOSS,
63 | }
64 | public enum HarvestableMobType
65 | {
66 | ESSENCE,
67 | SWAMP,
68 | STEPPE,
69 | MOUNTAIN,
70 | FOREST,
71 | HIGHLAND
72 |
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NO LONGER WORKS
2 | AO changed a lot since last 3 years. It will never work again
3 |
4 | # AO-Radar
5 |
6 | Albion Online Player and Harvestable Radar
7 |
8 | # Getting Started
9 |
10 | * Download project as source code with git
11 | ```
12 | git clone https://github.com/rafalfigura/AO-Radar.git
13 |
14 | ```
15 | * Launch AlbionRadaro.sln
16 | * Get libs from NuGet
17 | * Update **Photon3DotNet.dll** witch can be found in
18 | ```
19 | game_dir\game\Albion-Online_Data\Managed
20 | ```
21 |
22 | * Compile and Have Fun
23 |
24 | ## Features
25 | [Look at those images](https://imgur.com/a/xRBWGvx)
26 |
27 | * Player radar
28 | * Harvestable radar
29 | * Map on top of game
30 |
31 |
32 | ## Requirements
33 |
34 |
35 | ### WinPcap
36 | This library requires [WinPcap](https://www.winpcap.org/) which comes with [Wireshark](https://www.wireshark.org/).
37 |
38 | ### Photon
39 | Since it's using Photon you also need to download and link [Photon3DotNet.dll](https://www.photonengine.com/sdks#client-csharp).
40 | Alternatively you can also just link `Photon3Unity3D.dll` if you have a Unity based game.
41 |
42 |
43 | ## Troubleshooting
44 |
45 | > System.InvalidOperationException
46 |
47 | Try to reinstall winpcap - thats main reason for that error
48 | Use [this](https://github.com/PcapDotNet/Pcap.Net/wiki/Using-Pcap.Net-in-your-programs) for setup.
49 |
50 | ## Albion Online Version
51 |
52 | This project is for Albion Online 1.12.365. May not work with other releases.
53 |
54 | ## Authors
55 |
56 | * **_BLU** - *A lot of help with networking * - [0blu](https://github.com/0blu)
57 | * **Rafał Figura** - *Initial work* - [Sahee](https://github.com/rafalfigura)
58 |
59 | ## Is This Allowed
60 | ```Our position is quite simple. As long as you just look and analyze we are ok with it. The moment you modify or manipulate something or somehow interfere with our services we will react (e.g. perma-ban, take legal action, whatever```
61 |
62 | ~MadDave, Technical Lead at Sandbox Interactive for Albion Online, [source](https://forum.albiononline.com/index.php/Thread/51604-Is-it-allowed-to-scan-your-internet-trafic-and-pick-up-logs/?postID=512670#post512670)
63 |
64 | * copied from [Albion Online Data](https://www.albion-online-data.com/)
65 | ## License
66 |
67 | This project is licensed under the GNU General Public License v3.0 - see the [LICENSE.md](LICENSE.md) file for details
68 |
69 | ## Acknowledgments
70 |
71 | * Thanks to _BLU for help
72 |
73 | ## Donations
74 |
75 | * *Zcash* t1W7qHQhLagrrHRVdZQv5mFWdBsGRD92wTp
76 | * *Litecoin* LcZQaXibdpLaP3iwp5mzju9EMLDpkrGqsc
77 | * *Ethereum* 0x13dc1967492a01d8b8926d3bcd234443984c77c2
78 |
--------------------------------------------------------------------------------
/AlbionRadaro/MapForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AlbionRadaro
2 | {
3 | partial class MapForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {//
31 | // this.overImage = new System.Windows.Forms.PictureBox();
32 | //((System.ComponentModel.ISupportInitialize)(this.overImage)).BeginInit();
33 | this.SuspendLayout();
34 | //
35 | // overImage
36 | //
37 | // this.overImage.BackColor = System.Drawing.Color.Transparent;
38 | //this.overImage.Location = new System.Drawing.Point(1, 2);
39 | // this.overImage.MaximumSize = new System.Drawing.Size(500, 500);
40 | //this.overImage.MinimumSize = new System.Drawing.Size(500, 500);
41 | // this.overImage.Name = "overImage";
42 | // this.overImage.Size = new System.Drawing.Size(500, 500);
43 | // this.overImage.TabIndex = 2;
44 | // this.overImage.TabStop = false;
45 |
46 | //
47 | // MapForm
48 | //
49 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
50 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
51 | this.BackColor = System.Drawing.SystemColors.Control;
52 | this.ClientSize = new System.Drawing.Size(1113, 502);
53 | this.ControlBox = false;
54 | //this.Controls.Add(this.overImage);
55 | this.ForeColor = System.Drawing.Color.Transparent;
56 | this.MaximizeBox = false;
57 | this.MinimizeBox = false;
58 | this.Name = "MapForm";
59 | this.ShowIcon = false;
60 | this.ShowInTaskbar = false;
61 | this.Text = "MapForm";
62 | this.Load += new System.EventHandler(this.MapForm_Load);
63 | this.Paint += new System.Windows.Forms.PaintEventHandler(this.MapForm_Paint);
64 | //((System.ComponentModel.ISupportInitialize)(this.overImage)).EndInit();
65 | this.ResumeLayout(false);
66 |
67 | }
68 |
69 | #endregion
70 |
71 | // public System.Windows.Forms.PictureBox overImage;
72 |
73 | }
74 | }
--------------------------------------------------------------------------------
/AlbionRadaro/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AlbionRadaro.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AlbionRadaro.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/AlbionRadaro/Win32.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace AlbionRadaro
9 | {
10 | // a static class to expose needed win32 gdi functions.
11 | class Win32
12 | {
13 |
14 | public enum Bool
15 | {
16 | False = 0,
17 | True
18 | };
19 |
20 | [StructLayout(LayoutKind.Sequential)]
21 | public struct Point
22 | {
23 | public Int32 x;
24 | public Int32 y;
25 |
26 | public Point(Int32 x, Int32 y) { this.x = x; this.y = y; }
27 | }
28 |
29 | [StructLayout(LayoutKind.Sequential)]
30 | public struct Size
31 | {
32 | public Int32 cx;
33 | public Int32 cy;
34 |
35 | public Size(Int32 cx, Int32 cy) { this.cx = cx; this.cy = cy; }
36 | }
37 |
38 | [StructLayout(LayoutKind.Sequential, Pack = 1)]
39 | struct ARGB
40 | {
41 | public byte Blue;
42 | public byte Green;
43 | public byte Red;
44 | public byte Alpha;
45 | }
46 |
47 | [StructLayout(LayoutKind.Sequential, Pack = 1)]
48 | public struct BLENDFUNCTION
49 | {
50 | public byte BlendOp;
51 | public byte BlendFlags;
52 | public byte SourceConstantAlpha;
53 | public byte AlphaFormat;
54 | }
55 |
56 |
57 | public const Int32 ULW_COLORKEY = 0x00000001;
58 | public const Int32 ULW_ALPHA = 0x00000002;
59 | public const Int32 ULW_OPAQUE = 0x00000004;
60 |
61 | public const byte AC_SRC_OVER = 0x00;
62 | public const byte AC_SRC_ALPHA = 0x01;
63 |
64 |
65 | [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)]
66 | public static extern Bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, ref Point pptDst, ref Size psize, IntPtr hdcSrc, ref Point pprSrc, Int32 crKey, ref BLENDFUNCTION pblend, Int32 dwFlags);
67 |
68 | [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)]
69 | public static extern IntPtr GetDC(IntPtr hWnd);
70 |
71 | [DllImport("user32.dll", ExactSpelling = true)]
72 | public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
73 |
74 | [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
75 | public static extern IntPtr CreateCompatibleDC(IntPtr hDC);
76 |
77 | [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
78 | public static extern Bool DeleteDC(IntPtr hdc);
79 |
80 | [DllImport("gdi32.dll", ExactSpelling = true)]
81 | public static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject);
82 |
83 | [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
84 | public static extern Bool DeleteObject(IntPtr hObject);
85 |
86 | [DllImport("user32.dll", SetLastError = true)]
87 | public static extern UInt32 GetWindowLong(IntPtr hWnd, int nIndex);
88 |
89 | [DllImport("user32.dll")]
90 | public static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong);
91 |
92 | [DllImport("user32.dll")]
93 | [return: MarshalAs(UnmanagedType.Bool)]
94 | public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
95 | }
96 | }
--------------------------------------------------------------------------------
/AlbionRadaro/Mobs/Mob.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro.Mobs
8 | {
9 | class Mob
10 | {
11 | int id;
12 | int typeId;
13 | Single posX;
14 | Single posY;
15 | int health;
16 | byte enchantmentLevel;
17 | MobInfo mobInfo;
18 |
19 | public Mob(int id, int typeId, Single posX, Single posY, int health, byte enchantmentLevel)
20 | {
21 | this.id = id;
22 | this.typeId = typeId;
23 | this.posX = posX;
24 | this.posY = posY;
25 | this.health = health;
26 | this.enchantmentLevel = enchantmentLevel;
27 | mobInfo = MobInfo.getMobInfo(typeId);
28 | }
29 | public override string ToString()
30 | {
31 | return "id:" + id + " typeId: " + typeId + " posX: " + posX + " posY: " + posY + " health: " + health + " charges: " + enchantmentLevel;
32 | }
33 | public int Id
34 | {
35 | get { return id; }
36 | set { id = value; }
37 | }
38 | public Single PosX
39 | {
40 | get { return posX; }
41 | set { posX = value; }
42 | }
43 | public int TypeId
44 | {
45 | get { return typeId; }
46 | set { typeId = value; }
47 | }
48 | public Single PosY
49 | {
50 | get { return posY; }
51 | set { posY = value; }
52 | }
53 | public int Health
54 | {
55 | get { return health; }
56 | set { health = value; }
57 | }
58 |
59 | public byte EnchantmentLevel
60 | {
61 | get { return enchantmentLevel; }
62 | set { enchantmentLevel = value; }
63 | }
64 |
65 | internal MobInfo MobInfo
66 | {
67 | get { return mobInfo; }
68 | set { mobInfo = value; }
69 | }
70 |
71 |
72 | internal string getMapStringInfo()
73 | {
74 | if (mobInfo != null)
75 | {
76 | if (mobInfo.MobType == MobType.HARVESTABLE)
77 | {
78 | switch (mobInfo.HarvestableMobType)
79 | {
80 | case HarvestableMobType.ESSENCE:
81 | return "E";
82 | case HarvestableMobType.SWAMP:
83 | return "F";
84 | case HarvestableMobType.STEPPE:
85 | return "L";
86 | case HarvestableMobType.MOUNTAIN:
87 | return "O";
88 | case HarvestableMobType.FOREST:
89 | return "W";
90 | case HarvestableMobType.HIGHLAND:
91 | return "R";
92 |
93 | }
94 | }
95 | else if (mobInfo.MobType == MobType.SKINNABLE)
96 | {
97 | return "S";
98 | }
99 | else if (mobInfo.MobType == MobType.OTHER)
100 | {
101 | return "M";
102 | }
103 | }
104 | return "M";
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/AlbionRadaro/PhotonPacketHandler/PhotonPacketHandler.cs:
--------------------------------------------------------------------------------
1 | using ExitGames.Client.Photon;
2 | using PcapDotNet.Packets;
3 | using PcapDotNet.Packets.IpV4;
4 | using PcapDotNet.Packets.Transport;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.IO;
8 | using System.Linq;
9 | using System.Net;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 |
13 | namespace AlbionRadaro
14 | {
15 | class PhotonPacketHandler
16 | {
17 | PacketHandler _eventHandler;
18 | public PhotonPacketHandler(PacketHandler p)
19 | {
20 | this._eventHandler = p;
21 | }
22 | public void PacketHandler(Packet packet)
23 | {
24 | try
25 | {
26 | // Make this static or at least dont create a new Protocol16 for every package
27 | Protocol16 protocol16 = new Protocol16();
28 |
29 | IpV4Datagram ip = packet.Ethernet.IpV4;
30 | UdpDatagram udp = ip.Udp;
31 | if (udp.SourcePort != 5056 && udp.DestinationPort != 5056)
32 | return;
33 |
34 |
35 | var ms = udp.Payload.ToMemoryStream();
36 | var p = new BinaryReader(ms);
37 |
38 | var peerId = IPAddress.NetworkToHostOrder(p.ReadUInt16());
39 | var crcEnabled = p.ReadByte();
40 | var commandCount = p.ReadByte();
41 | var timestamp = IPAddress.NetworkToHostOrder(p.ReadInt32());
42 | var challenge = IPAddress.NetworkToHostOrder(p.ReadInt32());
43 |
44 | var commandHeaderLength = 12;
45 | var signifierByteLength = 1;
46 |
47 | for (int commandIdx = 0; commandIdx < commandCount; commandIdx++)
48 | {
49 |
50 | var commandType = p.ReadByte();
51 | var channelId = p.ReadByte();
52 | var commandFlags = p.ReadByte();
53 | var unkBytes = p.ReadByte();
54 | var commandLength = IPAddress.NetworkToHostOrder(p.ReadInt32());
55 | var sequenceNumber = IPAddress.NetworkToHostOrder(p.ReadInt32());
56 |
57 | switch (commandType)
58 | {
59 | case 4://Disconnect
60 | break;
61 | case 7://Send unreliable
62 | p.BaseStream.Position += 4;
63 | commandLength -= 4;
64 | goto case 6;
65 | case 6://Send reliable
66 | p.BaseStream.Position += signifierByteLength;
67 | var messageType = p.ReadByte();
68 |
69 | var operationLength = commandLength - commandHeaderLength - 2;
70 | var payload = new StreamBuffer(p.ReadBytes(operationLength));
71 | switch (messageType)
72 | {
73 | case 2://Operation Request
74 | var requestData = protocol16.DeserializeOperationRequest(payload);
75 | _eventHandler.OnRequest(requestData.OperationCode, requestData.Parameters);
76 | break;
77 | case 3://Operation Response
78 | var responseData = protocol16.DeserializeOperationResponse(payload);
79 | _eventHandler.OnResponse(responseData.OperationCode, responseData.ReturnCode, responseData.Parameters);
80 | break;
81 | case 4://Event
82 | var eventData = protocol16.DeserializeEventData(payload);
83 | _eventHandler.OnEvent(eventData.Code, eventData.Parameters);
84 | break;
85 | default:
86 | p.BaseStream.Position += operationLength;
87 | break;
88 | }
89 |
90 | break;
91 |
92 | default:
93 | p.BaseStream.Position += commandLength - commandHeaderLength;
94 | break;
95 | }
96 | }
97 | }
98 | catch (Exception e)
99 | {
100 | Console.WriteLine("PackeHandler Exception: " + e.ToString());
101 | }
102 | }
103 | }
104 |
105 | }
--------------------------------------------------------------------------------
/AlbionRadaro/PerPixelAlphaForm.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Thanks to Rui Lopes who did that great job
3 | * https://www.codeproject.com/KB/GDI-plus/perpxalpha_sharp.aspx?msg=853306
4 | */
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Drawing;
8 | using System.Drawing.Imaging;
9 | using System.Linq;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 | using System.Windows.Forms;
13 |
14 | namespace AlbionRadaro
15 | {
16 |
17 | /// PerPixel forms should derive from this base class
18 | /// Rui Godinho Lopesrui@ruilopes.com
19 | public class PerPixelAlphaForm : Form
20 | {
21 | private static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
22 | private const UInt32 SWP_NOSIZE = 0x0001;
23 | private const UInt32 SWP_NOMOVE = 0x0002;
24 | private const UInt32 TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE;
25 | /// Changes the current bitmap.
26 | public void SetBitmap(Bitmap bitmap)
27 | {
28 | SetBitmap(bitmap, 255);
29 | }
30 |
31 | /// Changes the current bitmap with a custom opacity level. Here is where all happens!
32 | public void SetBitmap(Bitmap bitmap, byte opacity)
33 | {
34 | if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
35 | throw new ApplicationException("The bitmap must be 32ppp with alpha-channel.");
36 |
37 | // The ideia of this is very simple,
38 | // 1. Create a compatible DC with screen;
39 | // 2. Select the bitmap with 32bpp with alpha-channel in the compatible DC;
40 | // 3. Call the UpdateLayeredWindow.
41 |
42 | IntPtr screenDc = Win32.GetDC(IntPtr.Zero);
43 | IntPtr memDc = Win32.CreateCompatibleDC(screenDc);
44 | IntPtr hBitmap = IntPtr.Zero;
45 | IntPtr oldBitmap = IntPtr.Zero;
46 |
47 | try
48 | {
49 | hBitmap = bitmap.GetHbitmap(Color.FromArgb(0)); // grab a GDI handle from this GDI+ bitmap
50 | oldBitmap = Win32.SelectObject(memDc, hBitmap);
51 |
52 | Win32.Size size = new Win32.Size(bitmap.Width, bitmap.Height);
53 | Win32.Point pointSource = new Win32.Point(0, 0);
54 | Win32.Point topPos = new Win32.Point(Left, Top);
55 | Win32.BLENDFUNCTION blend = new Win32.BLENDFUNCTION();
56 | blend.BlendOp = Win32.AC_SRC_OVER;
57 | blend.BlendFlags = 0;
58 | blend.SourceConstantAlpha = opacity;
59 | blend.AlphaFormat = Win32.AC_SRC_ALPHA;
60 |
61 | UInt32 initialStyle = Win32.GetWindowLong(Handle, -20);
62 | Win32.SetWindowLong(Handle, -20, initialStyle | 0x80000 | 0x20);
63 |
64 | Win32.UpdateLayeredWindow(Handle, screenDc, ref topPos, ref size, memDc, ref pointSource, 0, ref blend, Win32.ULW_ALPHA);
65 | // TopMost = true;
66 | // Win32.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS);
67 | }
68 | finally
69 | {
70 | Win32.ReleaseDC(IntPtr.Zero, screenDc);
71 | if (hBitmap != IntPtr.Zero)
72 | {
73 | Win32.SelectObject(memDc, oldBitmap);
74 | //Windows.DeleteObject(hBitmap); // The documentation says that we have to use the Windows.DeleteObject... but since there is no such method I use the normal DeleteObject from Win32 GDI and it's working fine without any resource leak.
75 | Win32.DeleteObject(hBitmap);
76 | }
77 | Win32.DeleteDC(memDc);
78 | bitmap.Dispose();
79 | }
80 | }
81 |
82 | private const int WS_EX_TOPMOST = 0x00000008;
83 | protected override CreateParams CreateParams
84 | {
85 | get
86 | {
87 | CreateParams cp = base.CreateParams;
88 | cp.ExStyle = cp.ExStyle | 0x00080000 // This form has to have the WS_EX_LAYERED extended style
89 | | WS_EX_TOPMOST;
90 | return cp;
91 | }
92 | }
93 |
94 | private void InitializeComponent()
95 | {
96 | this.SuspendLayout();
97 | //
98 | // PerPixelAlphaForm
99 | //
100 | this.ClientSize = new System.Drawing.Size(284, 261);
101 | this.Name = "PerPixelAlphaForm";
102 | this.Load += new System.EventHandler(this.PerPixelAlphaForm_Load);
103 | this.ResumeLayout(false);
104 |
105 | }
106 |
107 | private void PerPixelAlphaForm_Load(object sender, EventArgs e)
108 | {
109 |
110 | }
111 | }
112 | }
--------------------------------------------------------------------------------
/AlbionRadaro/AppSettings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | False
7 |
8 |
9 | False
10 |
11 |
12 | False
13 |
14 |
15 | False
16 |
17 |
18 | False
19 |
20 |
21 | False
22 |
23 |
24 | False
25 |
26 |
27 | False
28 |
29 |
30 | False
31 |
32 |
33 | False
34 |
35 |
36 | False
37 |
38 |
39 | True
40 |
41 |
42 | True
43 |
44 |
45 | True
46 |
47 |
48 | True
49 |
50 |
51 | True
52 |
53 |
54 | True
55 |
56 |
57 | True
58 |
59 |
60 | True
61 |
62 |
63 | True
64 |
65 |
66 | True
67 |
68 |
69 | False
70 |
71 |
72 | False
73 |
74 |
75 | False
76 |
77 |
78 | False
79 |
80 |
81 | False
82 |
83 |
84 | False
85 |
86 |
87 | False
88 |
89 |
90 | False
91 |
92 |
93 | False
94 |
95 |
96 | False
97 |
98 |
99 | 0
100 |
101 |
102 | 0
103 |
104 |
105 |
--------------------------------------------------------------------------------
/AlbionRadaro/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | False
16 |
17 |
18 | False
19 |
20 |
21 | False
22 |
23 |
24 | False
25 |
26 |
27 | False
28 |
29 |
30 | False
31 |
32 |
33 | False
34 |
35 |
36 | False
37 |
38 |
39 | False
40 |
41 |
42 | False
43 |
44 |
45 | False
46 |
47 |
48 | True
49 |
50 |
51 | True
52 |
53 |
54 | True
55 |
56 |
57 | True
58 |
59 |
60 | True
61 |
62 |
63 | True
64 |
65 |
66 | True
67 |
68 |
69 | True
70 |
71 |
72 | True
73 |
74 |
75 | True
76 |
77 |
78 | False
79 |
80 |
81 | False
82 |
83 |
84 | False
85 |
86 |
87 | False
88 |
89 |
90 | False
91 |
92 |
93 | False
94 |
95 |
96 | False
97 |
98 |
99 | False
100 |
101 |
102 | False
103 |
104 |
105 | False
106 |
107 |
108 | 0
109 |
110 |
111 | 0
112 |
113 |
114 |
115 |
116 | false
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/AlbionRadaro/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/AlbionRadaro/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/AlbionRadaro/MapForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/AlbionRadaro/PerPixelAlphaForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/AlbionRadaro/Settings.cs:
--------------------------------------------------------------------------------
1 | using AlbionRadaro.Mobs;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace AlbionRadaro
9 | {
10 | public static class Settings
11 | {
12 | static List tiers = new List();
13 | static List harvestable = new List();
14 | static List mobs = new List();
15 | static bool onlyRares = false;
16 | static bool displayPeople = true;
17 | static bool soundsOnPlayer = false;
18 |
19 | public static void saveSettings(Form1 form){
20 | AppSettings s = new AppSettings();
21 |
22 | s.T123 = form.cbTier1230.Checked;
23 | s.T40 = form.cbTier40.Checked;
24 | s.T41 = form.cbTier41.Checked;
25 | s.T42 = form.cbTier42.Checked;
26 | s.T43 = form.cbTier43.Checked;
27 | s.T50 = form.cbTier50.Checked;
28 | s.T51 = form.cbTier51.Checked;
29 | s.T52 = form.cbTier52.Checked;
30 | s.T53 = form.cbTier53.Checked;
31 | s.T60 = form.cbTier60.Checked;
32 | s.T61 = form.cbTier61.Checked;
33 | s.T62 = form.cbTier62.Checked;
34 | s.T63 = form.cbTier63.Checked;
35 | s.T70 = form.cbTier70.Checked;
36 | s.T71 = form.cbTier71.Checked;
37 | s.T72 = form.cbTier72.Checked;
38 | s.T73 = form.cbTier73.Checked;
39 | s.T80 = form.cbTier80.Checked;
40 | s.T81 = form.cbTier81.Checked;
41 | s.T82 = form.cbTier82.Checked;
42 | s.T83 = form.cbTier83.Checked;
43 | s.rFiber = form.cbFiber.Checked;
44 | s.rWood = form.cbWood.Checked;
45 | s.rOre = form.cbOre.Checked;
46 | s.rRock = form.cbRock.Checked;
47 |
48 | s.rOtherMobs = form.cbOtherMobs.Checked;
49 | s.rHarvestableMob = form.cbHarvestable.Checked;
50 | s.rSkinnableMob = form.cbSkinnable.Checked;
51 |
52 | s.rTreasures = form.cbTreasures.Checked;
53 | s.rSoundOnPlayer = form.cbSounds.Checked;
54 |
55 | s.radarX = (int)form.nRadarX.Value;
56 | s.radarY = (int)form.nRadarY.Value;
57 | s.Save();
58 |
59 | }
60 | public static void loadSettings(Form1 form)
61 | {
62 | AppSettings s = new AppSettings();
63 |
64 | form.cbTier1230.Checked = s.T123;
65 | form.cbTier40.Checked = s.T40;
66 | form.cbTier41.Checked = s.T41;
67 | form.cbTier42.Checked = s.T42;
68 | form.cbTier43.Checked = s.T43;
69 | form.cbTier50.Checked = s.T50;
70 | form.cbTier51.Checked = s.T51;
71 | form.cbTier52.Checked = s.T52;
72 | form.cbTier53.Checked = s.T53;
73 | form.cbTier60.Checked = s.T60;
74 | form.cbTier61.Checked = s.T61;
75 | form.cbTier62.Checked = s.T62;
76 | form.cbTier63.Checked = s.T63;
77 | form.cbTier70.Checked = s.T70;
78 | form.cbTier71.Checked = s.T71;
79 | form.cbTier72.Checked = s.T72;
80 | form.cbTier73.Checked = s.T73;
81 | form.cbTier80.Checked = s.T80;
82 | form.cbTier81.Checked = s.T81;
83 | form.cbTier82.Checked = s.T82;
84 | form.cbTier83.Checked = s.T83;
85 | form.cbFiber.Checked = s.rFiber;
86 | form.cbWood.Checked = s.rWood;
87 | form.cbOre.Checked = s.rOre ;
88 | form.cbSkinnable.Checked = s.rOtherMobs;
89 | form.cbRock.Checked = s.rRock;
90 | form.cbOtherMobs.Checked = s.rHarvestableMob;
91 | form.cbHarvestable.Checked = s.rSkinnableMob;
92 | form.cbTreasures.Checked = s.rTreasures;
93 | form.cbSounds.Checked = s.rSoundOnPlayer;
94 | form.nRadarX.Value = s.radarX;
95 | form.nRadarY.Value = s.radarY;
96 | }
97 | public static bool DisplayPeople
98 | {
99 | get { return Settings.displayPeople; }
100 | set { Settings.displayPeople = value; }
101 | }
102 |
103 | public static bool PlaySoundOnPlayer()
104 | {
105 | return soundsOnPlayer;
106 | }
107 | public static void UpdateDisplayPeople(bool val)
108 | {
109 | displayPeople = val;
110 | }
111 | public static bool IsInTiers(byte tier, byte enchant)
112 | {
113 | return tiers.Contains(tier+"."+enchant);
114 | }
115 | public static bool IsInMobs(MobType mobType)
116 | {
117 | return mobs.Contains(mobType);
118 | }
119 | public static bool OnlyRares()
120 | {
121 | return onlyRares;
122 | }
123 | public static bool IsInHarvestable(HarvestableType ht)
124 | {
125 | return harvestable.Contains(ht);
126 | }
127 |
128 | public static void UpdateTier(int tier, byte enchant, bool show)
129 | {
130 | byte bTier = (byte) tier;
131 | String iString = tier + "." + enchant;
132 | if(show){
133 | if (!tiers.Contains(iString))
134 | tiers.Add(iString);
135 | }else{
136 | if (tiers.Contains(iString))
137 | tiers.Remove(iString);
138 | }
139 | }
140 |
141 | public static void UpdateHarvestable(List h, bool show)
142 | {
143 | if(show){
144 | foreach(HarvestableType ht in h)
145 | if (!harvestable.Contains(ht))
146 | harvestable.Add(ht);
147 | }
148 | else
149 | {
150 | foreach (HarvestableType ht in h)
151 | if (harvestable.Contains(ht))
152 | harvestable.Remove(ht);
153 | }
154 | }
155 |
156 | public static void UpdateHarvestableMob(MobType h, bool show)
157 | {
158 | if (show)
159 | {
160 | if (!mobs.Contains(h))
161 | mobs.Add(h);
162 | }
163 | else
164 | {
165 | if (mobs.Contains(h))
166 | mobs.Remove(h);
167 | }
168 | }
169 |
170 | internal static void UpdateOnlyRares(bool raresOnly)
171 | {
172 | onlyRares = raresOnly;
173 | }
174 |
175 | internal static void setSoundsOnPlayer(bool p)
176 | {
177 | soundsOnPlayer = p;
178 | }
179 |
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/AlbionRadaro/AlbionRadaro.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {B2402084-D713-410E-AD73-2D6CAABF32EC}
8 | Exe
9 | Properties
10 | AlbionRadaro
11 | AlbionRadaro
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 | AlbionRadaro.Program
36 |
37 |
38 | true
39 |
40 |
41 | favicon.ico
42 |
43 |
44 |
45 | C:\Users\Rafal\Desktop\Albion.Common.dll
46 |
47 |
48 | C:\Users\Rafal\Desktop\Nowy folder\PcapDotNet.Base.dll
49 |
50 |
51 | C:\Users\Rafal\Desktop\Nowy folder\PcapDotNet.Core.dll
52 |
53 |
54 | C:\Users\Rafal\Desktop\Nowy folder\PcapDotNet.Core.Extensions.dll
55 |
56 |
57 | C:\Users\Rafal\Desktop\Nowy folder\PcapDotNet.Packets.dll
58 |
59 |
60 | C:\Users\Rafal\Desktop\Nowy folder\Photon3DotNet.dll
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | Form
77 |
78 |
79 | Form1.cs
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | Form
89 |
90 |
91 | MapForm.cs
92 |
93 |
94 |
95 |
96 |
97 |
98 | Form
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | True
109 | True
110 | AppSettings.settings
111 |
112 |
113 |
114 | Form1.cs
115 |
116 |
117 | MapForm.cs
118 |
119 |
120 | PerPixelAlphaForm.cs
121 |
122 |
123 | ResXFileCodeGenerator
124 | Resources.Designer.cs
125 | Designer
126 |
127 |
128 | True
129 | Resources.resx
130 |
131 |
132 | SettingsSingleFileGenerator
133 | Settings.Designer.cs
134 |
135 |
136 | True
137 | Settings.settings
138 | True
139 |
140 |
141 | SettingsSingleFileGenerator
142 | AppSettings.Designer.cs
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
160 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | AlbionRadaro/[Dd]ebug/
17 | AlbionRadaro/[Dd]ebugPublic/
18 | AlbionRadaro/[Rr]elease/
19 | AlbionRadaro/[Rr]eleases/
20 | AlbionRadaro/x64/
21 | AlbionRadaro/x86/
22 | AlbionRadaro/bld/
23 | AlbionRadaro/[Bb]in/
24 | AlbionRadaro/[Oo]bj/
25 | AlbionRadaro/[Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | AlbionRadaro/[Dd]ebugPS/
45 | AlbionRadaro/[Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
331 |
--------------------------------------------------------------------------------
/AlbionRadaro/Mobs/MobInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro.Mobs
8 | {
9 | class MobInfo
10 | {
11 | public static List mobsInfo = new List(new MobInfo[] {
12 | new MobInfo(9,1, MobType.SKINNABLE),
13 | new MobInfo(9,1,MobType.SKINNABLE),
14 | new MobInfo(16,1,MobType.SKINNABLE),
15 | new MobInfo(17,1,MobType.SKINNABLE),
16 | new MobInfo(18,1,MobType.SKINNABLE),
17 | new MobInfo(19,1,MobType.SKINNABLE),
18 | new MobInfo(20,1,MobType.SKINNABLE),
19 | new MobInfo(21,1,MobType.SKINNABLE),
20 | new MobInfo(22,1,MobType.SKINNABLE),
21 | new MobInfo(23,2,MobType.SKINNABLE),
22 | new MobInfo(24,3,MobType.SKINNABLE),
23 | new MobInfo(25,4,MobType.SKINNABLE),
24 | new MobInfo(26,5,MobType.SKINNABLE),
25 | new MobInfo(27,6,MobType.SKINNABLE),
26 | new MobInfo(28,7,MobType.SKINNABLE),
27 | new MobInfo(29,8,MobType.SKINNABLE),
28 | new MobInfo(30,1,MobType.SKINNABLE),
29 | new MobInfo(31,2,MobType.SKINNABLE),
30 | new MobInfo(32,3,MobType.SKINNABLE),
31 | new MobInfo(34,5,MobType.SKINNABLE),
32 | new MobInfo(36,1,MobType.SKINNABLE),
33 | new MobInfo(37,2,MobType.SKINNABLE),
34 | new MobInfo(38,3,MobType.SKINNABLE),
35 | new MobInfo(41,6,MobType.SKINNABLE),
36 | new MobInfo(42,7,MobType.SKINNABLE),
37 | new MobInfo(43,8,MobType.SKINNABLE),
38 | new MobInfo(44,1,MobType.SKINNABLE),
39 | new MobInfo(45,1,MobType.SKINNABLE),
40 | new MobInfo(46,6,MobType.HARVESTABLE,HarvestableMobType.ESSENCE),
41 | new MobInfo(47,6,MobType.HARVESTABLE,HarvestableMobType.ESSENCE),
42 | new MobInfo(48,3,MobType.HARVESTABLE,HarvestableMobType.SWAMP),
43 | new MobInfo(49,5,MobType.HARVESTABLE,HarvestableMobType.SWAMP),
44 | new MobInfo(50,7,MobType.HARVESTABLE,HarvestableMobType.SWAMP),
45 | new MobInfo(51,6,MobType.HARVESTABLE,HarvestableMobType.SWAMP),
46 | new MobInfo(52,3,MobType.HARVESTABLE,HarvestableMobType.STEPPE),
47 | new MobInfo(53,5,MobType.HARVESTABLE,HarvestableMobType.STEPPE),
48 | new MobInfo(54,7,MobType.HARVESTABLE,HarvestableMobType.STEPPE),
49 | new MobInfo(55,6,MobType.HARVESTABLE,HarvestableMobType.STEPPE),
50 | new MobInfo(56,3,MobType.HARVESTABLE,HarvestableMobType.MOUNTAIN),
51 | new MobInfo(57,3,MobType.HARVESTABLE,HarvestableMobType.MOUNTAIN),
52 | new MobInfo(58,5,MobType.HARVESTABLE,HarvestableMobType.MOUNTAIN),
53 | new MobInfo(59,5,MobType.HARVESTABLE,HarvestableMobType.MOUNTAIN),
54 | new MobInfo(60,7,MobType.HARVESTABLE,HarvestableMobType.MOUNTAIN),
55 | new MobInfo(61,6,MobType.HARVESTABLE,HarvestableMobType.MOUNTAIN),
56 | new MobInfo(62,3,MobType.HARVESTABLE,HarvestableMobType.FOREST),
57 | new MobInfo(63,3,MobType.HARVESTABLE,HarvestableMobType.FOREST),
58 | new MobInfo(64,5,MobType.HARVESTABLE,HarvestableMobType.FOREST),
59 | new MobInfo(65,5,MobType.HARVESTABLE,HarvestableMobType.FOREST),
60 | new MobInfo(66,7,MobType.HARVESTABLE,HarvestableMobType.FOREST),
61 | new MobInfo(67,6,MobType.HARVESTABLE,HarvestableMobType.FOREST),
62 | new MobInfo(68,3,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
63 | new MobInfo(69,3,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
64 | new MobInfo(70,5,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
65 | new MobInfo(71,5,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
66 | new MobInfo(72,7,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
67 | new MobInfo(73,6,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
68 | new MobInfo(74,6,MobType.HARVESTABLE,HarvestableMobType.HIGHLAND),
69 | new MobInfo(419,1,MobType.SKINNABLE),
70 | new MobInfo(420,1,MobType.SKINNABLE),
71 | new MobInfo(75, 2,MobType.RESOURCE),
72 | new MobInfo(76, 3,MobType.RESOURCE),
73 | new MobInfo(77, 4,MobType.RESOURCE),
74 | new MobInfo(78, 5,MobType.RESOURCE),
75 | new MobInfo(79, 6,MobType.RESOURCE),
76 | new MobInfo(80, 7,MobType.RESOURCE),
77 | new MobInfo(81, 8,MobType.RESOURCE),
78 | new MobInfo(82, 4,MobType.RESOURCE),
79 | new MobInfo(83, 4,MobType.RESOURCE),
80 | new MobInfo(84, 4,MobType.RESOURCE),
81 | new MobInfo(85, 4,MobType.RESOURCE),
82 | new MobInfo(86, 4,MobType.RESOURCE),
83 | new MobInfo(87, 5,MobType.RESOURCE),
84 | new MobInfo(88, 5,MobType.RESOURCE),
85 | new MobInfo(89, 5,MobType.RESOURCE),
86 | new MobInfo(90, 5,MobType.RESOURCE),
87 | new MobInfo(91, 5,MobType.RESOURCE),
88 | new MobInfo(92, 6,MobType.RESOURCE),
89 | new MobInfo(93, 6,MobType.RESOURCE),
90 | new MobInfo(94, 6,MobType.RESOURCE),
91 | new MobInfo(95, 6,MobType.RESOURCE),
92 | new MobInfo(96, 6,MobType.RESOURCE),
93 | new MobInfo(97, 7,MobType.RESOURCE),
94 | new MobInfo(98, 7,MobType.RESOURCE),
95 | new MobInfo(99, 7,MobType.RESOURCE),
96 | new MobInfo(100,7,MobType.RESOURCE),
97 | new MobInfo(101,7,MobType.RESOURCE),
98 | new MobInfo(102,8,MobType.RESOURCE),
99 | new MobInfo(103,8,MobType.RESOURCE),
100 | new MobInfo(104,8,MobType.RESOURCE),
101 | new MobInfo(105,8,MobType.RESOURCE),
102 | new MobInfo(106,8,MobType.RESOURCE),
103 | new MobInfo(107,2,MobType.RESOURCE),
104 | new MobInfo(108,3,MobType.RESOURCE),
105 | new MobInfo(109,4,MobType.RESOURCE),
106 | new MobInfo(110,5,MobType.RESOURCE),
107 | new MobInfo(111,6,MobType.RESOURCE),
108 | new MobInfo(112,7,MobType.RESOURCE),
109 | new MobInfo(113,8,MobType.RESOURCE),
110 | new MobInfo(114,2,MobType.RESOURCE),
111 | new MobInfo(115,3,MobType.RESOURCE),
112 | new MobInfo(116,4,MobType.RESOURCE),
113 | new MobInfo(117,5,MobType.RESOURCE),
114 | new MobInfo(118,6,MobType.RESOURCE),
115 | new MobInfo(119,7,MobType.RESOURCE),
116 | new MobInfo(120,8,MobType.RESOURCE),
117 | new MobInfo(121,2,MobType.RESOURCE),
118 | new MobInfo(122,3,MobType.RESOURCE),
119 | new MobInfo(123,4,MobType.RESOURCE),
120 | new MobInfo(124,5,MobType.RESOURCE),
121 | new MobInfo(125,6,MobType.RESOURCE),
122 | new MobInfo(126,2,MobType.RESOURCE),
123 | new MobInfo(127,3,MobType.RESOURCE),
124 | new MobInfo(128,4,MobType.RESOURCE),
125 | new MobInfo(129,5,MobType.RESOURCE),
126 | new MobInfo(130,6,MobType.RESOURCE),
127 | new MobInfo(131,2,MobType.RESOURCE),
128 | new MobInfo(132,3,MobType.RESOURCE),
129 | new MobInfo(133,4,MobType.RESOURCE),
130 | new MobInfo(134,5,MobType.RESOURCE),
131 | new MobInfo(135,6,MobType.RESOURCE)
132 | });
133 |
134 | int id;
135 | byte tier;
136 | MobType mobType;
137 | HarvestableMobType harvestableMobType;
138 |
139 | private MobInfo(int id, byte tier, MobType mobType)
140 | {
141 | this.id = id;
142 | this.tier = tier;
143 | this.mobType = mobType;
144 | }
145 | private MobInfo(int id, byte tier, MobType mobType, HarvestableMobType harvestableMobType)
146 | {
147 | this.id = id;
148 | this.tier = tier;
149 | this.mobType = mobType;
150 | this.harvestableMobType = harvestableMobType;
151 | }
152 | public override string ToString()
153 | {
154 | return "id: " + id + " tier: " + tier + " mobType: " + mobType;
155 | }
156 | internal MobType MobType
157 | {
158 | get { return mobType; }
159 | set { mobType = value; }
160 | }
161 | public byte Tier
162 | {
163 | get { return tier; }
164 | set { tier = value; }
165 | }
166 | public HarvestableMobType HarvestableMobType
167 | {
168 | get { return harvestableMobType; }
169 | set { harvestableMobType = value; }
170 | }
171 |
172 | public static MobInfo getMobInfo(int mobId){
173 | foreach (MobInfo i in mobsInfo)
174 | if (i.id == mobId)
175 | return i;
176 | return null;
177 | //return mobsInfo.Find(m => m.id == mobId);
178 | }
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/AlbionRadaro/Harvestable/Harvestable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace AlbionRadaro
7 | {
8 | class Harvestable
9 | {
10 | private int id;
11 | private byte type;
12 | private byte tier;
13 | private Single posX;
14 | private Single posY;
15 | private byte charges;
16 | private byte size;
17 |
18 | public Harvestable(int id, byte type, byte tier, Single posX, Single posY, byte charges, byte size)
19 | {
20 | this.id = id;
21 | this.type = type;
22 | this.tier = tier;
23 | this.posX = posX;
24 | this.posY = posY;
25 | this.charges = charges;
26 | this.size = size;
27 | }
28 | public override string ToString()
29 | {
30 | return "id: " + id + " type:" + (HarvestableType)type + " tier: " + tier + " Size: " + size + " posX:" + posX + " posY: " + posY + " charges: " + charges;
31 | }
32 |
33 | public Single PosX
34 | {
35 | get { return posX; }
36 | set { posX = value; }
37 | }
38 | public Single PosY
39 | {
40 | get { return posY; }
41 | set { posY = value; }
42 | }
43 | public int Id
44 | {
45 | get { return id; }
46 | }
47 |
48 | public byte Type
49 | {
50 | get { return type; }
51 | set { type = value; }
52 | }
53 |
54 | public byte Tier
55 | {
56 | get { return tier; }
57 | set { tier = value; }
58 | }
59 |
60 | public byte Charges
61 | {
62 | get { return charges; }
63 | set { charges = value; }
64 | }
65 | public string GetInfo()
66 | {
67 | return (HarvestableType)type + " T: " + tier;
68 | }
69 | public byte Size
70 | {
71 | get { return size; }
72 | set { size = value; }
73 | }
74 | public static string getMapStringInfo(HarvestableType type)
75 | {
76 | switch (type)
77 | {
78 | case HarvestableType.WOOD:
79 | case HarvestableType.WOOD_GIANTTREE:
80 | case HarvestableType.WOOD_CRITTER_GREEN:
81 | case HarvestableType.WOOD_CRITTER_RED:
82 | case HarvestableType.WOOD_CRITTER_DEAD:
83 | case HarvestableType.WOOD_GUARDIAN_RED:
84 | return "W";
85 | case HarvestableType.ROCK:
86 | case HarvestableType.ROCK_CRITTER_GREEN:
87 | case HarvestableType.ROCK_CRITTER_RED:
88 | case HarvestableType.ROCK_CRITTER_DEAD:
89 | case HarvestableType.ROCK_GUARDIAN_RED:
90 | return "R";
91 | case HarvestableType.FIBER:
92 | case HarvestableType.FIBER_CRITTER:
93 | case HarvestableType.FIBER_GUARDIAN_RED:
94 | case HarvestableType.FIBER_GUARDIAN_DEAD:
95 | return "F";
96 | case HarvestableType.HIDE:
97 | case HarvestableType.HIDE_FOREST:
98 | case HarvestableType.HIDE_STEPPE:
99 | case HarvestableType.HIDE_SWAMP:
100 | case HarvestableType.HIDE_MOUNTAIN:
101 | case HarvestableType.HIDE_HIGHLAND:
102 | case HarvestableType.HIDE_CRITTER:
103 | case HarvestableType.HIDE_GUARDIAN:
104 | return "H";
105 | case HarvestableType.ORE:
106 | case HarvestableType.ORE_CRITTER_GREEN:
107 | case HarvestableType.ORE_CRITTER_RED:
108 | case HarvestableType.ORE_CRITTER_DEAD:
109 | case HarvestableType.ORE_GUARDIAN_RED:
110 | return "O";
111 | case HarvestableType.DEADRAT:
112 | return "DEAD_RAT";
113 | case HarvestableType.SILVERCOINS_NODE:
114 | case HarvestableType.SILVERCOINS_LOOT_STANDARD_TRASH:
115 | case HarvestableType.SILVERCOINS_LOOT_VETERAN_TRASH:
116 | case HarvestableType.SILVERCOINS_LOOT_ELITE_TRASH:
117 | case HarvestableType.SILVERCOINS_LOOT_ROAMING:
118 | case HarvestableType.SILVERCOINS_LOOT_ROAMING_MINIBOSS:
119 | case HarvestableType.SILVERCOINS_LOOT_ROAMING_BOSS:
120 | case HarvestableType.SILVERCOINS_LOOT_STANDARD:
121 | case HarvestableType.SILVERCOINS_LOOT_VETERAN:
122 | case HarvestableType.SILVERCOINS_LOOT_ELITE:
123 | case HarvestableType.SILVERCOINS_LOOT_STANDARD_MINIBOSS:
124 | case HarvestableType.SILVERCOINS_LOOT_VETERAN_MINIBOSS:
125 | case HarvestableType.SILVERCOINS_LOOT_ELITE_MINIBOSS:
126 | case HarvestableType.SILVERCOINS_LOOT_STANDARD_BOSS:
127 | case HarvestableType.SILVERCOINS_LOOT_VETERAN_BOSS:
128 | case HarvestableType.SILVERCOINS_LOOT_ELITE_BOSS:
129 | case HarvestableType.SILVERCOINS_LOOT_CHEST_STANDARD:
130 | case HarvestableType.SILVERCOINS_LOOT_CHEST_STANDARD_TRASH:
131 | case HarvestableType.SILVERCOINS_LOOT_CHEST_VETERAN:
132 | case HarvestableType.SILVERCOINS_LOOT_CHEST_DEMON:
133 | case HarvestableType.SILVERCOINS_LOOT_SARCOPHAGUS_STANDARD_MINIBOSS:
134 | return "SILVER";
135 | case HarvestableType.CHEST_EXP_SILVERCOINS_LOOT_STANDARD:
136 | case HarvestableType.CHEST_EXP_SILVERCOINS_LOOT_VETERAN:
137 | return "CHEST";
138 | default:
139 | return "ERR" + type;
140 | }
141 | }
142 | public string getMapInfo()
143 | {
144 | switch ((HarvestableType)type)
145 | {
146 | case HarvestableType.WOOD:
147 | case HarvestableType.WOOD_GIANTTREE:
148 | case HarvestableType.WOOD_CRITTER_GREEN:
149 | case HarvestableType.WOOD_CRITTER_RED:
150 | case HarvestableType.WOOD_CRITTER_DEAD:
151 | case HarvestableType.WOOD_GUARDIAN_RED:
152 | return "W";
153 | case HarvestableType.ROCK:
154 | case HarvestableType.ROCK_CRITTER_GREEN:
155 | case HarvestableType.ROCK_CRITTER_RED:
156 | case HarvestableType.ROCK_CRITTER_DEAD:
157 | case HarvestableType.ROCK_GUARDIAN_RED:
158 | return "R";
159 | case HarvestableType.FIBER:
160 | case HarvestableType.FIBER_CRITTER:
161 | case HarvestableType.FIBER_GUARDIAN_RED:
162 | case HarvestableType.FIBER_GUARDIAN_DEAD:
163 | return "F";
164 | case HarvestableType.HIDE:
165 | case HarvestableType.HIDE_FOREST:
166 | case HarvestableType.HIDE_STEPPE:
167 | case HarvestableType.HIDE_SWAMP:
168 | case HarvestableType.HIDE_MOUNTAIN:
169 | case HarvestableType.HIDE_HIGHLAND:
170 | case HarvestableType.HIDE_CRITTER:
171 | case HarvestableType.HIDE_GUARDIAN:
172 | return "H";
173 | case HarvestableType.ORE:
174 | case HarvestableType.ORE_CRITTER_GREEN:
175 | case HarvestableType.ORE_CRITTER_RED:
176 | case HarvestableType.ORE_CRITTER_DEAD:
177 | case HarvestableType.ORE_GUARDIAN_RED:
178 | return "O";
179 | case HarvestableType.DEADRAT:
180 | return "DEAD_RAT";
181 | case HarvestableType.SILVERCOINS_NODE:
182 | case HarvestableType.SILVERCOINS_LOOT_STANDARD_TRASH:
183 | case HarvestableType.SILVERCOINS_LOOT_VETERAN_TRASH:
184 | case HarvestableType.SILVERCOINS_LOOT_ELITE_TRASH:
185 | case HarvestableType.SILVERCOINS_LOOT_ROAMING:
186 | case HarvestableType.SILVERCOINS_LOOT_ROAMING_MINIBOSS:
187 | case HarvestableType.SILVERCOINS_LOOT_ROAMING_BOSS:
188 | case HarvestableType.SILVERCOINS_LOOT_STANDARD:
189 | case HarvestableType.SILVERCOINS_LOOT_VETERAN:
190 | case HarvestableType.SILVERCOINS_LOOT_ELITE:
191 | case HarvestableType.SILVERCOINS_LOOT_STANDARD_MINIBOSS:
192 | case HarvestableType.SILVERCOINS_LOOT_VETERAN_MINIBOSS:
193 | case HarvestableType.SILVERCOINS_LOOT_ELITE_MINIBOSS:
194 | case HarvestableType.SILVERCOINS_LOOT_STANDARD_BOSS:
195 | case HarvestableType.SILVERCOINS_LOOT_VETERAN_BOSS:
196 | case HarvestableType.SILVERCOINS_LOOT_ELITE_BOSS:
197 | case HarvestableType.SILVERCOINS_LOOT_CHEST_STANDARD:
198 | case HarvestableType.SILVERCOINS_LOOT_CHEST_STANDARD_TRASH:
199 | case HarvestableType.SILVERCOINS_LOOT_CHEST_VETERAN:
200 | case HarvestableType.SILVERCOINS_LOOT_CHEST_DEMON:
201 | case HarvestableType.SILVERCOINS_LOOT_SARCOPHAGUS_STANDARD_MINIBOSS:
202 | return "SILVER";
203 | case HarvestableType.CHEST_EXP_SILVERCOINS_LOOT_STANDARD:
204 | case HarvestableType.CHEST_EXP_SILVERCOINS_LOOT_VETERAN:
205 | return "CHEST";
206 | default:
207 | return "ERR"+type;
208 | }
209 | }
210 |
211 | }
212 | }
213 |
--------------------------------------------------------------------------------
/AlbionRadaro/AOEnums/EventCodes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro
8 | {
9 | public enum EventCodes
10 | {
11 | None = 0,
12 | Leave = 1,
13 | JoinFinished = 2,
14 | Move = 3,
15 | Teleport = 4,
16 | ChangeEquipment = 5,
17 | HealthUpdate = 6,
18 | EnergyUpdate = 7,
19 | DamageShieldUpdate = 8,
20 | CraftingFocusUpdate = 9,
21 | ActiveSpellEffectsUpdate = 10,
22 | ResetCooldowns = 11,
23 | Attack = 12,
24 | CastStart = 13,
25 | CastCancel = 14,
26 | CastTimeUpdate = 15,
27 | CastFinished = 16,
28 | CastSpell = 17,
29 | CastHit = 18,
30 | ChannelingEnded = 19,
31 | AttackBuilding = 20,
32 | InventoryPutItem = 21,
33 | InventoryDeleteItem = 22,
34 | NewCharacter = 23,
35 | NewEquipmentItem = 24,
36 | NewSimpleItem = 25,
37 | NewFurnitureItem = 26,
38 | NewJournalItem = 27,
39 | NewSimpleHarvestableObject = 28,
40 | NewSimpleHarvestableObjectList = 29,
41 | NewHarvestableObject = 30,
42 | NewSilverObject = 31,
43 | NewBuilding = 32,
44 | HarvestableChangeState = 33,
45 | MobChangeState = 34,
46 | FactionBuildingInfo = 35,
47 | CraftBuildingInfo = 36,
48 | RepairBuildingInfo = 37,
49 | MeldBuildingInfo = 38,
50 | ConstructionSiteInfo = 39,
51 | PlayerBuildingInfo = 40,
52 | FarmBuildingInfo = 41,
53 | LaborerObjectInfo = 42,
54 | LaborerObjectJobInfo = 43,
55 | MarketPlaceBuildingInfo = 44,
56 | HarvestStart = 45,
57 | HarvestCancel = 46,
58 | HarvestFinished = 47,
59 | TakeSilver = 48,
60 | ActionOnBuildingStart = 49,
61 | ActionOnBuildingCancel = 50,
62 | ActionOnBuildingFinished = 51,
63 | ItemRerollQualityStart = 52,
64 | ItemRerollQualityCancel = 53,
65 | ItemRerollQualityFinished = 54,
66 | InstallResourceStart = 55,
67 | InstallResourceCancel = 56,
68 | InstallResourceFinished = 57,
69 | CraftItemFinished = 58,
70 | LogoutCancel = 59,
71 | ChatMessage = 60,
72 | ChatSay = 61,
73 | ChatWhisper = 62,
74 | PlayEmote = 63,
75 | StopEmote = 64,
76 | SystemMessage = 65,
77 | UpdateMoney = 66,
78 | UpdateFame = 67,
79 | UpdateLearningPoints = 68,
80 | UpdateReSpecPoints = 69,
81 | UpdateCurrency = 70,
82 | UpdateFactionStanding = 71,
83 | Respawn = 72,
84 | ServerDebugLog = 73,
85 | CharacterEquipmentChanged = 74,
86 | RegenerationHealthChanged = 75,
87 | RegenerationEnergyChanged = 76,
88 | RegenerationMountHealthChanged = 77,
89 | RegenerationCraftingChanged = 78,
90 | RegenerationHealthEnergyComboChanged = 79,
91 | RegenerationPlayerComboChanged = 80,
92 | DurabilityChanged = 81,
93 | NewLoot = 82,
94 | ContainerInfo = 83,
95 | GuildVaultInfo = 84,
96 | GuildUpdate = 85,
97 | GuildPlayerUpdated = 86,
98 | InvitedToGuild = 87,
99 | GuildMemberWorldUpdate = 88,
100 | UpdateMatchDetails = 89,
101 | ObjectEvent = 90,
102 | NewMonolithObject = 91,
103 | NewSiegeCampObject = 92,
104 | NewOrbObject = 93,
105 | NewCastleObject = 94,
106 | NewSpellEffectArea = 95,
107 | NewChainSpell = 96,
108 | UpdateChainSpell = 97,
109 | NewTreasureChest = 98,
110 | StartMatch = 99,
111 | StartTerritoryMatchInfos = 100,
112 | StartArenaMatchInfos = 101,
113 | EndTerritoryMatch = 102,
114 | EndArenaMatch = 103,
115 | MatchUpdate = 104,
116 | ActiveMatchUpdate = 105,
117 | NewMob = 106,
118 | DebugAggroInfo = 107,
119 | DebugVariablesInfo = 108,
120 | DebugReputationInfo = 109,
121 | DebugDiminishingReturnInfo = 110,
122 | ClaimOrbStart = 111,
123 | ClaimOrbFinished = 112,
124 | ClaimOrbCancel = 113,
125 | OrbUpdate = 114,
126 | OrbClaimed = 115,
127 | NewWarCampObject = 116,
128 | GuildMemberTerritoryUpdate = 117,
129 | InvitedMercenaryToMatch = 118,
130 | ClusterInfoUpdate = 119,
131 | ForcedMovement = 120,
132 | ForcedMovementCancel = 121,
133 | CharacterStats = 122,
134 | CharacterStatsKillHistory = 123,
135 | CharacterStatsDeathHistory = 124,
136 | GuildStats = 125,
137 | KillHistoryDetails = 126,
138 | FullAchievementInfo = 127,
139 | FinishedAchievement = 128,
140 | AchievementProgressInfo = 129,
141 | FullAchievementProgressInfo = 130,
142 | FullTrackedAchievementInfo = 131,
143 | AgentQuestOffered = 132,
144 | AgentDebugInfo = 133,
145 | ConsoleEvent = 134,
146 | TimeSync = 135,
147 | ChangeAvatar = 136,
148 | GameEvent = 137,
149 | KilledPlayer = 138,
150 | Died = 139,
151 | KnockedDown = 140,
152 | MatchPlayerJoinedEvent = 141,
153 | MatchPlayerStatsEvent = 142,
154 | MatchPlayerStatsCompleteEvent = 143,
155 | MatchTimeLineEventEvent = 144,
156 | MatchPlayerMainGearStatsEvent = 145,
157 | MatchPlayerChangedAvatarEvent = 146,
158 | InvitationPlayerTrade = 147,
159 | PlayerTradeStart = 148,
160 | PlayerTradeCancel = 149,
161 | PlayerTradeUpdate = 150,
162 | PlayerTradeFinished = 151,
163 | PlayerTradeAcceptChange = 152,
164 | MiniMapPing = 153,
165 | MinimapPlayerPositions = 154,
166 | MarketPlaceNotification = 155,
167 | DuellingChallengePlayer = 156,
168 | NewDuellingPost = 157,
169 | DuelStarted = 158,
170 | DuelEnded = 159,
171 | DuelDenied = 160,
172 | DuelLeftArea = 161,
173 | DuelReEnteredArea = 162,
174 | NewRealEstate = 163,
175 | MiniMapOwnedBuildingsPositions = 164,
176 | RealEstateListUpdate = 165,
177 | GuildLogoUpdate = 166,
178 | PlaceableItemPlace = 167,
179 | PlaceableItemPlaceCancel = 168,
180 | FurnitureObjectBuffProviderInfo = 169,
181 | FurnitureObjectCheatProviderInfo = 170,
182 | FarmableObjectInfo = 171,
183 | LaborerObjectPlace = 172,
184 | LaborerObjectPlaceCancel = 173,
185 | NewUnreadMails = 174,
186 | GuildLogoObjectUpdate = 175,
187 | StartLogout = 176,
188 | NewChatChannels = 177,
189 | JoinedChatChannel = 178,
190 | LeftChatChannel = 179,
191 | RemovedChatChannel = 180,
192 | AccessStatus = 181,
193 | Mounted = 182,
194 | MountCancel = 183,
195 | NewTravelpoint = 184,
196 | NewIslandAccessPoint = 185,
197 | NewExit = 186,
198 | UpdateHome = 187,
199 | UpdateChatSettings = 188,
200 | ResurrectionOffer = 189,
201 | ResurrectionReply = 190,
202 | LootEquipmentChanged = 191,
203 | UpdateUnlockedGuildLogos = 192,
204 | UpdateUnlockedAvatars = 193,
205 | UpdateUnlockedAvatarRings = 194,
206 | UpdateUnlockedBuildings = 195,
207 | DailyLoginBonus = 196,
208 | NewIslandManagement = 197,
209 | NewTeleportStone = 198,
210 | Cloak = 199,
211 | PartyInvitation = 200,
212 | PartyJoined = 201,
213 | PartyDisbanded = 202,
214 | PartyPlayerJoined = 203,
215 | PartyChangedOrder = 204,
216 | PartyPlayerLeft = 205,
217 | PartyLeaderChanged = 206,
218 | PartyLootSettingChangedPlayer = 207,
219 | PartySilverGained = 208,
220 | PartyPlayerUpdated = 209,
221 | PartyInvitationPlayerBusy = 210,
222 | SpellCooldownUpdate = 211,
223 | NewHellgate = 212,
224 | NewHellgateExit = 213,
225 | NewExpeditionExit = 214,
226 | NewExpeditionNarrator = 215,
227 | ExitEnterStart = 216,
228 | ExitEnterCancel = 217,
229 | ExitEnterFinished = 218,
230 | HellClusterTimeUpdate = 219,
231 | NewAgent = 220,
232 | FullQuestInfo = 221,
233 | QuestProgressInfo = 222,
234 | FullExpeditionInfo = 223,
235 | ExpeditionQuestProgressInfo = 224,
236 | InvitedToExpedition = 225,
237 | ExpeditionRegistrationInfo = 226,
238 | EnteringExpeditionStart = 227,
239 | EnteringExpeditionCancel = 228,
240 | RewardGranted = 229,
241 | ArenaRegistrationInfo = 230,
242 | EnteringArenaStart = 231,
243 | EnteringArenaCancel = 232,
244 | EnteringArenaLockStart = 233,
245 | EnteringArenaLockCancel = 234,
246 | InvitedToArenaMatch = 235,
247 | PlayerCounts = 236,
248 | InCombatStateUpdate = 237,
249 | OtherGrabbedLoot = 238,
250 | SiegeCampClaimStart = 239,
251 | SiegeCampClaimCancel = 240,
252 | SiegeCampClaimFinished = 241,
253 | SiegeCampScheduleResult = 242,
254 | TreasureChestUsingStart = 243,
255 | TreasureChestUsingFinished = 244,
256 | TreasureChestUsingCancel = 245,
257 | TreasureChestUsingOpeningComplete = 246,
258 | TreasureChestForceCloseInventory = 247,
259 | PremiumChanged = 248,
260 | PremiumExtended = 249,
261 | PremiumLifeTimeRewardGained = 250,
262 | LaborerGotUpgraded = 251,
263 | JournalGotFull = 252,
264 | JournalFillError = 253,
265 | FriendRequest = 254,
266 | FriendRequestInfos = 255,
267 | FriendInfos = 256,
268 | FriendRequestAnswered = 257,
269 | FriendOnlineStatus = 258,
270 | FriendRequestCanceled = 259,
271 | FriendRemoved = 260,
272 | FriendUpdated = 261,
273 | PartyLootItems = 262,
274 | PartyLootItemsRemoved = 263,
275 | ReputationUpdate = 264,
276 | DefenseUnitAttackBegin = 265,
277 | DefenseUnitAttackEnd = 266,
278 | DefenseUnitAttackDamage = 267,
279 | UnrestrictedPvpZoneUpdate = 268,
280 | ReputationImplicationUpdate = 269,
281 | NewMountObject = 270,
282 | MountHealthUpdate = 271,
283 | MountCooldownUpdate = 272,
284 | NewExpeditionAgent = 273,
285 | NewExpeditionCheckPoint = 274,
286 | ExpeditionStartEvent = 275,
287 | VoteEvent = 276,
288 | RatingEvent = 277,
289 | NewArenaAgent = 278,
290 | BoostFarmable = 279,
291 | UseFunction = 280,
292 | NewPortalEntrance = 281,
293 | NewPortalExit = 282,
294 | WaitingQueueUpdate = 283,
295 | PlayerMovementRateUpdate = 284,
296 | ObserveStart = 285,
297 | MinimapZergs = 286,
298 | PaymentTransactions = 287,
299 | PerformanceStatsUpdate = 288,
300 | OverloadModeUpdate = 289,
301 | DebugDrawEvent = 290,
302 | RecordCameraMove = 291,
303 | RecordStart = 292,
304 | TerritoryClaimStart = 293,
305 | TerritoryClaimCancel = 294,
306 | TerritoryClaimFinished = 295,
307 | TerritoryScheduleResult = 296,
308 | UpdateAccountState = 297,
309 | StartDeterministicRoam = 298,
310 | GuildFullAccessTagsUpdated = 299,
311 | GuildAccessTagUpdated = 300,
312 | GvgSeasonUpdate = 301,
313 | GvgSeasonCheatCommand = 302,
314 | SeasonPointsByKillingBooster = 303,
315 | FishingStart = 304,
316 | FishingCast = 305,
317 | FishingCatch = 306,
318 | FishingFinished = 307,
319 | FishingCancel = 308,
320 | NewFloatObject = 309,
321 | NewFishingZoneObject = 310,
322 | FishingMiniGame = 311,
323 | SteamAchievementCompleted = 312,
324 | UpdatePuppet = 313,
325 | ChangeFlaggingFinished = 314,
326 | NewOutpostObject = 315,
327 | OutpostUpdate = 316,
328 | OutpostClaimed = 317,
329 | OverChargeEnd = 318,
330 | OverChargeStatus = 319,
331 | OutpostReward = 320,
332 | }
333 | }
--------------------------------------------------------------------------------
/AlbionRadaro/AOEnums/OperationCodes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlbionRadaro
8 | {
9 | public enum OperationCodes
10 | {
11 | Unused = 0,
12 | Ping = 1,
13 | Join = 2,
14 | CreateAccount = 3,
15 | Login = 4,
16 | SendCrashLog = 5,
17 | CreateCharacter = 6,
18 | DeleteCharacter = 7,
19 | SelectCharacter = 8,
20 | RedeemKeycode = 9,
21 | GetGameServerByCluster = 10,
22 | GetSubscriptionDetails = 11,
23 | GetActiveSubscription = 12,
24 | GetSubscriptionUrl = 13,
25 | GetPurchaseGoldUrl = 14,
26 | GetBuyTrialDetails = 15,
27 | GetReferralSeasonDetails = 16,
28 | GetAvailableTrialKeys = 17,
29 | Move = 18,
30 | AttackStart = 19,
31 | CastStart = 20,
32 | CastCancel = 21,
33 | TerminateToggleSpell = 22,
34 | ChannelingCancel = 23,
35 | AttackBuildingStart = 24,
36 | InventoryDestroyItem = 25,
37 | InventoryMoveItem = 26,
38 | InventorySplitStack = 27,
39 | ChangeCluster = 28,
40 | ConsoleCommand = 29,
41 | ChatMessage = 30,
42 | ReportClientError = 31,
43 | RegisterToObject = 32,
44 | UnRegisterFromObject = 33,
45 | CraftBuildingChangeSettings = 34,
46 | CraftBuildingTakeMoney = 35,
47 | RepairBuildingChangeSettings = 36,
48 | RepairBuildingTakeMoney = 37,
49 | ActionBuildingChangeSettings = 38,
50 | HarvestStart = 39,
51 | HarvestCancel = 40,
52 | TakeSilver = 41,
53 | ActionOnBuildingStart = 42,
54 | ActionOnBuildingCancel = 43,
55 | ItemRerollQualityStart = 44,
56 | ItemRerollQualityCancel = 45,
57 | InstallResourceStart = 46,
58 | InstallResourceCancel = 47,
59 | InstallSilver = 48,
60 | BuildingFillNutrition = 49,
61 | BuildingChangeRenovationState = 50,
62 | BuildingBuySkin = 51,
63 | BuildingClaim = 52,
64 | BuildingGiveup = 53,
65 | BuildingNutritionSilverStorageDeposit = 54,
66 | BuildingNutritionSilverStorageWithdraw = 55,
67 | BuildingNutritionSilverRewardSet = 56,
68 | ConstructionSiteCreate = 57,
69 | PlaceableItemPlace = 58,
70 | PlaceableItemPlaceCancel = 59,
71 | PlaceableObjectPickup = 60,
72 | FurnitureObjectUse = 61,
73 | FarmableHarvest = 62,
74 | FarmableFinishGrownItem = 63,
75 | FarmableDestroy = 64,
76 | FarmableGetProduct = 65,
77 | FarmableFill = 66,
78 | LaborerObjectPlace = 67,
79 | LaborerObjectPlaceCancel = 68,
80 | CastleGateUse = 69,
81 | AuctionCreateOffer = 70,
82 | AuctionCreateRequest = 71,
83 | AuctionGetOffers = 72,
84 | AuctionGetRequests = 73,
85 | AuctionBuyOffer = 74,
86 | AuctionAbortAuction = 75,
87 | AuctionModifyAuction = 76,
88 | AuctionAbortOffer = 77,
89 | AuctionAbortRequest = 78,
90 | AuctionSellRequest = 79,
91 | AuctionGetFinishedAuctions = 80,
92 | AuctionFetchAuction = 81,
93 | AuctionGetMyOpenOffers = 82,
94 | AuctionGetMyOpenRequests = 83,
95 | AuctionGetMyOpenAuctions = 84,
96 | AuctionGetItemsAverage = 85,
97 | AuctionGetItemAverageStats = 86,
98 | AuctionGetItemAverageValue = 87,
99 | ContainerOpen = 88,
100 | ContainerClose = 89,
101 | ContainerManageSubContainer = 90,
102 | Respawn = 91,
103 | Suicide = 92,
104 | JoinGuild = 93,
105 | LeaveGuild = 94,
106 | CreateGuild = 95,
107 | InviteToGuild = 96,
108 | DeclineGuildInvitation = 97,
109 | KickFromGuild = 98,
110 | DuellingChallengePlayer = 99,
111 | DuellingAcceptChallenge = 100,
112 | DuellingDenyChallenge = 101,
113 | ChangeClusterTax = 102,
114 | ClaimTerritory = 103,
115 | GiveUpTerritory = 104,
116 | ChangeTerritoryAccessRights = 105,
117 | GetMonolithInfo = 106,
118 | GetClaimInfo = 107,
119 | GetAttackInfo = 108,
120 | GetTerritorySeasonPoints = 109,
121 | GetAttackSchedule = 110,
122 | ScheduleAttack = 111,
123 | GetMatches = 112,
124 | GetMatchDetails = 113,
125 | JoinMatch = 114,
126 | LeaveMatch = 115,
127 | ChangeChatSettings = 116,
128 | LogoutStart = 117,
129 | LogoutCancel = 118,
130 | ClaimOrbStart = 119,
131 | ClaimOrbCancel = 120,
132 | DepositToGuildAccount = 121,
133 | WithdrawalFromAccount = 122,
134 | ChangeGuildPayUpkeepFlag = 123,
135 | ChangeGuildTax = 124,
136 | GetMyTerritories = 125,
137 | MorganaCommand = 126,
138 | GetServerInfo = 127,
139 | InviteMercenaryToMatch = 128,
140 | SubscribeToCluster = 129,
141 | AnswerMercenaryInvitation = 130,
142 | GetCharacterEquipment = 131,
143 | GetCharacterSteamAchievements = 132,
144 | GetCharacterStats = 133,
145 | GetKillHistoryDetails = 134,
146 | LearnMasteryLevel = 135,
147 | ReSpecAchievement = 136,
148 | ChangeAvatar = 137,
149 | GetRankings = 138,
150 | GetRank = 139,
151 | GetGvgSeasonRankings = 140,
152 | GetGvgSeasonRank = 141,
153 | GetGvgSeasonHistoryRankings = 142,
154 | KickFromGvGMatch = 143,
155 | GetChestLogs = 144,
156 | GetAccessRightLogs = 145,
157 | InviteToPlayerTrade = 146,
158 | PlayerTradeCancel = 147,
159 | PlayerTradeInvitationAccept = 148,
160 | PlayerTradeAddItem = 149,
161 | PlayerTradeRemoveItem = 150,
162 | PlayerTradeAcceptTrade = 151,
163 | PlayerTradeSetSilverOrGold = 152,
164 | SendMiniMapPing = 153,
165 | Stuck = 154,
166 | BuyRealEstate = 155,
167 | ClaimRealEstate = 156,
168 | GiveUpRealEstate = 157,
169 | ChangeRealEstateOutline = 158,
170 | GetMailInfos = 159,
171 | ReadMail = 160,
172 | SendNewMail = 161,
173 | DeleteMail = 162,
174 | ClaimAttachmentFromMail = 163,
175 | UpdateLfgInfo = 164,
176 | GetLfgInfos = 165,
177 | GetMyGuildLfgInfo = 166,
178 | GetLfgDescriptionText = 167,
179 | LfgApplyToGuild = 168,
180 | AnswerLfgGuildApplication = 169,
181 | GetClusterInfo = 170,
182 | RegisterChatPeer = 171,
183 | SendChatMessage = 172,
184 | JoinChatChannel = 173,
185 | LeaveChatChannel = 174,
186 | SendWhisperMessage = 175,
187 | Say = 176,
188 | PlayEmote = 177,
189 | StopEmote = 178,
190 | GetClusterMapInfo = 179,
191 | AccessRightsChangeSettings = 180,
192 | Mount = 181,
193 | MountCancel = 182,
194 | BuyJourney = 183,
195 | SetSaleStatusForEstate = 184,
196 | ResolveGuildOrPlayerName = 185,
197 | GetRespawnInfos = 186,
198 | MakeHome = 187,
199 | LeaveHome = 188,
200 | ResurrectionReply = 189,
201 | AllianceCreate = 190,
202 | AllianceDisband = 191,
203 | AllianceGetMemberInfos = 192,
204 | AllianceInvite = 193,
205 | AllianceAnswerInvitation = 194,
206 | AllianceCancelInvitation = 195,
207 | AllianceKickGuild = 196,
208 | AllianceLeave = 197,
209 | AllianceChangeGoldPaymentFlag = 198,
210 | AllianceGetDetailInfo = 199,
211 | GetIslandInfos = 200,
212 | AbandonMyIsland = 201,
213 | BuyMyIsland = 202,
214 | BuyGuildIsland = 203,
215 | AbandonGuildIsland = 204,
216 | UpgradeMyIsland = 205,
217 | UpgradeGuildIsland = 206,
218 | TerritoryFillNutrition = 207,
219 | TeleportBack = 208,
220 | PartyInvitePlayer = 209,
221 | PartyAnswerInvitation = 210,
222 | PartyLeave = 211,
223 | PartyKickPlayer = 212,
224 | PartyMakeLeader = 213,
225 | PartyChangeLootSetting = 214,
226 | GetGuildMOTD = 215,
227 | SetGuildMOTD = 216,
228 | ExitEnterStart = 217,
229 | ExitEnterCancel = 218,
230 | AgentRequest = 219,
231 | GoldMarketGetBuyOffer = 220,
232 | GoldMarketGetBuyOfferFromSilver = 221,
233 | GoldMarketGetSellOffer = 222,
234 | GoldMarketGetSellOfferFromSilver = 223,
235 | GoldMarketBuyGold = 224,
236 | GoldMarketSellGold = 225,
237 | GoldMarketCreateSellOrder = 226,
238 | GoldMarketCreateBuyOrder = 227,
239 | GoldMarketGetInfos = 228,
240 | GoldMarketCancelOrder = 229,
241 | GoldMarketGetAverageInfo = 230,
242 | SiegeCampClaimStart = 231,
243 | SiegeCampClaimCancel = 232,
244 | TreasureChestUsingStart = 233,
245 | TreasureChestUsingCancel = 234,
246 | LaborerStartJob = 235,
247 | LaborerTakeJobLoot = 236,
248 | LaborerDismiss = 237,
249 | LaborerMove = 238,
250 | LaborerBuyItem = 239,
251 | LaborerUpgrade = 240,
252 | BuyPremium = 241,
253 | BuyTrial = 242,
254 | RealEstateGetAuctionData = 243,
255 | RealEstateBidOnAuction = 244,
256 | GetSiegeCampCooldown = 245,
257 | FriendInvite = 246,
258 | FriendAnswerInvitation = 247,
259 | FriendCancelnvitation = 248,
260 | FriendRemove = 249,
261 | InventoryStack = 250,
262 | InventorySort = 251,
263 | EquipmentItemChangeSpell = 252,
264 | ExpeditionRegister = 253,
265 | ExpeditionRegisterCancel = 254,
266 | JoinExpedition = 255,
267 | DeclineExpeditionInvitation = 256,
268 | VoteStart = 257,
269 | VoteDoVote = 258,
270 | RatingDoRate = 259,
271 | EnteringExpeditionStart = 260,
272 | EnteringExpeditionCancel = 261,
273 | ActivateExpeditionCheckPoint = 262,
274 | ArenaRegister = 263,
275 | ArenaRegisterCancel = 264,
276 | ArenaLeave = 265,
277 | JoinArenaMatch = 266,
278 | DeclineArenaInvitation = 267,
279 | EnteringArenaStart = 268,
280 | EnteringArenaCancel = 269,
281 | ArenaCustomMatch = 270,
282 | UpdateCharacterStatement = 271,
283 | BoostFarmable = 272,
284 | GetStrikeHistory = 273,
285 | UseFunction = 274,
286 | UsePortalEntrance = 275,
287 | QueryPortalBinding = 276,
288 | ClaimPaymentTransaction = 277,
289 | ChangeUseFlag = 278,
290 | ClientPerformanceStats = 279,
291 | ExtendedHardwareStats = 280,
292 | TerritoryClaimStart = 281,
293 | TerritoryClaimCancel = 282,
294 | RequestAppStoreProducts = 283,
295 | VerifyProductPurchase = 284,
296 | QueryGuildPlayerStats = 285,
297 | TrackAchievements = 286,
298 | DepositItemToGuildCurrency = 287,
299 | WithdrawalItemFromGuildCurrency = 288,
300 | AuctionSellSpecificItemRequest = 289,
301 | FishingStart = 290,
302 | FishingCasting = 291,
303 | FishingCast = 292,
304 | FishingCatch = 293,
305 | FishingPull = 294,
306 | FishingGiveLine = 295,
307 | FishingFinish = 296,
308 | FishingCancel = 297,
309 | CreateGuildAccessTag = 298,
310 | DeleteGuildAccessTag = 299,
311 | RenameGuildAccessTag = 300,
312 | FlagGuildAccessTagGuildPermission = 301,
313 | AssignGuildAccessTag = 302,
314 | RemoveGuildAccessTagFromPlayer = 303,
315 | ModifyGuildAccessTagEditors = 304,
316 | RequestPublicAccessTags = 305,
317 | ChangeAccessTagPublicFlag = 306,
318 | UpdateGuildAccessTag = 307,
319 | SteamStartMicrotransaction = 308,
320 | SteamFinishMicrotransaction = 309,
321 | SteamIdHasActiveAccount = 310,
322 | CheckEmailAccountState = 311,
323 | LinkAccountToSteamId = 312,
324 | BuyGvgSeasonBooster = 313,
325 | ChangeFlaggingPrepare = 314,
326 | OverCharge = 315,
327 | OverChargeEnd = 316,
328 | RequestTrusted = 317,
329 | }
330 | }
331 |
--------------------------------------------------------------------------------
/AlbionRadaro/PacketHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Threading;
7 | using AlbionRadaro.Mobs;
8 |
9 | namespace AlbionRadaro
10 | {
11 | class PacketHandler : IPhotonPackageHandler
12 | {
13 | PlayerHandler playerHandler;
14 | HarvestableHandler harvestableHandler;
15 | MobsHandler mobsHandler;
16 |
17 | public PacketHandler(PlayerHandler playerHandler, HarvestableHandler harvestableHandler, MobsHandler mobsHandler)
18 | {
19 | this.playerHandler = playerHandler;
20 | this.harvestableHandler = harvestableHandler;
21 | this.mobsHandler = mobsHandler;
22 | }
23 | public void OnEvent(byte code, Dictionary parameters)
24 | {
25 | if (code == 2)
26 | {
27 | //player movement comes with binary format - not normal.
28 | onPlayerMovement(parameters);
29 | return;
30 | }
31 |
32 | object val;
33 | parameters.TryGetValue((byte)252, out val);
34 | if (val == null) return;
35 |
36 | int iCode = 0;
37 | if (!int.TryParse(val.ToString(), out iCode)) return;
38 |
39 | EventCodes eventCode = (EventCodes)iCode;
40 |
41 |
42 | //Console.WriteLine("Event: " + eventCode);
43 | switch (eventCode)
44 | {
45 | case EventCodes.HarvestableChangeState:
46 | Console.WriteLine("Event: " + eventCode);
47 | onHarvestableChangeState(parameters);
48 | break;
49 | case EventCodes.HarvestFinished:
50 | onHarvestFinished(parameters);
51 | break;
52 | case EventCodes.NewCharacter:
53 | onNewCharacterEvent(parameters);
54 | break;
55 | case EventCodes.NewHarvestableObject:
56 | onNewHarvestableObject(parameters);
57 | break;
58 | case EventCodes.NewSimpleHarvestableObjectList:
59 | onNewSimpleHarvestableObjectList(parameters);
60 | break;
61 | case EventCodes.Leave:
62 | onLeave(parameters);
63 | break;
64 | case EventCodes.NewMob:
65 | onNewMob(parameters);
66 | break;
67 | case EventCodes.JoinFinished:
68 | onJoinFinished(parameters);
69 | break;
70 | case EventCodes.InCombatStateUpdate:
71 | onInCombatStateUpdate(parameters);
72 | break;
73 | case EventCodes.CastSpell:
74 | onCastSpell(parameters);
75 | break;
76 | case EventCodes.MobChangeState:
77 | onMobChangeState(parameters);
78 | break;
79 | default: break;
80 | }
81 | }
82 |
83 | private void onMobChangeState(Dictionary parameters)
84 | {
85 | int mobId = 0;
86 | byte enchantmentLevel = 0;
87 |
88 | if (!int.TryParse(parameters[0].ToString(), out mobId)) return;
89 | if (!byte.TryParse(parameters[1].ToString(), out enchantmentLevel)) return;
90 | mobsHandler.UpdateMobEnchantmentLevel(mobId, enchantmentLevel);
91 |
92 | }
93 |
94 |
95 | public void OnResponse(byte operationCode, short returnCode, Dictionary parameters)
96 | {
97 | // Console.WriteLine("OnResponse: " + operationCode + " returnCode: " + returnCode);
98 | }
99 | public void OnRequest(byte operationCode, Dictionary parameters)
100 | {
101 | //OperationCodes code = (OperationCodes)parameters[253];
102 | int iCode = 0;
103 | if (!int.TryParse(parameters[253].ToString(), out iCode)) return;
104 | OperationCodes code = (OperationCodes)iCode;
105 |
106 | //Console.WriteLine("OnRequest: " + code);
107 | switch (code)
108 | {
109 | case OperationCodes.Move:
110 | onLocalPlayerMovement(parameters);
111 | break;
112 | }
113 | }
114 |
115 | private void onCastSpell(Dictionary parameters)
116 | {
117 | // foreach (KeyValuePair kvp in parameters)
118 | // Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
119 | }
120 |
121 | private void onInCombatStateUpdate(Dictionary parameters)
122 | {
123 | // foreach (KeyValuePair kvp in parameters)
124 | // Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
125 | }
126 | private void onJoinFinished(Dictionary parameters)
127 | {
128 | this.harvestableHandler.HarvestableList.Clear();
129 | this.mobsHandler.MobList.Clear();
130 | // this.playerHandler.PlayersInRange.Clear();
131 | }
132 | private void onNewMob(Dictionary parameters)
133 | {
134 | /*
135 | Rhino Data (4258 HP)
136 | Key = 0, Value = 12694, Type= System.Int16 // long Object Id ao5
137 | Key = 1, Value = 41, Type= System.Byte // short Type Id ao6
138 | Key = 2, Value = 255, Type= System.Byte // Flagging status ao7
139 | Blue = 0,
140 | Highland = 1,
141 | Forest = 2,
142 | Steppe = 3,
143 | Mountain = 4,
144 | Swamp = 5,
145 | Red = byte.MaxValue
146 | Key = 6, Value = , Type= System.String // apb?
147 | Key = 7, Value = System.Single[], Type= System.Single[] // Pos // arg apc
148 | Key = 8, Value = System.Single[], Type= System.Single[] // Pos Target // arg apd
149 | Key = 9, Value = 26835839, Type= System.Int32 // GameTimeStamp ape
150 | Key = 10, Value = 171.1836, Type= System.Single // apf (float)
151 | Key = 11, Value = 2, Type= System.Single // apg (float)
152 | Key = 13, Value = 4258, Type= System.Single // Health api (float)
153 | Key = 14, Value = 4258, Type= System.Single // apj (float)
154 | Key = 16, Value = 26665619, Type= System.Int32 // GameTimeStamp app
155 | Key = 17, Value = 245, Type= System.Single // float apm
156 | Key = 18, Value = 245, Type= System.Single // float apn
157 | Key = 19, Value = 7, Type= System.Single // float apo
158 | Key = 20, Value = 26835811, Type= System.Int32 // GameTimeStamp app
159 | Key = 252, Value = 106, Type= System.Int16
160 | */
161 |
162 |
163 | int id = int.Parse(parameters[0].ToString());
164 | int typeId = int.Parse(parameters[1].ToString());
165 | Single[] loc = (Single[])parameters[8];
166 | // Console.WriteLine("Loc Locs: " + loc.Length);
167 | DateTime timeA = new DateTime(long.Parse(parameters[9].ToString()));
168 | DateTime timeB = new DateTime(long.Parse(parameters[16].ToString()));
169 | DateTime timeC = new DateTime(long.Parse(parameters[20].ToString()));
170 | Single posX = (Single)loc[0];
171 | Single posY = (Single)loc[1];
172 | int health = int.Parse(parameters[13].ToString());
173 | int rarity = int.Parse(parameters[20].ToString());
174 |
175 | mobsHandler.AddMob(id, typeId, posX, posY, health);
176 | }
177 | private void onNewSimpleHarvestableObjectList(Dictionary parameters)
178 | {
179 | //return;
180 | // foreach (KeyValuePair kvp in parameters)
181 | // Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
182 |
183 | List a0 = new List();
184 | if (parameters[0].GetType() == typeof(Byte[]))
185 | {
186 | Byte[] typeListByte = (Byte[])parameters[0]; //list of types
187 | foreach (Byte b in typeListByte)
188 | a0.Add(b);
189 | }
190 | else if (parameters[0].GetType() == typeof(Int16[]))
191 | {
192 | Int16[] typeListByte = (Int16[])parameters[0]; //list of types
193 | foreach (Int16 b in typeListByte)
194 | a0.Add(b);
195 | }
196 | else
197 | {
198 | Console.WriteLine("onNewSimpleHarvestableObjectList type error: " + parameters[0].GetType());
199 | return;
200 | }
201 | try
202 | {
203 | /*
204 | Key = 0, Value = System.Int16[] //id
205 | Key = 1, Value = System.Byte[] // type WOOD etc
206 | Key = 2, Value = System.Byte[] // tier
207 | Key = 3, Value = System.Single[] //location
208 | Key = 4, Value = System.Byte[] // size
209 | Key = 252, Value = 29
210 | */
211 | Byte[] a1 = (Byte[])parameters[1]; //list of types
212 | Byte[] a2 = (Byte[])parameters[2]; //list of tiers
213 | Single[] a3 = (Single[])parameters[3]; //list of positions X1, Y1, X2, Y2 ...
214 | Byte[] a4 = (Byte[])parameters[4]; //size
215 |
216 | for (int i = 0; i < a0.Count; i++)
217 | {
218 | int id = (int)a0.ElementAt(i);
219 | byte type = (byte)a1[i];
220 | byte tier = (byte)a2[i];
221 | Single posX = (Single)a3[i * 2];
222 | Single posY = (Single)a3[i * 2 + 1];
223 | Byte count = (byte)a4[i];
224 | byte charges = (byte)0;
225 | harvestableHandler.AddHarvestable(id, type, tier, posX, posY, charges, count);
226 | }
227 |
228 | }
229 | catch (Exception e)
230 | {
231 | Console.WriteLine("eL: " + e.ToString());
232 | }
233 | }
234 | private void onNewHarvestableObject(Dictionary parameters)
235 | {
236 | // Console.WriteLine("onNewHarvestableObject");
237 | // foreach (KeyValuePair kvp in parameters)
238 | // Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
239 | /*
240 | //Key = 10, Value = 2 //count. If not set its empty
241 | Key = 0, Value = 7589
242 | Key = 2, Value = 636712223127023853
243 | Key = 5, Value = 11
244 | Key = 6, Value = -1
245 | Key = 7, Value = 6
246 | Key = 8, Value = System.Single[]
247 | Key = 9, Value = 270
248 | Key = 11, Value = 1
249 | Key = 252, Value = 30
250 | */
251 | int id = int.Parse(parameters[0].ToString());
252 | byte type = byte.Parse(parameters[5].ToString()); //TODO - check if 5 is type
253 | byte tier = byte.Parse(parameters[7].ToString()); //Tier
254 | Single[] loc = (Single[])parameters[8];
255 | Single posX = (Single)loc[0];
256 | Single posY = (Single)loc[1];
257 | byte charges = 0;
258 | byte size = 0;
259 | if (!byte.TryParse(parameters[10].ToString(), out size))
260 | size = 0; //nothink in stack
261 |
262 | if (!byte.TryParse(parameters[11].ToString(), out charges))
263 | charges = 0; // charge
264 |
265 | harvestableHandler.AddHarvestable(id, type, tier, posX, posY, charges, size);
266 | }
267 | private void onHarvestFinished(Dictionary parameters)
268 | {//
269 | // foreach (KeyValuePair kvp in parameters)
270 | // Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
271 | int harvestableId = int.Parse(parameters[3].ToString());
272 | //Int32 count = Int32.Parse(parameters[2].ToString());
273 |
274 | harvestableHandler.RemoveHarvestable(harvestableId);
275 | //harvestableHandler.UpdateHarvestable(harvestableId, count);
276 | }
277 | private void onHarvestableChangeState(Dictionary parameters)
278 | {
279 | /*
280 | onHarvestableChangeState
281 | Key = 0, Value = 5803
282 | Key = 1, Value = 2 //how much more to mine
283 | Key = 2, Value = 1 //tier
284 | Key = 252, Value = 33
285 | */
286 | // Console.WriteLine("onHarvestableChangeState");
287 | //foreach (KeyValuePair kvp in parameters)
288 | // Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);
289 | }
290 | private void onLeave(Dictionary parameters)
291 | {
292 |
293 | /*
294 | onLeave contains strange data. It should delete Harvestable + Players + Monsters. But its sketchy.
295 | */
296 | int id = int.Parse(parameters[0].ToString());
297 | // if (harvestableHandler.RemoveHarvestable(id))
298 | // Console.WriteLine("Removed harvestable: " + id);
299 | // else
300 | if (playerHandler.RemovePlayer(id))
301 | playerHandler.RemovePlayer(id);
302 | //Console.WriteLine("Removed player: " + id);
303 | // else
304 | // Console.WriteLine("None removed: " + id);
305 |
306 | }
307 | private void onLocalPlayerMovement(Dictionary parameters)
308 | {
309 | Single[] location = (Single[])parameters[1]; //if we switch to [3] we will have future position of player instead of 'right now'
310 | Single posX = Single.Parse(location[0].ToString());
311 | Single posY = Single.Parse(location[1].ToString());
312 | // Console.WriteLine("onLocalPlayerMovement: " +posX + " " + posY);
313 | // 373,6958 -358,3227 top of map
314 | //-375,2436 366,6795 bottom of map
315 |
316 | playerHandler.UpdateLocalPlayerPosition(posX, posY);
317 | }
318 | private void onPlayerMovement(Dictionary parameters)
319 | {
320 | int id = int.Parse(parameters[0].ToString());
321 | Byte[] a = (Byte[])parameters[1];
322 | Single posX = BitConverter.ToSingle(a, 9);
323 | Single posY = BitConverter.ToSingle(a, 13);
324 | //Console.WriteLine("X:" + posX + " Y:" + posY);
325 |
326 | playerHandler.UpdatePlayerPosition(id, posX, posY);
327 | }
328 | private void onNewCharacterEvent(Dictionary parameters)
329 | {
330 |
331 | if (Settings.PlaySoundOnPlayer())
332 | new Thread(() => Console.Beep(1000, 1000)).Start();
333 |
334 |
335 | int id = int.Parse(parameters[0].ToString());
336 | string nick = parameters[1].ToString();
337 | object oGuild = "";
338 | parameters.TryGetValue((byte)8, out oGuild);
339 | string guild = oGuild == null ? "" : oGuild.ToString();
340 |
341 | //string guild = parameters[8].ToString() || null;
342 | string alliance = parameters[44].ToString();
343 |
344 | Single[] a13 = (Single[])parameters[13]; //pos1
345 |
346 | playerHandler.AddPlayer(a13[0], a13[1], nick, guild, alliance, id);
347 | }
348 | }
349 | }
350 |
--------------------------------------------------------------------------------
/AlbionRadaro/AppSettings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AlbionRadaro {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class AppSettings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static AppSettings defaultInstance = ((AppSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new AppSettings())));
19 |
20 | public static AppSettings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
29 | public bool T123 {
30 | get {
31 | return ((bool)(this["T123"]));
32 | }
33 | set {
34 | this["T123"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
41 | public bool T40 {
42 | get {
43 | return ((bool)(this["T40"]));
44 | }
45 | set {
46 | this["T40"] = value;
47 | }
48 | }
49 |
50 | [global::System.Configuration.UserScopedSettingAttribute()]
51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
53 | public bool T41 {
54 | get {
55 | return ((bool)(this["T41"]));
56 | }
57 | set {
58 | this["T41"] = value;
59 | }
60 | }
61 |
62 | [global::System.Configuration.UserScopedSettingAttribute()]
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
65 | public bool T42 {
66 | get {
67 | return ((bool)(this["T42"]));
68 | }
69 | set {
70 | this["T42"] = value;
71 | }
72 | }
73 |
74 | [global::System.Configuration.UserScopedSettingAttribute()]
75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
76 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
77 | public bool T43 {
78 | get {
79 | return ((bool)(this["T43"]));
80 | }
81 | set {
82 | this["T43"] = value;
83 | }
84 | }
85 |
86 | [global::System.Configuration.UserScopedSettingAttribute()]
87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
88 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
89 | public bool T50 {
90 | get {
91 | return ((bool)(this["T50"]));
92 | }
93 | set {
94 | this["T50"] = value;
95 | }
96 | }
97 |
98 | [global::System.Configuration.UserScopedSettingAttribute()]
99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
100 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
101 | public bool T51 {
102 | get {
103 | return ((bool)(this["T51"]));
104 | }
105 | set {
106 | this["T51"] = value;
107 | }
108 | }
109 |
110 | [global::System.Configuration.UserScopedSettingAttribute()]
111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
112 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
113 | public bool T52 {
114 | get {
115 | return ((bool)(this["T52"]));
116 | }
117 | set {
118 | this["T52"] = value;
119 | }
120 | }
121 |
122 | [global::System.Configuration.UserScopedSettingAttribute()]
123 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
124 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
125 | public bool T53 {
126 | get {
127 | return ((bool)(this["T53"]));
128 | }
129 | set {
130 | this["T53"] = value;
131 | }
132 | }
133 |
134 | [global::System.Configuration.UserScopedSettingAttribute()]
135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
136 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
137 | public bool T60 {
138 | get {
139 | return ((bool)(this["T60"]));
140 | }
141 | set {
142 | this["T60"] = value;
143 | }
144 | }
145 |
146 | [global::System.Configuration.UserScopedSettingAttribute()]
147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
148 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
149 | public bool T61 {
150 | get {
151 | return ((bool)(this["T61"]));
152 | }
153 | set {
154 | this["T61"] = value;
155 | }
156 | }
157 |
158 | [global::System.Configuration.UserScopedSettingAttribute()]
159 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
160 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
161 | public bool T62 {
162 | get {
163 | return ((bool)(this["T62"]));
164 | }
165 | set {
166 | this["T62"] = value;
167 | }
168 | }
169 |
170 | [global::System.Configuration.UserScopedSettingAttribute()]
171 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
172 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
173 | public bool T63 {
174 | get {
175 | return ((bool)(this["T63"]));
176 | }
177 | set {
178 | this["T63"] = value;
179 | }
180 | }
181 |
182 | [global::System.Configuration.UserScopedSettingAttribute()]
183 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
184 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
185 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
186 | public bool T70 {
187 | get {
188 | return ((bool)(this["T70"]));
189 | }
190 | set {
191 | this["T70"] = value;
192 | }
193 | }
194 |
195 | [global::System.Configuration.UserScopedSettingAttribute()]
196 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
197 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
198 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
199 | public bool T71 {
200 | get {
201 | return ((bool)(this["T71"]));
202 | }
203 | set {
204 | this["T71"] = value;
205 | }
206 | }
207 |
208 | [global::System.Configuration.UserScopedSettingAttribute()]
209 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
210 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
211 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
212 | public bool T72 {
213 | get {
214 | return ((bool)(this["T72"]));
215 | }
216 | set {
217 | this["T72"] = value;
218 | }
219 | }
220 |
221 | [global::System.Configuration.UserScopedSettingAttribute()]
222 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
223 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
224 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
225 | public bool T73 {
226 | get {
227 | return ((bool)(this["T73"]));
228 | }
229 | set {
230 | this["T73"] = value;
231 | }
232 | }
233 |
234 | [global::System.Configuration.UserScopedSettingAttribute()]
235 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
236 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
237 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
238 | public bool T80 {
239 | get {
240 | return ((bool)(this["T80"]));
241 | }
242 | set {
243 | this["T80"] = value;
244 | }
245 | }
246 |
247 | [global::System.Configuration.UserScopedSettingAttribute()]
248 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
249 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
250 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
251 | public bool T81 {
252 | get {
253 | return ((bool)(this["T81"]));
254 | }
255 | set {
256 | this["T81"] = value;
257 | }
258 | }
259 |
260 | [global::System.Configuration.UserScopedSettingAttribute()]
261 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
262 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
263 | [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
264 | public bool T82 {
265 | get {
266 | return ((bool)(this["T82"]));
267 | }
268 | set {
269 | this["T82"] = value;
270 | }
271 | }
272 |
273 | [global::System.Configuration.UserScopedSettingAttribute()]
274 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
275 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
276 | public bool T83 {
277 | get {
278 | return ((bool)(this["T83"]));
279 | }
280 | set {
281 | this["T83"] = value;
282 | }
283 | }
284 |
285 | [global::System.Configuration.UserScopedSettingAttribute()]
286 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
287 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
288 | public bool rFiber {
289 | get {
290 | return ((bool)(this["rFiber"]));
291 | }
292 | set {
293 | this["rFiber"] = value;
294 | }
295 | }
296 |
297 | [global::System.Configuration.UserScopedSettingAttribute()]
298 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
299 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
300 | public bool rWood {
301 | get {
302 | return ((bool)(this["rWood"]));
303 | }
304 | set {
305 | this["rWood"] = value;
306 | }
307 | }
308 |
309 | [global::System.Configuration.UserScopedSettingAttribute()]
310 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
311 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
312 | public bool rOre {
313 | get {
314 | return ((bool)(this["rOre"]));
315 | }
316 | set {
317 | this["rOre"] = value;
318 | }
319 | }
320 |
321 | [global::System.Configuration.UserScopedSettingAttribute()]
322 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
323 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
324 | public bool rOtherMobs {
325 | get {
326 | return ((bool)(this["rOtherMobs"]));
327 | }
328 | set {
329 | this["rOtherMobs"] = value;
330 | }
331 | }
332 |
333 | [global::System.Configuration.UserScopedSettingAttribute()]
334 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
335 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
336 | public bool rRock {
337 | get {
338 | return ((bool)(this["rRock"]));
339 | }
340 | set {
341 | this["rRock"] = value;
342 | }
343 | }
344 |
345 | [global::System.Configuration.UserScopedSettingAttribute()]
346 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
347 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
348 | public bool rHarvestableMob {
349 | get {
350 | return ((bool)(this["rHarvestableMob"]));
351 | }
352 | set {
353 | this["rHarvestableMob"] = value;
354 | }
355 | }
356 |
357 | [global::System.Configuration.UserScopedSettingAttribute()]
358 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
359 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
360 | public bool rSkinnableMob {
361 | get {
362 | return ((bool)(this["rSkinnableMob"]));
363 | }
364 | set {
365 | this["rSkinnableMob"] = value;
366 | }
367 | }
368 |
369 | [global::System.Configuration.UserScopedSettingAttribute()]
370 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
371 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
372 | public bool rTreasures {
373 | get {
374 | return ((bool)(this["rTreasures"]));
375 | }
376 | set {
377 | this["rTreasures"] = value;
378 | }
379 | }
380 |
381 | [global::System.Configuration.UserScopedSettingAttribute()]
382 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
383 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
384 | public bool rDisplayPeople {
385 | get {
386 | return ((bool)(this["rDisplayPeople"]));
387 | }
388 | set {
389 | this["rDisplayPeople"] = value;
390 | }
391 | }
392 |
393 | [global::System.Configuration.UserScopedSettingAttribute()]
394 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
395 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
396 | public bool rSoundOnPlayer {
397 | get {
398 | return ((bool)(this["rSoundOnPlayer"]));
399 | }
400 | set {
401 | this["rSoundOnPlayer"] = value;
402 | }
403 | }
404 |
405 | [global::System.Configuration.UserScopedSettingAttribute()]
406 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
407 | [global::System.Configuration.DefaultSettingValueAttribute("0")]
408 | public int radarX {
409 | get {
410 | return ((int)(this["radarX"]));
411 | }
412 | set {
413 | this["radarX"] = value;
414 | }
415 | }
416 |
417 | [global::System.Configuration.UserScopedSettingAttribute()]
418 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
419 | [global::System.Configuration.DefaultSettingValueAttribute("0")]
420 | public int radarY {
421 | get {
422 | return ((int)(this["radarY"]));
423 | }
424 | set {
425 | this["radarY"] = value;
426 | }
427 | }
428 | }
429 | }
430 |
--------------------------------------------------------------------------------
/AlbionRadaro/Form1.cs:
--------------------------------------------------------------------------------
1 | using AlbionRadaro.Mobs;
2 | using PcapDotNet.Core;
3 | using PcapDotNet.Packets;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.ComponentModel;
7 | using System.Data;
8 | using System.Diagnostics;
9 | using System.Drawing;
10 | using System.Drawing.Drawing2D;
11 | using System.IO;
12 | using System.Linq;
13 | using System.Runtime.InteropServices;
14 | using System.Text;
15 | using System.Threading;
16 | using System.Windows.Forms;
17 |
18 | namespace AlbionRadaro
19 | {
20 | public partial class Form1 : Form
21 | {
22 |
23 | PacketHandler _eventHandler;
24 | PhotonPacketHandler photonPacketHandler;
25 |
26 | PlayerHandler playerHandler = new PlayerHandler();
27 | HarvestableHandler harvestableHandler = new HarvestableHandler();
28 | MobsHandler mobsHandler = new MobsHandler();
29 |
30 | MapForm mapForm = new MapForm();
31 |
32 | public Form1()
33 | {
34 | InitializeComponent();
35 | Settings.loadSettings(this);
36 |
37 | mapForm.Show();
38 | mapForm.Left = (int)nRadarX.Value;
39 | mapForm.Top = (int)nRadarY.Value;
40 | }
41 |
42 | public static Bitmap RotateImage(Bitmap b, float angle)
43 | {
44 | //create a new empty bitmap to hold rotated image
45 | Bitmap returnBitmap = new Bitmap(b.Width, b.Height);
46 | //make a graphics object from the empty bitmap
47 | using (Graphics g = Graphics.FromImage(returnBitmap))
48 | {
49 | //move rotation point to center of image
50 | g.TranslateTransform((float)b.Width / 2, (float)b.Height / 2);
51 | //rotate
52 | g.RotateTransform(angle);
53 | //move image back
54 | g.TranslateTransform(-(float)b.Width / 2, -(float)b.Height / 2);
55 | //draw passed in image onto graphics object
56 | g.DrawImage(b, new Point(0, 0));
57 | }
58 | return returnBitmap;
59 | }
60 |
61 | private void Form1_Load(object sender, EventArgs e)
62 | {
63 | updateSettings();
64 | try
65 | {
66 | _eventHandler = new PacketHandler(playerHandler, harvestableHandler, mobsHandler);
67 | photonPacketHandler = new PhotonPacketHandler(_eventHandler);
68 |
69 | Thread t = new Thread(() => createListener());
70 | t.Start();
71 |
72 | Thread d = new Thread(() => drawerThread());
73 | d.Start();
74 | }
75 | catch (Exception ea)
76 | {
77 | Console.WriteLine(ea.ToString());
78 | //while (true) ;
79 | }
80 | }
81 | public static Double Distance(Single x1, Single x2, Single y1, Single y2)
82 | {
83 | return Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2));
84 | }
85 | private void drawerThread()
86 | {
87 | Color[] mapColors = {
88 | Color.White,
89 | Color.Black,
90 | Color.Red,
91 | Color.Coral,
92 | Color.Black,
93 | Color.Gray,
94 | Color.Blue,
95 | Color.Red,
96 | Color.Coral,
97 | Color.Goldenrod,
98 | Color.Silver,
99 | Color.Blue,
100 | Color.Green,
101 | Color.Purple
102 | };
103 | Pen linePen = new Pen(Color.Red, 3);
104 | Brush[] harvestBrushes = {
105 | Brushes.Black,
106 | Brushes.Gray,
107 | Brushes.Gray,
108 | Brushes.Gray,
109 | Brushes.Blue,
110 | Brushes.Red,
111 | Brushes.Coral,
112 | Brushes.Goldenrod,
113 | Brushes.Silver
114 | };
115 | Brush[] fontPerColor = {
116 | Brushes.White,
117 | Brushes.White,
118 | Brushes.White,
119 | Brushes.White,
120 | Brushes.White,
121 | Brushes.White,
122 | Brushes.Black,
123 | Brushes.Black,
124 | Brushes.Black
125 |
126 | };
127 | Pen[] chargePen = {
128 | new Pen (Color.Black, 1.5f),
129 | new Pen (Color.Green, 1.5f),
130 | new Pen(Color.Blue, 1.5f),
131 | new Pen(Color.Purple, 1.5f),
132 | };
133 | Pen playerPen = new Pen(Color.Red, 2f);
134 | Brush playerBrush = Brushes.Red;
135 | Brush mobBrush = Brushes.Black;
136 |
137 | int HEIGHT, WIDTH, MULTIPLER = 4;
138 | Bitmap bitmap = new Bitmap(500, 500);
139 | bitmap.SetResolution(100, 100);
140 | HEIGHT = 500;
141 | WIDTH = 500;
142 | Single lpX;
143 | Single lpY;
144 | Font font = new Font("Arial", 3, FontStyle.Bold);
145 |
146 | float scale = 4.0f;
147 | //if()
148 | //mapForm.SetBitmap(bitmap);
149 | while (true)
150 | {
151 | bitmap = new Bitmap(500, 500);
152 | using (Graphics g = Graphics.FromImage(bitmap))
153 | {
154 |
155 | g.Clear(Color.Transparent);
156 | lpX = playerHandler.localPlayerPosX();
157 | lpY = playerHandler.localPlayerPosY();
158 |
159 | g.TranslateTransform(WIDTH / 2, HEIGHT / 2);
160 | g.FillEllipse(Brushes.Black, -2, -2, 4, 4);
161 | g.DrawEllipse(linePen, -80, -80, 160, 160);
162 | g.DrawEllipse(linePen, -170, -170, 340, 340);
163 | g.DrawEllipse(linePen, -WIDTH / 2 + 6, -HEIGHT / 2 + 6, WIDTH - 6, HEIGHT - 6);
164 |
165 | g.ScaleTransform(scale, scale);
166 |
167 | List hLis = new List();
168 | lock (harvestableHandler)
169 | {
170 | try
171 | {
172 | hLis = this.harvestableHandler.HarvestableList.ToList();
173 | }
174 | catch (Exception e1) { }
175 | }
176 | foreach (Harvestable h in hLis)
177 | {
178 | if (!Settings.IsInTiers(h.Tier, h.Charges)) continue;
179 | if (!Settings.IsInHarvestable((HarvestableType)h.Type)) continue;
180 |
181 | if (h.Size == 0) continue;
182 |
183 | Single hX = -1 * h.PosX + lpX;
184 | Single hY = h.PosY - lpY;
185 |
186 | g.FillEllipse(harvestBrushes[h.Tier], (float)(hX - 2.5f), (float)(hY - 2.5f), 5f, 5f);
187 | g.TranslateTransform(hX, hY);
188 | g.RotateTransform(135f);
189 | g.DrawString(h.getMapInfo(), font, fontPerColor[h.Tier], -2.5f, -2.5f);
190 | g.RotateTransform(-135f);
191 | g.TranslateTransform(-hX, -hY);
192 |
193 |
194 | if (h.Charges > 0) g.DrawEllipse(chargePen[h.Charges], hX - 3, hY - 3, 6, 6);
195 | }
196 |
197 | if (Settings.DisplayPeople)
198 | {
199 | List pLis = new List();
200 | lock (this.playerHandler.PlayersInRange)
201 | {
202 | try
203 | {
204 | pLis = this.playerHandler.PlayersInRange.ToList();
205 | }
206 | catch (Exception e2) { }
207 | }
208 |
209 | foreach (Player p in pLis)
210 | {
211 | Single hX = -1 * p.PosX + lpX;
212 | Single hY = p.PosY - lpY;
213 | g.FillEllipse(playerBrush, hX, hY, 4, 4);
214 | }
215 | }
216 |
217 | List mList = new List();
218 | lock (mobsHandler.MobList)
219 | {
220 | try
221 | {
222 | mList = this.mobsHandler.MobList.ToList();
223 | }
224 | catch (Exception e1) { }
225 | }
226 |
227 | foreach (Mob m in mList)
228 | {
229 | Single hX = -1 * m.PosX + lpX;
230 | Single hY = m.PosY - lpY;
231 |
232 | byte mobTier = 5;
233 | MobType mobType = MobType.OTHER;
234 |
235 | if (m.MobInfo != null)
236 | {
237 | mobTier = m.MobInfo.Tier;
238 | mobType = m.MobInfo.MobType;
239 |
240 | if (!Settings.IsInMobs(mobType)) continue;
241 | if (!Settings.IsInTiers(mobTier, m.EnchantmentLevel)) continue;
242 |
243 | switch (m.MobInfo.HarvestableMobType)
244 | {
245 | case HarvestableMobType.ESSENCE:
246 | //idk?
247 | case HarvestableMobType.SWAMP:
248 | if (!Settings.IsInHarvestable(HarvestableType.FIBER)) continue;
249 | break;
250 | case HarvestableMobType.STEPPE:
251 | if (!Settings.IsInHarvestable(HarvestableType.HIDE)) continue;
252 | break;
253 | case HarvestableMobType.MOUNTAIN:
254 | if (!Settings.IsInHarvestable(HarvestableType.ORE)) continue;
255 | break;
256 | case HarvestableMobType.FOREST:
257 | if (!Settings.IsInHarvestable(HarvestableType.WOOD)) continue;
258 | break;
259 | case HarvestableMobType.HIGHLAND:
260 | if (!Settings.IsInHarvestable(HarvestableType.ROCK)) continue;
261 | break;
262 | }
263 | if (Settings.IsInTiers(mobTier, m.EnchantmentLevel))
264 | {
265 | g.FillEllipse(harvestBrushes[mobTier], (float)(hX - 2.5f), (float)(hY - 2.5f), 5f, 5f);
266 | g.TranslateTransform(hX, hY);
267 | g.RotateTransform(135f);
268 | g.DrawString(m.getMapStringInfo(), font, fontPerColor[mobTier], -2.5f, -2.5f);
269 | g.RotateTransform(-135f);
270 | g.TranslateTransform(-hX, -hY);
271 | }
272 | }
273 | else
274 | {
275 | if (Settings.IsInMobs(MobType.OTHER))
276 | g.FillEllipse(Brushes.Black, hX - 1, hY - 1, 2f, 2f);
277 | continue;
278 | }
279 |
280 | if (m.EnchantmentLevel > 0)
281 | {
282 | g.DrawEllipse(chargePen[m.EnchantmentLevel], hX - 3, hY - 3, 6, 6);
283 | }
284 | }
285 | if (mapForm.InvokeRequired)
286 | {
287 | mapForm.Invoke((Action)(() =>
288 | {
289 | mapForm.SetBitmap(RotateImage(bitmap, 225f));
290 | bitmap.Dispose();
291 | }));
292 | }
293 | }
294 | // Thread.Sleep(10);
295 | }
296 | }
297 | public string Between(string STR, string FirstString, string LastString)
298 | {
299 | string FinalString;
300 | int Pos1 = STR.IndexOf(FirstString) + FirstString.Length;
301 | int Pos2 = STR.IndexOf(LastString);
302 | FinalString = STR.Substring(Pos1, Pos2 - Pos1);
303 | return FinalString;
304 | }
305 |
306 | private void createListener()
307 | {
308 | IList allDevices = LivePacketDevice.AllLocalMachine;
309 | if (allDevices.Count == 0)
310 | {
311 | MessageBox.Show("No interfaces found! Make sure WinPcap is installed.");
312 | return;
313 | }
314 | // Print the list
315 | for (int i = 0; i != allDevices.Count; ++i)
316 | {
317 | LivePacketDevice device = allDevices[i];
318 |
319 | if (device.Description != null)
320 | Console.WriteLine(" (" + device.Description + ")");
321 | else
322 | Console.WriteLine(" (No description available)");
323 | }
324 |
325 | foreach (PacketDevice selectedDevice in allDevices.ToList())
326 | {
327 | // Open the device
328 | Thread t = new Thread(() =>
329 | {
330 | using (PacketCommunicator communicator =
331 | selectedDevice.Open(65536, // portion of the packet to capture
332 | // 65536 guarantees that the whole packet will be captured on all the link layers
333 | PacketDeviceOpenAttributes.Promiscuous, // promiscuous mode
334 | 1000)) // read timeout
335 | {
336 | // Check the link layer. We support only Ethernet for simplicity.
337 | if (communicator.DataLink.Kind != DataLinkKind.Ethernet)
338 | {
339 | Console.WriteLine("This program works only on Ethernet networks.");
340 | return;
341 | }
342 |
343 | // Compile the filter
344 | using (BerkeleyPacketFilter filter = communicator.CreateFilter("ip and udp"))
345 | {
346 | // Set the filter
347 | communicator.SetFilter(filter);
348 | }
349 |
350 | Console.WriteLine("Listening on " + selectedDevice.Description + "...");
351 |
352 | // start the capture
353 | communicator.ReceivePackets(0, photonPacketHandler.PacketHandler);
354 |
355 | }
356 | });
357 | t.Start();
358 | }
359 |
360 | }
361 |
362 | private void updateSettings()
363 | {
364 | Settings.UpdateTier(1, 0, this.cbTier1230.Checked);
365 | Settings.UpdateTier(2, 0, this.cbTier1230.Checked);
366 | Settings.UpdateTier(3, 0, this.cbTier1230.Checked);
367 |
368 | Settings.UpdateTier(4, 0, this.cbTier40.Checked);
369 | Settings.UpdateTier(4, 1, this.cbTier41.Checked);
370 | Settings.UpdateTier(4, 2, this.cbTier42.Checked);
371 | Settings.UpdateTier(4, 3, this.cbTier43.Checked);
372 |
373 | Settings.UpdateTier(5, 0, this.cbTier50.Checked);
374 | Settings.UpdateTier(5, 1, this.cbTier51.Checked);
375 | Settings.UpdateTier(5, 2, this.cbTier52.Checked);
376 | Settings.UpdateTier(5, 3, this.cbTier53.Checked);
377 |
378 | Settings.UpdateTier(6, 0, this.cbTier60.Checked);
379 | Settings.UpdateTier(6, 1, this.cbTier61.Checked);
380 | Settings.UpdateTier(6, 2, this.cbTier62.Checked);
381 | Settings.UpdateTier(6, 3, this.cbTier63.Checked);
382 |
383 | Settings.UpdateTier(7, 0, this.cbTier70.Checked);
384 | Settings.UpdateTier(7, 1, this.cbTier71.Checked);
385 | Settings.UpdateTier(7, 2, this.cbTier72.Checked);
386 | Settings.UpdateTier(7, 3, this.cbTier73.Checked);
387 |
388 | Settings.UpdateTier(8, 0, this.cbTier80.Checked);
389 | Settings.UpdateTier(8, 1, this.cbTier81.Checked);
390 | Settings.UpdateTier(8, 2, this.cbTier82.Checked);
391 | Settings.UpdateTier(8, 3, this.cbTier83.Checked);
392 |
393 |
394 |
395 | Settings.UpdateHarvestable(new List{
396 | HarvestableType.FIBER,
397 | HarvestableType.FIBER_CRITTER,
398 | HarvestableType.FIBER_GUARDIAN_DEAD,
399 | HarvestableType.FIBER_GUARDIAN_RED
400 | }, this.cbFiber.Checked);
401 | Settings.UpdateHarvestable(new List{
402 | HarvestableType.WOOD,
403 | HarvestableType.WOOD_CRITTER_DEAD,
404 | HarvestableType.WOOD_CRITTER_GREEN,
405 | HarvestableType.WOOD_CRITTER_RED,
406 | HarvestableType.WOOD_GIANTTREE,
407 | HarvestableType.WOOD_GUARDIAN_RED
408 | }, this.cbWood.Checked);
409 | Settings.UpdateHarvestable(new List{
410 | HarvestableType.ORE,
411 | HarvestableType.ORE_CRITTER_DEAD,
412 | HarvestableType.ORE_CRITTER_GREEN,
413 | HarvestableType.ORE_CRITTER_RED,
414 | HarvestableType.ORE_GUARDIAN_RED
415 | }, this.cbOre.Checked);
416 | Settings.UpdateHarvestable(new List{
417 | HarvestableType.ROCK,
418 | HarvestableType.ROCK_CRITTER_DEAD,
419 | HarvestableType.ROCK_CRITTER_GREEN,
420 | HarvestableType.ROCK_CRITTER_RED,
421 | HarvestableType.ROCK_GUARDIAN_RED
422 | }, this.cbRock.Checked);
423 |
424 | Settings.UpdateHarvestable(new List{
425 | HarvestableType.HIDE,
426 | HarvestableType.HIDE_CRITTER,
427 | HarvestableType.HIDE_FOREST,
428 | HarvestableType.HIDE_GUARDIAN,
429 | HarvestableType.HIDE_HIGHLAND,
430 | HarvestableType.HIDE_MOUNTAIN,
431 | HarvestableType.HIDE_STEPPE,
432 | HarvestableType.HIDE_SWAMP
433 | }, this.cbSkinnable.Checked);
434 |
435 | Settings.UpdateHarvestableMob(MobType.HARVESTABLE, cbHarvestable.Checked);
436 | Settings.UpdateHarvestableMob(MobType.SKINNABLE, cbSkinnable.Checked);
437 | Settings.UpdateHarvestableMob(MobType.OTHER, cbOtherMobs.Checked);
438 | Settings.UpdateHarvestableMob(MobType.RESOURCE, cbTreasures.Checked);
439 |
440 | Settings.setSoundsOnPlayer(cbSounds.Checked);
441 |
442 | Settings.saveSettings(this);
443 | }
444 | private void tierCheckChange(object sender, EventArgs e)
445 | {
446 | updateSettings();
447 | }
448 | private void harvestableCheckChange(object sender, EventArgs e)
449 | {
450 | updateSettings();
451 |
452 | }
453 |
454 | private void cbDisplayPeople_CheckedChanged(object sender, EventArgs e)
455 | {
456 | Settings.UpdateDisplayPeople(this.cbDisplayPeople.Checked);
457 | }
458 | private MouseClickMessageFilter Filter;
459 |
460 | [DllImport("user32.dll")]
461 | static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong);
462 |
463 | [DllImport("user32.dll", SetLastError = true)]
464 | static extern UInt32 GetWindowLong(IntPtr hWnd, int nIndex);
465 | [DllImport("user32.dll")]
466 | [return: MarshalAs(UnmanagedType.Bool)]
467 | public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
468 | private static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
469 | private const UInt32 SWP_NOSIZE = 0x0001;
470 | private const UInt32 SWP_NOMOVE = 0x0002;
471 | private const UInt32 TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE;
472 |
473 |
474 | protected override void OnPaintBackground(PaintEventArgs e)
475 | // Paint background with underlying graphics from other controls
476 | {
477 |
478 | }
479 | private void Form1_FormClosing(object sender, FormClosingEventArgs e)
480 | {
481 | Environment.Exit(Environment.ExitCode);
482 | }
483 |
484 |
485 | private void cbSounds_CheckedChanged(object sender, EventArgs e)
486 | {
487 | updateSettings();
488 | }
489 |
490 | private void groupBox4_Enter(object sender, EventArgs e)
491 | {
492 |
493 | }
494 |
495 | private void MoveRadarValueChanged(object sender, EventArgs e)
496 | {
497 | Console.WriteLine(nRadarX.Value + " " + nRadarY.Value);
498 | if (mapForm.InvokeRequired)
499 | {
500 | mapForm.Invoke((Action)(() =>
501 | {
502 | mapForm.Left = int.Parse(nRadarX.Value.ToString());
503 | mapForm.Top = int.Parse(nRadarY.Value.ToString());
504 | }));
505 | }
506 | else
507 | {
508 | mapForm.Left = int.Parse(nRadarX.Value.ToString());
509 | mapForm.Top = int.Parse(nRadarY.Value.ToString());
510 | }
511 | updateSettings();
512 | }
513 |
514 | }
515 | }
516 |
--------------------------------------------------------------------------------