@airbreather/mod-nodejs-types 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/classes/ACMap.d.ts +3 -3
- package/classes/Auction.d.ts +0 -1
- package/classes/AuctionHouse.d.ts +1 -1
- package/classes/ChatHandler.d.ts +1 -1
- package/classes/Config.d.ts +12 -12
- package/classes/CreatureTemplate.d.ts +5 -5
- package/classes/GameObject.d.ts +4 -0
- package/classes/Guild.d.ts +2 -2
- package/classes/Loot.d.ts +8 -5
- package/classes/LootStore.d.ts +0 -2
- package/classes/LootTemplate.d.ts +1 -1
- package/classes/MailDraft.d.ts +2 -2
- package/classes/Pet.d.ts +38 -1
- package/classes/WorldObject.d.ts +0 -1
- package/enums/ActiveStates.d.ts +11 -0
- package/enums/HappinessState.d.ts +8 -0
- package/enums/{MailCheckedMask.d.ts → MailCheckMask.d.ts} +1 -1
- package/enums/PetSpellType.d.ts +8 -0
- package/enums/index.d.ts +4 -1
- package/package.json +1 -1
- package/records/CreatureMovementData.d.ts +1 -1
- package/records/PetSpell.d.ts +8 -0
- package/records/index.d.ts +1 -0
package/classes/ACMap.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
namespace Acore {
|
|
3
3
|
class ACMap {
|
|
4
|
-
static nonInstancedById(id: number): ACMap;
|
|
5
|
-
static instancedById(id: number, instanceId: number): ACMap;
|
|
6
|
-
static entrancePosById(id: number): Position;
|
|
4
|
+
static nonInstancedById(id: number): ACMap | undefined;
|
|
5
|
+
static instancedById(id: number, instanceId: number): ACMap | undefined;
|
|
6
|
+
static entrancePosById(id: number): Position | undefined;
|
|
7
7
|
|
|
8
8
|
readonly mapId: number;
|
|
9
9
|
readonly instanceId: number;
|
package/classes/Auction.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ declare global {
|
|
|
26
26
|
|
|
27
27
|
deleteFromDB(): void;
|
|
28
28
|
saveToDB(): void;
|
|
29
|
-
saveToDB(): void;
|
|
30
29
|
sendAuctionWonMail(sendNotification?: boolean, updateAchievementCriteria?: boolean): void;
|
|
31
30
|
sendAuctionSalePendingMail(): void;
|
|
32
31
|
sendAuctionSuccessfulMail(sendNotification?: boolean, updateAchievementCriteria?: boolean): void;
|
package/classes/ChatHandler.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare global {
|
|
|
5
5
|
readonly selectedPlayer: Player | undefined;
|
|
6
6
|
readonly selectedPlayerOrSelf: Player | undefined;
|
|
7
7
|
readonly selectedCreature: Creature | undefined;
|
|
8
|
-
readonly selectedUnit: Unit | undefined
|
|
8
|
+
readonly selectedUnit: Unit | undefined;
|
|
9
9
|
readonly selectedObject: WorldObject | undefined;
|
|
10
10
|
readonly isConsole: boolean;
|
|
11
11
|
readonly hasSentErrorMessage: boolean;
|
package/classes/Config.d.ts
CHANGED
|
@@ -4,18 +4,18 @@ declare global {
|
|
|
4
4
|
static getArguments(): string[];
|
|
5
5
|
static getConfigPath(): string;
|
|
6
6
|
static getFilename(): string;
|
|
7
|
-
static getKeysStartingWith(): string[];
|
|
8
|
-
static getBool(): boolean;
|
|
9
|
-
static getString(): string;
|
|
10
|
-
static getFloat(): number;
|
|
11
|
-
static getU8(): number;
|
|
12
|
-
static getI8(): number;
|
|
13
|
-
static getU16(): number;
|
|
14
|
-
static getI16(): number;
|
|
15
|
-
static getU32(): number;
|
|
16
|
-
static getI32(): number;
|
|
17
|
-
static getU64(): number | bigint;
|
|
18
|
-
static getI64(): number | bigint;
|
|
7
|
+
static getKeysStartingWith(prefix: string): string[];
|
|
8
|
+
static getBool(key: string, def?: boolean, showLogs?: boolean): boolean;
|
|
9
|
+
static getString(key: string, def?: string, showLogs?: boolean): string;
|
|
10
|
+
static getFloat(key: string, def?: number, showLogs?: boolean): number;
|
|
11
|
+
static getU8(key: string, def?: number, showLogs?: boolean): number;
|
|
12
|
+
static getI8(key: string, def?: number, showLogs?: boolean): number;
|
|
13
|
+
static getU16(key: string, def?: number, showLogs?: boolean): number;
|
|
14
|
+
static getI16(key: string, def?: number, showLogs?: boolean): number;
|
|
15
|
+
static getU32(key: string, def?: number, showLogs?: boolean): number;
|
|
16
|
+
static getI32(key: string, def?: number, showLogs?: boolean): number;
|
|
17
|
+
static getU64(key: string, def?: number | bigint, showLogs?: boolean): number | bigint;
|
|
18
|
+
static getI64(key: string, def?: number | bigint, showLogs?: boolean): number | bigint;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -29,7 +29,7 @@ declare global {
|
|
|
29
29
|
readonly unitClass: CreatureClasses;
|
|
30
30
|
readonly unitFlags: UnitFlags;
|
|
31
31
|
readonly unitFlags2: UnitFlags2;
|
|
32
|
-
readonly
|
|
32
|
+
readonly dynamicFlags: UnitDynFlags;
|
|
33
33
|
readonly family: CreatureFamily;
|
|
34
34
|
readonly creatureType: CreatureType;
|
|
35
35
|
readonly creatureTypeFlags: CreatureTypeFlags;
|
|
@@ -59,10 +59,10 @@ declare global {
|
|
|
59
59
|
readonly requiredLootSkill: SkillType;
|
|
60
60
|
readonly isExotic: boolean;
|
|
61
61
|
|
|
62
|
-
getModelByIdx(idx: number): CreatureModel;
|
|
63
|
-
getRandomValidModel(): CreatureModel;
|
|
64
|
-
getFirstValidModel(): CreatureModel;
|
|
65
|
-
getModelWithDisplayId(displayId: number): CreatureModel;
|
|
62
|
+
getModelByIdx(idx: number): CreatureModel | undefined;
|
|
63
|
+
getRandomValidModel(): CreatureModel | undefined;
|
|
64
|
+
getFirstValidModel(): CreatureModel | undefined;
|
|
65
|
+
getModelWithDisplayId(displayId: number): CreatureModel | undefined;
|
|
66
66
|
getFirstInvisibleModel(): CreatureModel;
|
|
67
67
|
getFirstVisibleModel(): CreatureModel;
|
|
68
68
|
isTameable(exotic: boolean): boolean;
|
package/classes/GameObject.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare global {
|
|
|
18
18
|
spellId: number;
|
|
19
19
|
isSpawnedByDefault: boolean;
|
|
20
20
|
|
|
21
|
+
hasQuest(quest: Quest): boolean;
|
|
21
22
|
setLootState(lootState: LootState, unit?: Unit): void;
|
|
22
23
|
useDoorOrButton(timeToRestore?: Temporal.Duration, alternative?: boolean, user?: Unit): void;
|
|
23
24
|
despawn(): void;
|
|
@@ -26,6 +27,9 @@ declare global {
|
|
|
26
27
|
refresh(): void;
|
|
27
28
|
saveToDB(saveAddon?: boolean): void;
|
|
28
29
|
saveToDBExtra(mapId: number, spawnMask: number, phaseMask: number, saveAddon?: boolean): void;
|
|
30
|
+
delete(): void;
|
|
31
|
+
deleteFromDB(): void;
|
|
32
|
+
getFishLoot(lootOwner: Player, junk?: boolean): Loot;
|
|
29
33
|
// mod-nodejs inventions: SetRespawnTime and SetRespawnDelay names confuse me greatly. when I
|
|
30
34
|
// worked out what they were, I thought of better names and a nicer way to handle the former.
|
|
31
35
|
setTimeUntilNextRespawn(delay: Temporal.Duration): void;
|
package/classes/Guild.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ declare global {
|
|
|
7
7
|
|
|
8
8
|
readonly id: number;
|
|
9
9
|
readonly leaderGuid: ObjectGuidNative;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
10
|
+
readonly members: Map<number, GuildMember>;
|
|
11
|
+
readonly memberCount: number;
|
|
12
12
|
readonly totalBankMoney: number | bigint;
|
|
13
13
|
readonly createdDate: Temporal.Instant;
|
|
14
14
|
name: string;
|
package/classes/Loot.d.ts
CHANGED
|
@@ -12,15 +12,18 @@ declare global {
|
|
|
12
12
|
lootType: LootType;
|
|
13
13
|
unlootedCount: number;
|
|
14
14
|
gold: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
sourceWorldObjectGuid: ObjectGuidNative | undefined;
|
|
15
|
+
roundRobinPlayer: ObjectGuid | undefined;
|
|
16
|
+
lootOwnerGuid: ObjectGuid | undefined;
|
|
17
|
+
containerGuid: ObjectGuid | undefined;
|
|
18
|
+
sourceWorldObjectGuid: ObjectGuid | undefined;
|
|
20
19
|
|
|
20
|
+
getMaxSlotForPlayer(player: Player): number;
|
|
21
|
+
hasItem(itemId?: number, count?: number): boolean;
|
|
21
22
|
addItem(itemId: number, minCount: number, maxCount: number, chance: number, lootMode: LootModes, needsQuest?: boolean, allowStacking?: boolean, maxStackSize?: number): void;
|
|
23
|
+
removeItem(itemId: number, count?: number): void;
|
|
22
24
|
clear(): void;
|
|
23
25
|
generateMoney(min: number, max: number): void;
|
|
26
|
+
setItemLooted(itemId: number, count: number, looted: boolean): void;
|
|
24
27
|
addLooter(looter: ObjectGuid): void;
|
|
25
28
|
removeLooter(looter: ObjectGuid): void;
|
|
26
29
|
}
|
package/classes/LootStore.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
namespace Acore {
|
|
3
3
|
class LootTemplate {
|
|
4
|
-
process(loot: Loot, lootStore: LootStore, lootMode: LootModes, player: Player, groupId?: number, isTopLevel?: boolean): void;
|
|
4
|
+
process(loot: Loot, lootStore: LootStore | LootStoreType, lootMode: LootModes, player: Player, groupId?: number, isTopLevel?: boolean): void;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
}
|
package/classes/MailDraft.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ declare global {
|
|
|
4
4
|
constructor(subject: string, text: string);
|
|
5
5
|
|
|
6
6
|
addMoney(money: number): MailDraft;
|
|
7
|
-
addCOD(
|
|
7
|
+
addCOD(cod: number): MailDraft;
|
|
8
8
|
addItem(item: Item): MailDraft;
|
|
9
9
|
createAndAddItem(entry: number, amount?: number): ObjectGuid;
|
|
10
|
-
send(receiver: ObjectGuid, sender: MailSender, checked?:
|
|
10
|
+
send(receiver: ObjectGuid, sender: MailSender, checked?: MailCheckMask, deliverDelay?: number, customExpiration?: number): void;
|
|
11
11
|
sendReturnToSender(senderAccount: number, sender: ObjectGuid, receiver: ObjectGuid): void;
|
|
12
12
|
}
|
|
13
13
|
}
|
package/classes/Pet.d.ts
CHANGED
|
@@ -8,10 +8,47 @@ declare global {
|
|
|
8
8
|
readonly hasTempSpell: boolean;
|
|
9
9
|
readonly autoSpellSize: number;
|
|
10
10
|
readonly petInfo: PetInfo;
|
|
11
|
-
readonly spells: Map<number,
|
|
11
|
+
readonly spells: Map<number, PetSpell>;
|
|
12
12
|
readonly autospells: number[];
|
|
13
13
|
readonly usedTalentCount: number;
|
|
14
14
|
readonly declinedNames: string[];
|
|
15
|
+
petType: PetType;
|
|
16
|
+
isBeingLoaded: boolean;
|
|
17
|
+
duration: Temporal.Duration;
|
|
18
|
+
freeTalentPoints: number;
|
|
19
|
+
happinessState: HappinessState;
|
|
20
|
+
auraUpdateMaskForRaid: number | bigint;
|
|
21
|
+
|
|
22
|
+
generateActionBarData(): string;
|
|
23
|
+
isPermanentPetFor(owner: Player): boolean;
|
|
24
|
+
getCurrentFoodBenefitLevel(itemLevel: number): number;
|
|
25
|
+
getAutoSpellOnPos(pos: number): number;
|
|
26
|
+
haveInDiet(item: ItemTemplate): boolean;
|
|
27
|
+
createBaseAtCreature(creature: Creature): boolean;
|
|
28
|
+
givePetXP(xp: number): void;
|
|
29
|
+
givePetLevel(level: number): void;
|
|
30
|
+
synchronizeLevelWithOwner(): void;
|
|
31
|
+
learnPetPassives(): void;
|
|
32
|
+
castWhenWillAvailable(spellId: number, target: Unit, oldTarget: ObjectGuid, isPositive?: boolean): void;
|
|
33
|
+
clearCastWhenWillAvailable(): void;
|
|
34
|
+
removeSpellCooldown(spellId: number, update: boolean): void;
|
|
35
|
+
addSpell(spellId: number, activeStates?: ActiveStates, state?: PetSpellState, type?: PetSpellType): boolean;
|
|
36
|
+
learnSpell(spellId: number): boolean;
|
|
37
|
+
learnSpellHighRank(spellId: number): void;
|
|
38
|
+
initLevelupSpellsForLevel(): void;
|
|
39
|
+
unlearnSpell(spellId: number, learnPrev: boolean, clearAb?: boolean): boolean;
|
|
40
|
+
removeSpell(spellId: number, learnPrev: boolean, clearAb?: boolean): boolean;
|
|
41
|
+
cleanupActionBar(): void;
|
|
42
|
+
initPetCreateSpells(): void;
|
|
43
|
+
resetTalents(): boolean;
|
|
44
|
+
initTalentForLevel(): void;
|
|
45
|
+
savePetToDB(mode: PetSaveMode): void;
|
|
46
|
+
loseHappiness(): void;
|
|
47
|
+
remove(mode: PetSaveMode, returnReagent?: boolean): void;
|
|
48
|
+
toggleAutocast(spellInfo: SpellInfo, apply: boolean): void;
|
|
49
|
+
castPetAuras(current: boolean): void;
|
|
50
|
+
getMaxTalentPointsForLevel(level: number): number;
|
|
51
|
+
resetAuraUpdateMaskForRaid(): void;
|
|
15
52
|
}
|
|
16
53
|
}
|
|
17
54
|
}
|
package/classes/WorldObject.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ declare global {
|
|
|
33
33
|
getGameObjectsInRange(range: number, entry?: number): GameObject[];
|
|
34
34
|
getUnitsInRange(range: number): Unit[];
|
|
35
35
|
getNearObjects(range: number, mask?: NearObjectsMask): WorldObject[];
|
|
36
|
-
getNearObjects(range: number, mask?: NearObjectsMask): WorldObject[];
|
|
37
36
|
sendMessageToSet(packet: WorldPacket, self: boolean): void;
|
|
38
37
|
sendMessageToSetInRange(packet: WorldPacket, range: number): void;
|
|
39
38
|
sendMessageToSetExceptPlayer(packet: WorldPacket, skippedReceiver: Player): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
const enum ActiveStates {
|
|
3
|
+
ACT_PASSIVE = 0x01, // 0x01 - passive
|
|
4
|
+
ACT_DISABLED = 0x81, // 0x80 - castable
|
|
5
|
+
ACT_ENABLED = 0xC1, // 0x40 | 0x80 - auto cast + castable
|
|
6
|
+
ACT_COMMAND = 0x07, // 0x01 | 0x02 | 0x04
|
|
7
|
+
ACT_REACTION = 0x06, // 0x02 | 0x04
|
|
8
|
+
ACT_DECIDE = 0x00, // custom
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {};
|
package/enums/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type * from './AccountFlags.d.ts';
|
|
|
2
2
|
export type * from './AccountTypes.d.ts';
|
|
3
3
|
export type * from './AchievementFlags.d.ts';
|
|
4
4
|
export type * from './AcoreStrings.d.ts';
|
|
5
|
+
export type * from './ActiveStates.d.ts';
|
|
5
6
|
export type * from './ArenaTeamInfoType.d.ts';
|
|
6
7
|
export type * from './ArenaType.d.ts';
|
|
7
8
|
export type * from './AtLoginFlags.d.ts';
|
|
@@ -58,6 +59,7 @@ export type * from './GuildBankEventLogTypes.d.ts';
|
|
|
58
59
|
export type * from './GuildDefaultRanks.d.ts';
|
|
59
60
|
export type * from './GuildEventLogTypes.d.ts';
|
|
60
61
|
export type * from './GuildMemberFlags.d.ts';
|
|
62
|
+
export type * from './HappinessState.d.ts';
|
|
61
63
|
export type * from './HighGuid.d.ts';
|
|
62
64
|
export type * from './HolidayIds.d.ts';
|
|
63
65
|
export type * from './InventoryResult.d.ts';
|
|
@@ -96,7 +98,7 @@ export type * from './LootModes.d.ts';
|
|
|
96
98
|
export type * from './LootState.d.ts';
|
|
97
99
|
export type * from './LootStoreType.d.ts';
|
|
98
100
|
export type * from './LootType.d.ts';
|
|
99
|
-
export type * from './
|
|
101
|
+
export type * from './MailCheckMask.d.ts';
|
|
100
102
|
export type * from './MailMessageType.d.ts';
|
|
101
103
|
export type * from './MailStationery.d.ts';
|
|
102
104
|
export type * from './Mechanics.d.ts';
|
|
@@ -109,6 +111,7 @@ export type * from './OnlineState.d.ts';
|
|
|
109
111
|
export type * from './PetDiet.d.ts';
|
|
110
112
|
export type * from './PetSaveMode.d.ts';
|
|
111
113
|
export type * from './PetSpellState.d.ts';
|
|
114
|
+
export type * from './PetSpellType.d.ts';
|
|
112
115
|
export type * from './PetType.d.ts';
|
|
113
116
|
export type * from './PlayerChatTag.d.ts';
|
|
114
117
|
export type * from './PlayerFlags.d.ts';
|
package/package.json
CHANGED
package/records/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type * from './ItemStat.d.ts';
|
|
|
17
17
|
export type * from './LootItem.d.ts';
|
|
18
18
|
export type * from './ObjectGuid.d.ts';
|
|
19
19
|
export type * from './PetInfo.d.ts';
|
|
20
|
+
export type * from './PetSpell.d.ts';
|
|
20
21
|
export type * from './Position.d.ts';
|
|
21
22
|
export type * from './PvPDifficultyEntry.d.ts';
|
|
22
23
|
export type * from './SpellCastTimesEntry.d.ts';
|