Skip to content

Commit

Permalink
Merge pull request #281 from Kyusung4698/develop
Browse files Browse the repository at this point in the history
## 0.5.22 (2020-03-08)
  • Loading branch information
Kyusung4698 authored Mar 8, 2020
2 parents 827fdd2 + b7c4bea commit 97c1d8d
Show file tree
Hide file tree
Showing 48 changed files with 2,432 additions and 2,516 deletions.
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"args" : ["."],
"outputCapture": "std"
}
]
}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"when": "$(basename).ts"
},
"**/*.js.map": true,
"node_modules": true,
"release": true,
"dist": true
}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.5.22 (2020-03-08)

- add dialog spawn position as general setting (Cursor, Center) (#210)
- update data to 3.9.3
- remove hotkeys dependency (#261)
- fix timeless jewels missing keystone (#274)
- fix `waterways map of vulnerablity` mismatched with `vulnerablitity skill gem` (#268)

## 0.5.21 (2020-02-23)

- fix fast tag not working on multiple monitor set-up (#266)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PoE Overlay 0.5.21
# PoE Overlay 0.5.22

An Overlay for Path of Exile. The ***core aspect*** is to blend in with the game. Built with Electron and Angular.

Expand Down Expand Up @@ -81,9 +81,9 @@ These instructions will set you up to run and enjoy the overlay.

1. Head over to [Releases](/~https://github.com/Kyusung4698/PoE-Overlay/releases) and download the latest zip
2. Extract zip
3. Run `poe-overlay 0.5.21.exe`
3. Run `poe-overlay 0.5.22.exe`
4. Start Path of Exile
5. Wait until you can see `PoE Overlay 0.5.21` in the bottom left corner
5. Wait until you can see `PoE Overlay 0.5.22` in the bottom left corner
6. Hit `f7` and set `Language` and `League` to meet your game settings

#### Shortcuts
Expand Down
53 changes: 53 additions & 0 deletions doc/poe/game_ctlr_c_item.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1128,3 +1128,56 @@ Right click to drink. Can only hold charges while in belt. Refills as you kill m
Note: ~price 1 chance




Rarity: Magic
Waterways Map of Vulnerability
--------
Map Tier: 13
Atlas Region: Tirn's End
Item Quantity: +13% (augmented)
Item Rarity: +8% (augmented)
Monster Pack Size: +5% (augmented)
--------
Item Level: 81
--------
Players are Cursed with Vulnerability
--------
Travel to this Map by using it in a personal Map Device. Maps can only be used once.

Rarity: Rare
Silk Gloves
--------
Energy Shield: 43
--------
Requirements:
Level: 70
Int: 95
--------
Sockets: B-B B
--------
Item Level: 75
--------
12% increased Spell Damage (implicit)
--------
+19 to Dexterity
Adds 5 to 10 Physical Damage to Attacks
+400 to Accuracy Rating
9% increased Rarity of Items found

Rarity: Magic
Strong-Willed Fingerless Silk Gloves
--------
Energy Shield: 55 (augmented)
--------
Requirements:
Level: 70
Int: 95
--------
Sockets: R-B-B
--------
Item Level: 78
--------
13% increased Spell Damage (implicit)
--------
29% increased Energy Shield
9 changes: 7 additions & 2 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
},
"files": [
"main.js",
"hook.js",
"dist/**/*",
"!node_modules/@angular/**/*",
"!node_modules/@swimlane/**/*",
"!node_modules/rxjs/**/*",
"!node_modules/moment/**/*",
"!node_modules/zone.js/**/*",
"!node_modules/localforage/**/*",
Expand All @@ -20,5 +20,10 @@
"target": [
"portable"
]
},
"linux": {
"target": [
"AppImage"
]
}
}
}
124 changes: 124 additions & 0 deletions hook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import activeWin from 'active-win';
import iohook from 'iohook';
import { Subject, Subscription } from 'rxjs';
import { throttleTime } from 'rxjs/operators';

interface KeyboardEvent {
ctrlKey: boolean;
altKey: boolean;
shiftKey: boolean;
keycode: number;
}

interface WheelEvent {
rotation: number;
ctrlKey: boolean;
}

let active = false;
let activeChangeFn: (active: boolean) => void;
let wheelChangeFn: (event: WheelEvent) => void;

const activeCheck$ = new Subject<void>();
let activeCheckSubscription: Subscription;

function onKeydown(event: KeyboardEvent): void {
activeCheck$.next();
}

function onKeyup(event: KeyboardEvent): void {
activeCheck$.next();
}

function onMousewheel(event: WheelEvent): void {
activeCheck$.next();

if (active) {
if (wheelChangeFn) {
wheelChangeFn(event);
}
}
}

function onMouseclick(event: WheelEvent): void {
activeCheck$.next();
}

function checkActive(): void {
let old = active;

const win = activeWin.sync();
const path = win?.owner?.path
if (path) {
active = path.endsWith('PathOfExile_x64_KG.exe') || path.endsWith('PathOfExile_KG.exe')
|| path.endsWith('PathOfExile_x64Steam.exe') || path.endsWith('PathOfExileSteam.exe')
|| path.endsWith('PathOfExile_x64.exe') || path.endsWith('PathOfExile.exe');
}

if (old !== active) {
if (activeChangeFn) {
activeChangeFn(active);
}
}
}

export function getActive(): boolean {
return active;
}

export function on(event: 'change', callback: (active: boolean) => void): void;
export function on(event: 'wheel', callback: (event: WheelEvent) => void): void;

export function on(event: string, callback: any) {
switch (event) {
case 'change':
activeChangeFn = callback;
activeChangeFn(active);
break;
case 'wheel':
wheelChangeFn = callback;
break;
}
}

export function off(event: 'change' | 'wheel') {
switch (event) {
case 'change':
activeChangeFn = undefined;
break;
case 'wheel':
wheelChangeFn = undefined;
break;
}
}

export function register(): void {
iohook.start();

activeCheckSubscription = activeCheck$.pipe(
throttleTime(500, undefined, {
trailing: true,
leading: false
})
).subscribe(() => {
checkActive();
});

iohook.on('keydown', onKeydown);
iohook.on('keyup', onKeyup);
iohook.on('mousewheel', onMousewheel);
iohook.on('mouseup', onMouseclick);
}

export function unregister(): void {
iohook.off('keydown', onKeydown);
iohook.off('keyup', onKeyup);
iohook.off('mousewheel', onMousewheel);
iohook.off('mouseup', onMouseclick);

if (activeCheckSubscription) {
activeCheckSubscription.unsubscribe();
}

iohook.stop();
}
Loading

0 comments on commit 97c1d8d

Please sign in to comment.