@airbreather/mod-nodejs-types 0.0.10 → 0.0.12

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.
@@ -0,0 +1,13 @@
1
+ declare global {
2
+ namespace Acore {
3
+ class ObjectMgr {
4
+ private constructor();
5
+
6
+ static getNpcVendorItemList(vendor: number): ReadonlyVendorItemData | undefined;
7
+ static setNpcVendorItemList(vendor: number, data: VendorItemData): void;
8
+ static addVendorItem(vendor: number, item: number, maxCount: number, incrTime: Temporal.Duration, extendedCost: number, persist?: boolean): void;
9
+ static removeVendorItem(vendor: number, item: number, persist?: boolean): void;
10
+ }
11
+ }
12
+ }
13
+ export {};
package/classes/Unit.d.ts CHANGED
@@ -174,6 +174,7 @@ declare global {
174
174
  buildCastSpell(spell: SpellInfo): CastSpellBuilder;
175
175
  summonPlayer(player: Player): void
176
176
  dealDamage(target: Unit, amount: number, type?: DamageEffectType, spellSchoolMask?: SpellSchoolMask, spellInfo?: SpellInfo, durabilityLoss?: boolean, allowGm?: boolean, spell?: Spell): number;
177
+ hasUnitMovementFlag(flags: MovementFlags): boolean;
177
178
  }
178
179
  }
179
180
  }
@@ -0,0 +1,15 @@
1
+ declare global {
2
+ namespace Acore {
3
+ class VendorItem {
4
+ constructor(item: number, maxCount: number, incrTime: Temporal.Duration, extendedCost: number);
5
+
6
+ item: number;
7
+ maxCount: number;
8
+ incrTime: Temporal.Duration;
9
+ extendedCost: number;
10
+
11
+ isGoldRequired(proto: ItemTemplate): boolean;
12
+ }
13
+ }
14
+ }
15
+ export {};
@@ -0,0 +1,26 @@
1
+ declare global {
2
+ namespace Acore {
3
+ class VendorItemData {
4
+ constructor();
5
+
6
+ readonly empty: boolean;
7
+ readonly itemCount: number;
8
+ readonly items: readonly VendorItem[];
9
+
10
+ clone(): VendorItemData;
11
+ append(vendorItem: VendorItem): void;
12
+ addItem(item: number, maxCount: number, incrTime: Temporal.Duration, extendedCost: number): void;
13
+ removeItem(item: number): boolean;
14
+ findItemCostPair(item: number, extendedCost: number): VendorItem | undefined;
15
+ clear(): void;
16
+ }
17
+
18
+ type ReadonlyVendorItemData = Omit<VendorItemData,
19
+ | 'append'
20
+ | 'addItem'
21
+ | 'removeItem'
22
+ | 'clear'
23
+ >;
24
+ }
25
+ }
26
+ export {};
@@ -33,6 +33,7 @@ export type * from './LootTemplate.d.ts';
33
33
  export type * from './MailDraft.d.ts';
34
34
  export type * from './MailSender.d.ts';
35
35
  export type * from './Minion.d.ts';
36
+ export type * from './ObjectMgr.d.ts';
36
37
  export type * from './Pet.d.ts';
37
38
  export type * from './Player.d.ts';
38
39
  export type * from './QueryResult.d.ts';
@@ -48,5 +49,7 @@ export type * from './ThreatReference.d.ts';
48
49
  export type * from './Transport.d.ts';
49
50
  export type * from './Unit.d.ts';
50
51
  export type * from './Vehicle.d.ts';
52
+ export type * from './VendorItem.d.ts';
53
+ export type * from './VendorItemData.d.ts';
51
54
  export type * from './WorldObject.d.ts';
52
55
  export type * from './WorldPacket.d.ts';
