From 7010df337626517f818657ecfc49283cef4c10a2 Mon Sep 17 00:00:00 2001 From: xavo95 Date: Fri, 13 Sep 2024 02:45:55 +0200 Subject: [PATCH] Example --- game-server/src/logic/handler/mod.rs | 1 + game-server/src/logic/handler/scene.rs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/game-server/src/logic/handler/mod.rs b/game-server/src/logic/handler/mod.rs index c1420aa..e2008ea 100644 --- a/game-server/src/logic/handler/mod.rs +++ b/game-server/src/logic/handler/mod.rs @@ -60,6 +60,7 @@ handle_request! { UpdateSceneDate; EntityActive; EntityOnLanded; + CombatSendPack, combat_message; } handle_push! { diff --git a/game-server/src/logic/handler/scene.rs b/game-server/src/logic/handler/scene.rs index 0f47681..827ae17 100644 --- a/game-server/src/logic/handler/scene.rs +++ b/game-server/src/logic/handler/scene.rs @@ -2,6 +2,7 @@ use shorekeeper_protocol::{ EntityActiveRequest, EntityActiveResponse, EntityOnLandedRequest, EntityOnLandedResponse, ErrorCode, MovePackagePush, UpdateSceneDateRequest, UpdateSceneDateResponse, }; +use shorekeeper_protocol::combat_message::{CombatSendPackRequest, CombatSendPackResponse}; use crate::{logic::ecs::component::ComponentContainer, logic::player::Player, query_components}; @@ -13,6 +14,14 @@ pub fn on_update_scene_date_request( response.error_code = ErrorCode::Success.into(); } +pub fn on_combat_message_combat_send_pack_request( + _player: &Player, + _request: CombatSendPackRequest, + response: &mut CombatSendPackResponse, +) { + response.error_code = ErrorCode::Success.into(); +} + pub fn on_entity_active_request( player: &Player, request: EntityActiveRequest,