Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(bridge/ndcore): character data & db #1107

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading