초기커밋
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using ServerCommon;
|
||||
using ServerCore; using ServerBase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static ServerMessage.Types;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
internal static class BuildingRentalHistoryNotifyHelper
|
||||
{
|
||||
public static bool send_GS2GS_NTF_ADD_BUILDING_RENTAL_HISTORY(BuildingRentalHistory buildingProfitHistory)
|
||||
{
|
||||
var server_logic = GameServerApp.getServerLogic();
|
||||
|
||||
var building_rental_history_attribute = buildingProfitHistory.getEntityAttribute<BuildingRentalHistoryAttribute>();
|
||||
NullReferenceCheckHelper.throwIfNull(building_rental_history_attribute, () => $"building_profit_history_attribute is null !!!");
|
||||
|
||||
var message = new ServerMessage();
|
||||
message.NtfAddBuildingRentalHistory = new GS2GS_NTF_ADD_BUILDING_RENTAL_HISTORY();
|
||||
|
||||
message.NtfAddBuildingRentalHistory.ExceptServerName = server_logic.getServerName();
|
||||
message.NtfAddBuildingRentalHistory.BuildingMetaId = building_rental_history_attribute.BuildingMetaId;
|
||||
message.NtfAddBuildingRentalHistory.Floor = building_rental_history_attribute.Floor;
|
||||
message.NtfAddBuildingRentalHistory.RenteeUserGuid = building_rental_history_attribute.RenteeUserGuid;
|
||||
message.NtfAddBuildingRentalHistory.RentalTime = building_rental_history_attribute.RentalTime.ToTimestamp();
|
||||
message.NtfAddBuildingRentalHistory.RentalPeriod = building_rental_history_attribute.RentalPeriod;
|
||||
|
||||
var rabbit_mq = server_logic.getRabbitMqConnector() as RabbitMQ4Game;
|
||||
NullReferenceCheckHelper.throwIfNull(rabbit_mq, () => $"rabbit_mq is null !!!");
|
||||
|
||||
rabbit_mq.sendMessageToExchangeAllGame(message);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user