Skip to content

Commit

Permalink
- Reldens - v4.0.0 - Improve config get on actions player enricher.
Browse files Browse the repository at this point in the history
  • Loading branch information
damian-pastorini committed Oct 22, 2024
1 parent 1a9c570 commit 9bef68c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/actions/server/player-enricher.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ class PlayerEnricher
this.skillsModelsManager = props.skillsModelsManager;
this.pvpEnabled = this.config.getWithoutLogs('server/actions/pvp/enabled');
this.pvpConfig = Object.assign({events: this.events}, this.config.get('server/actions/pvp'));
this.affectedProperty = this.config.get('client/actions/skills/affectedProperty');
this.skillsExtraDataMapper = new SkillsExtraDataMapper();
}

async withClassPath(roomGame, superInitialGameData)
{
// Logger.debug('Players Models:', superInitialGameData.players);
if(!superInitialGameData.players){
return;
}
Expand Down Expand Up @@ -58,6 +60,7 @@ class PlayerEnricher

playerExecutePhysicalSkillCallback(currentPlayer, skillsAnimationsData)
{
// @TODO - BETA - Replace with bind.
return async (target, executedSkill) => {
let messageData = Object.assign({skillKey: executedSkill.key}, executedSkill.owner.getPosition());
if(sc.isObjectFunction(executedSkill.owner, 'getSkillExtraData')){
Expand Down Expand Up @@ -106,7 +109,7 @@ class PlayerEnricher
events: events,
persistence: true,
dataServer: dataServer,
affectedProperty: room.config.get('client/actions/skills/affectedProperty'),
affectedProperty: this.affectedProperty,
client: new ClientWrapper({client, room})
});
currentPlayer.skillsServer = new SkillsServer(classPathData);
Expand Down

0 comments on commit 9bef68c

Please sign in to comment.