forked from botkalista/ayaya-league-external
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Emily
committed
Aug 11, 2022
1 parent
fb10aba
commit db470af
Showing
9 changed files
with
134 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
import { CachedClass } from "./CachedClass"; | ||
import AyayaLeague from '../LeagueReader'; | ||
import { OFFSET } from "../consts/Offsets"; | ||
import { Vector3 } from "./Vector"; | ||
|
||
const Reader = AyayaLeague.reader; | ||
|
||
export class ActiveSpellEntry extends CachedClass { | ||
|
||
|
||
constructor(public address: number) { super(); } | ||
|
||
get isBasic() { | ||
return this.use("isBasic", () => Reader.readProcessMemory(this.address + OFFSET.oActiveSpellEntryIsBasic, "BOOL")); | ||
} | ||
|
||
get startPos() { | ||
return this.use("startPos", () => Vector3.fromData(Reader.readProcessMemory(this.address + OFFSET.oActiveSpellEntryStartPos, "VEC3"))); | ||
} | ||
|
||
get endPos() { | ||
return this.use("endPos", () => Vector3.fromData(Reader.readProcessMemory(this.address + OFFSET.oActiveSpellEntryEndPos, "VEC3"))); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { CachedClass } from "./CachedClass"; | ||
import AyayaLeague from '../LeagueReader'; | ||
import { OFFSET } from "../consts/Offsets"; | ||
import { readName } from "../StructureReader"; | ||
|
||
const Reader = AyayaLeague.reader; | ||
|
||
export class Buff extends CachedClass { | ||
|
||
|
||
constructor(private address: number) { super(); } | ||
|
||
private get entry() { | ||
return this.use('entry', () => Reader.readProcessMemory(this.address + 0x8, "DWORD")) | ||
} | ||
|
||
get name() { | ||
return this.use('name', () => readName(this.entry + OFFSET.oBuffName, true)); | ||
} | ||
|
||
get startTime() { | ||
return this.use('startTime', () => Reader.readProcessMemory(this.address + OFFSET.oBuffStartTime, "FLOAT")); | ||
} | ||
|
||
get endtime() { | ||
return this.use('endtime', () => Reader.readProcessMemory(this.address + OFFSET.oBuffEndTime, "FLOAT")); | ||
} | ||
|
||
get count() { | ||
return this.use('count', () => Reader.readProcessMemory(this.address + OFFSET.oBuffCount, "DWORD")); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { CachedClass } from "./CachedClass"; | ||
import AyayaLeague from '../LeagueReader'; | ||
import { OFFSET } from "../consts/Offsets"; | ||
import { Buff } from "./Buff"; | ||
|
||
const Reader = AyayaLeague.reader; | ||
|
||
export class BuffManager extends CachedClass { | ||
|
||
|
||
constructor(private address: number) { super(); } | ||
|
||
get buffs() { | ||
return this.use('buffs', () => { | ||
const buffsSize = Reader.readProcessMemory(this.address + OFFSET.oBuffArrayLength, "DWORD"); | ||
const buffsArray = Reader.readProcessMemory(this.address + OFFSET.oBuffArray, "DWORD"); | ||
const result: Buff[] = []; | ||
for (let i = 0; i < 100; i++) { | ||
const buffAddress = Reader.readProcessMemory(buffsArray + (i * OFFSET.oBuffSize), "DWORD"); | ||
if (buffAddress >= buffsSize) break; | ||
const buff = new Buff(buffAddress); | ||
result.push(buff); | ||
} | ||
return result; | ||
}); | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters