diff --git a/Server/Components/Dialogs/dialog.cpp b/Server/Components/Dialogs/dialog.cpp index da3fc9b10..d389686af 100644 --- a/Server/Components/Dialogs/dialog.cpp +++ b/Server/Components/Dialogs/dialog.cpp @@ -126,7 +126,7 @@ class PlayerDialogData final : public IPlayerDialogData } }; -class DialogsComponent final : public IDialogsComponent, public PlayerConnectEventHandler +class DialogsComponent final : public IDialogsComponent, public PoolEventHandler { private: ICore* core = nullptr; @@ -203,7 +203,7 @@ class DialogsComponent final : public IDialogsComponent, public PlayerConnectEve } dialogResponseHandler; public: - void onPlayerConnect(IPlayer& player) override + void onPoolEntryCreated(IPlayer& player) override { player.addExtension(new PlayerDialogData(), true); } @@ -226,7 +226,7 @@ class DialogsComponent final : public IDialogsComponent, public PlayerConnectEve void onLoad(ICore* c) override { core = c; - core->getPlayers().getPlayerConnectDispatcher().addEventHandler(this); + core->getPlayers().getPoolEventDispatcher().addEventHandler(this); NetCode::RPC::OnPlayerDialogResponse::addEventHandler(*core, &dialogResponseHandler); } @@ -251,7 +251,7 @@ class DialogsComponent final : public IDialogsComponent, public PlayerConnectEve { if (core) { - core->getPlayers().getPlayerConnectDispatcher().removeEventHandler(this); + core->getPlayers().getPoolEventDispatcher().removeEventHandler(this); NetCode::RPC::OnPlayerDialogResponse::removeEventHandler(*core, &dialogResponseHandler); } }