- Implement 3D space rtree-based indexing in the Full ObjectStore

- Implement ScriptDialogReply thanks to Hintswen
- Add a rudimentary object search - doesn't work fully yet because of the missing messages
This commit is contained in:
Casper Warden
2018-10-12 17:31:14 +01:00
parent bb6915e9f5
commit 9eee7f9716
34 changed files with 502 additions and 209 deletions

View File

@@ -7,6 +7,7 @@ import { IObjectStore } from './interfaces/IObjectStore';
import { GameObjectFull } from './GameObjectFull';
import { IGameObject } from './interfaces/IGameObject';
import { BotOptionFlags } from '..';
import { RBush3D } from 'rbush-3d/dist';
export declare class ObjectStoreFull implements IObjectStore {
private circuit;
private agent;
@@ -15,7 +16,9 @@ export declare class ObjectStoreFull implements IObjectStore {
private objectsByParent;
private clientEvents;
private options;
rtree: RBush3D;
constructor(circuit: Circuit, agent: Agent, clientEvents: ClientEvents, options: BotOptionFlags);
insertIntoRtree(obj: GameObjectFull): void;
deleteObject(objectID: number): void;
readExtraParams(buf: Buffer, pos: number, o: GameObjectFull): number;
getObjectsByParent(parentID: number): IGameObject[];
@@ -23,4 +26,6 @@ export declare class ObjectStoreFull implements IObjectStore {
[key: string]: NameValue;
};
shutdown(): void;
private findParent;
getObjectsInArea(minX: number, maxX: number, minY: number, maxY: number, minZ: number, maxZ: number): GameObjectFull[];
}