Skip to content

Commit

Permalink
Merge pull request #1107 from Andyyy7666/master
Browse files Browse the repository at this point in the history
tweak(bridge/ndcore): character data & db
  • Loading branch information
itschip authored Jan 7, 2024
2 parents f6ee46f + 0c56c20 commit e340247
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/game/server/bridge/ndcore/ndcore-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type NDPlayer = {
fullname: string;
dob: string;
gender: string;
phoneNumber: string;
phonenumber: string;
cash: number;
bank: number;
groups: unknown;
Expand All @@ -36,16 +36,16 @@ export class NDCoreFramework implements Strategy {
mainLogger.info('Loading NDCore bridge....');

config.general.useResourceIntegration = true;
config.database.identifierColumn = 'citizenid';
config.database.phoneNumberColumn = 'phone_number';
config.database.playerTable = 'players';
config.database.identifierColumn = 'charid';
config.database.phoneNumberColumn = 'phonenumber';
config.database.playerTable = 'nd_characters';
config.database.identifierType = 'license';
}

init(): void {
on('ND:characterLoaded', async (player: NDPlayer) => {
const playerIdent = player.identifier
const phoneNumber = player.phoneNumber ?? "" // TODO: tell andy to add a phone number column in this player table or atleast write a sql query
const playerIdent = player.id
const phoneNumber = player.phonenumber
const playerSrc = player.source;

await PlayerService.handleNewPlayerEvent({
Expand Down Expand Up @@ -73,8 +73,8 @@ export class NDCoreFramework implements Strategy {
for (const player of onlinePlayers) {
await PlayerService.handleNewPlayerEvent({
source: player.source,
identifier: player.identifier,
phoneNumber: player.phoneNumber,
identifier: player.id,
phoneNumber: player.phonenumber,
firstname: player.firstname,
lastname: player.lastname,
});
Expand Down

0 comments on commit e340247

Please sign in to comment.