Skip to content

Commit b320304

Browse files
committed
refactor: remove prayer plugin and effect system (only used by prayers)
1 parent 8ad370f commit b320304

File tree

8 files changed

+2
-177
lines changed

8 files changed

+2
-177
lines changed

src/engine/world/actor/actor.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { WalkingQueue } from './walking-queue';
1212
import { Animation, Graphic, UpdateFlags } from './update-flags';
1313
import { Skills } from './skills';
1414
import { Pathfinding } from './pathfinding';
15-
import { Effect } from './effect';
1615
import { ActorMetadata } from './metadata';
1716

1817

@@ -49,8 +48,6 @@ export abstract class Actor {
4948

5049
public pathfinding: Pathfinding = new Pathfinding(this);
5150
public lastMovementPosition: Position;
52-
// #region Behaviors and Combat flags/checks
53-
public effects: Effect[] = []; //spells, effects, prayers, etc
5451

5552
protected randomMovementInterval;
5653
protected _instance: WorldInstance = null;

src/engine/world/actor/effect.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/engine/world/actor/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export * from './combat';
22
export * from './dialogue';
3-
export * from './effect';
43
export * from './magic';
54
export * from './pathfinding';
65
export * from './prayer';

src/engine/world/actor/player/player.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import { Cutscene } from './cutscenes';
3737
import { InterfaceState } from '@engine/interface';
3838
import { Quest } from './quest';
3939
import { SendMessageOptions } from './model';
40-
import { EffectType } from '../effect';
4140
import { PlayerSyncTask, NpcSyncTask } from './sync';
4241
import { dialogue } from '../dialogue';
4342
import { Npc } from '../npc';
@@ -777,10 +776,6 @@ export class Player extends Actor {
777776

778777
this.addBonuses(item);
779778
}
780-
//prayers and other effects that effect strength
781-
this.effects.filter(a => a.EffectType === EffectType.Strength).forEach((effect) => {
782-
this.bonuses.skill['strength'] += this.skills.strength.level * effect.Modifier;
783-
});
784779
}
785780

786781
public sendLogMessage(message: string, isConsole: boolean): void {

src/engine/world/actor/prayer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { Effect, EffectType } from './effect';
2-
3-
export class Prayer extends Effect {
1+
export class Prayer {
42
AnimationId: number;
53
SoundId: number;
64
ButtonId: number;
7-
}
5+
}

src/engine/world/config/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export * from './harvest-tool';
55
export * from './harvestable-object';
66
export * from './item-ids';
77
export * from './object-ids';
8-
export * from './prayers';
98
export * from './scenery-spawns';
109
export * from './songs';
1110
export * from './sound-ids';

src/engine/world/config/prayers.ts

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/plugins/buttons/prayer.plugin.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)