using Google.Protobuf; using Google.Protobuf.WellKnownTypes; using ServerCore; using ServerBase; using ServerCommon; using ServerCommon.BusinessLogDomain; using MetaAssets; namespace GameServer; public static class GameZoneNofityHelper { public static bool send_S2C_NTF_USE_MOUNT_PROP(this Player player, string anchorGuid) { var game_zone_action = player.getEntityAction(); NullReferenceCheckHelper.throwIfNull(game_zone_action, () => $"game zone action is null !!! - {player.toBasicString()}"); var ntf_packet = new ClientToGame(); ntf_packet.Message = new(); ntf_packet.Message.UseMountPropNoti = new(); ntf_packet.Message.UseMountPropNoti.AnchorGuid = anchorGuid; ntf_packet.Message.UseMountPropNoti.ActorGuid = player.getUserGuid(); game_zone_action.broadcast(player, ntf_packet); return true; } public static bool send_S2C_NTF_END_USE_MOUNT_PROP(this Player player, string anchorGuid) { var game_zone_action = player.getEntityAction(); NullReferenceCheckHelper.throwIfNull(game_zone_action, () => $"game zone action is null !!! - {player.toBasicString()}"); var ntf_packet = new ClientToGame(); ntf_packet.Message = new(); ntf_packet.Message.EndUseMountPropNoti = new(); ntf_packet.Message.EndUseMountPropNoti.AnchorGuid = anchorGuid; ntf_packet.Message.EndUseMountPropNoti.ActorGuid = player.getUserGuid(); game_zone_action.broadcast(player, ntf_packet); return true; } public static bool send_S2C_NTF_REWARD_PROP_STATE(this Player player, string anchorGuid, bool isUsable) { var game_zone_action = player.getEntityAction(); NullReferenceCheckHelper.throwIfNull(game_zone_action, () => $"game zone action is null !!! - {player.toBasicString()}"); var ntf_packet = new ClientToGame(); ntf_packet.Message = new(); ntf_packet.Message.RewardPropStateNoti = new(); ntf_packet.Message.RewardPropStateNoti.AnchorGuid = anchorGuid; ntf_packet.Message.RewardPropStateNoti.IsUsable = isUsable ? 1 : 0; game_zone_action.broadcast(player, ntf_packet); return true; } }