@@ -0,0 +1,59 @@
1
+ declare global {
2
+ const enum MovementFlags {
3
+ MOVEMENTFLAG_NONE = 0x00000000,
4
+ MOVEMENTFLAG_FORWARD = 0x00000001,
5
+ MOVEMENTFLAG_BACKWARD = 0x00000002,
6
+ MOVEMENTFLAG_STRAFE_LEFT = 0x00000004,
7
+ MOVEMENTFLAG_STRAFE_RIGHT = 0x00000008,
8
+ MOVEMENTFLAG_LEFT = 0x00000010,
9
+ MOVEMENTFLAG_RIGHT = 0x00000020,
10
+ MOVEMENTFLAG_PITCH_UP = 0x00000040,
11
+ MOVEMENTFLAG_PITCH_DOWN = 0x00000080,
12
+ MOVEMENTFLAG_WALKING = 0x00000100, // Walking
13
+ MOVEMENTFLAG_ONTRANSPORT = 0x00000200, // Used for flying on some creatures
14
+ MOVEMENTFLAG_DISABLE_GRAVITY = 0x00000400, // Former MOVEMENTFLAG_LEVITATING. This is used when walking is not possible.
15
+ MOVEMENTFLAG_ROOT = 0x00000800, // Must not be set along with MOVEMENTFLAG_MASK_MOVING
16
+ MOVEMENTFLAG_FALLING = 0x00001000, // damage dealt on that type of falling
17
+ MOVEMENTFLAG_FALLING_FAR = 0x00002000,
18
+ MOVEMENTFLAG_PENDING_STOP = 0x00004000,
19
+ MOVEMENTFLAG_PENDING_STRAFE_STOP = 0x00008000,
20
+ MOVEMENTFLAG_PENDING_FORWARD = 0x00010000,
21
+ MOVEMENTFLAG_PENDING_BACKWARD = 0x00020000,
22
+ MOVEMENTFLAG_PENDING_STRAFE_LEFT = 0x00040000,
23
+ MOVEMENTFLAG_PENDING_STRAFE_RIGHT = 0x00080000,
24
+ MOVEMENTFLAG_PENDING_ROOT = 0x00100000,
25
+ MOVEMENTFLAG_SWIMMING = 0x00200000, // appears with fly flag also
26
+ MOVEMENTFLAG_ASCENDING = 0x00400000, // press "space" when flying
27
+ MOVEMENTFLAG_DESCENDING = 0x00800000,
28
+ MOVEMENTFLAG_CAN_FLY = 0x01000000, // Appears when unit can fly AND also walk
29
+ MOVEMENTFLAG_FLYING = 0x02000000, // unit is actually flying. pretty sure this is only used for players. creatures use disable_gravity
30
+ MOVEMENTFLAG_SPLINE_ELEVATION = 0x04000000, // used for flight paths
31
+ MOVEMENTFLAG_SPLINE_ENABLED = 0x08000000, // used for flight paths
32
+ MOVEMENTFLAG_WATERWALKING = 0x10000000, // prevent unit from falling through water
33
+ MOVEMENTFLAG_FALLING_SLOW = 0x20000000, // active rogue safe fall spell (passive)
34
+ MOVEMENTFLAG_HOVER = 0x40000000, // hover, cannot jump
35
+
36
+ /// @todo: Check if PITCH_UP and PITCH_DOWN really belong here..
37
+ MOVEMENTFLAG_MASK_MOVING =
38
+ MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD | MOVEMENTFLAG_STRAFE_LEFT | MOVEMENTFLAG_STRAFE_RIGHT |
39
+ MOVEMENTFLAG_PITCH_UP | MOVEMENTFLAG_PITCH_DOWN | MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR | MOVEMENTFLAG_ASCENDING | MOVEMENTFLAG_DESCENDING |
40
+ MOVEMENTFLAG_SPLINE_ELEVATION,
41
+
42
+ MOVEMENTFLAG_MASK_TURNING =
43
+ MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT,
44
+
45
+ MOVEMENTFLAG_MASK_MOVING_FLY =
46
+ MOVEMENTFLAG_FLYING | MOVEMENTFLAG_ASCENDING | MOVEMENTFLAG_DESCENDING,
47
+
48
+ /// @todo if needed: add more flags to this masks that are exclusive to players
49
+ MOVEMENTFLAG_MASK_PLAYER_ONLY =
50
+ MOVEMENTFLAG_FLYING,
51
+
52
+ MOVEMENTFLAG_MASK_MOVING_OR_TURN = MOVEMENTFLAG_MASK_MOVING | MOVEMENTFLAG_MASK_TURNING,
53
+
54
+ /// Movement flags that have change status opcodes associated for players
55
+ MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE = MOVEMENTFLAG_DISABLE_GRAVITY | MOVEMENTFLAG_ROOT |
56
+ MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_WATERWALKING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_HOVER,
57
+ }
58
+ }
59
+ export {};
package/enums/index.d.ts CHANGED
@@ -102,6 +102,7 @@ export type * from './MailCheckMask.d.ts';
102
102
  export type * from './MailMessageType.d.ts';
103
103
  export type * from './MailStationery.d.ts';
104
104
  export type * from './Mechanics.d.ts';
105
+ export type * from './MovementFlags.d.ts';
105
106
  export type * from './MovementGeneratorType.d.ts';
106
107
  export type * from './MovementSlot.d.ts';
107
108
  export type * from './NearObjectsMask.d.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airbreather/mod-nodejs-types",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "Type declarations (only) for the mod-nodejs AzerothCore module.",
5
5
  "repository": {
6
6
  "type": "git",