Skip to content

Commit 59fd6e5

Browse files
authored
Merge pull request #1145 from openmultiplayer/amir/dialog-data
Use entry create for dialog data creation
2 parents 611f787 + f5b2aa2 commit 59fd6e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Server/Components/Dialogs/dialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class PlayerDialogData final : public IPlayerDialogData
126126
}
127127
};
128128

129-
class DialogsComponent final : public IDialogsComponent, public PlayerConnectEventHandler
129+
class DialogsComponent final : public IDialogsComponent, public PoolEventHandler<IPlayer>
130130
{
131131
private:
132132
ICore* core = nullptr;
@@ -203,7 +203,7 @@ class DialogsComponent final : public IDialogsComponent, public PlayerConnectEve
203203
} dialogResponseHandler;
204204

205205
public:
206-
void onPlayerConnect(IPlayer& player) override
206+
void onPoolEntryCreated(IPlayer& player) override
207207
{
208208
player.addExtension(new PlayerDialogData(), true);
209209
}
@@ -226,7 +226,7 @@ class DialogsComponent final : public IDialogsComponent, public PlayerConnectEve
226226
void onLoad(ICore* c) override
227227
{
228228
core = c;
229-
core->getPlayers().getPlayerConnectDispatcher().addEventHandler(this);
229+
core->getPlayers().getPoolEventDispatcher().addEventHandler(this);
230230
NetCode::RPC::OnPlayerDialogResponse::addEventHandler(*core, &dialogResponseHandler);
231231
}
232232

@@ -251,7 +251,7 @@ class DialogsComponent final : public IDialogsComponent, public PlayerConnectEve
251251
{
252252
if (core)
253253
{
254-
core->getPlayers().getPlayerConnectDispatcher().removeEventHandler(this);
254+
core->getPlayers().getPoolEventDispatcher().removeEventHandler(this);
255255
NetCode::RPC::OnPlayerDialogResponse::removeEventHandler(*core, &dialogResponseHandler);
256256
}
257257
}

0 commit comments

Comments
 (0)