@@ -2,7 +2,6 @@ import { WalkingQueue } from './walking-queue';
2
2
import { ItemContainer } from '../items/item-container' ;
3
3
import { Animation , Graphic , UpdateFlags } from './update-flags' ;
4
4
import { Npc } from './npc/npc' ;
5
- import { Entity } from '../entity' ;
6
5
import { Skills } from '@server/world/actor/skills' ;
7
6
import { Item } from '@server/world/items/item' ;
8
7
import { Position } from '@server/world/position' ;
@@ -12,8 +11,10 @@ import { CombatAction } from '@server/world/actor/player/action/combat-action';
12
11
/**
13
12
* Handles an actor within the game world.
14
13
*/
15
- export abstract class Actor extends Entity {
14
+ export abstract class Actor {
16
15
16
+ private _position : Position ;
17
+ private _lastMapRegionUpdatePosition : Position ;
17
18
private _worldIndex : number ;
18
19
public readonly updateFlags : UpdateFlags ;
19
20
private readonly _walkingQueue : WalkingQueue ;
@@ -27,7 +28,6 @@ export abstract class Actor extends Entity {
27
28
private _combatActions : CombatAction [ ] ;
28
29
29
30
protected constructor ( ) {
30
- super ( ) ;
31
31
this . updateFlags = new UpdateFlags ( ) ;
32
32
this . _walkingQueue = new WalkingQueue ( this ) ;
33
33
this . _walkDirection = - 1 ;
@@ -213,6 +213,26 @@ export abstract class Actor extends Entity {
213
213
214
214
public abstract equals ( actor : Actor ) : boolean ;
215
215
216
+ public get position ( ) : Position {
217
+ return this . _position ;
218
+ }
219
+
220
+ public set position ( value : Position ) {
221
+ if ( ! this . _position ) {
222
+ this . _lastMapRegionUpdatePosition = value ;
223
+ }
224
+
225
+ this . _position = value ;
226
+ }
227
+
228
+ public get lastMapRegionUpdatePosition ( ) : Position {
229
+ return this . _lastMapRegionUpdatePosition ;
230
+ }
231
+
232
+ public set lastMapRegionUpdatePosition ( value : Position ) {
233
+ this . _lastMapRegionUpdatePosition = value ;
234
+ }
235
+
216
236
public get worldIndex ( ) : number {
217
237
return this . _worldIndex ;
218
238
}
0 commit comments