250501 커밋
This commit is contained in:
@@ -10,6 +10,41 @@ namespace GameServer
|
||||
{
|
||||
internal static class BeaconShopHelper
|
||||
{
|
||||
public static async Task<Result> DeactiveBeaconShopItems(string beaconGuid)
|
||||
{
|
||||
var server_logic = GameServerApp.getServerLogic();
|
||||
var dynamo_db_client = server_logic.getDynamoDbClient();
|
||||
|
||||
var (result, primary_key_object) = await DynamoDBDocBaseHelper.makePrimaryKey<BeaconShopItemDoc>(beaconGuid);
|
||||
if (result.isFail() || primary_key_object == null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var query_config = dynamo_db_client.makeQueryConfigForReadByPKOnly(primary_key_object.PK);
|
||||
(result, var read_docs) = await dynamo_db_client.simpleQueryDocTypesWithQueryOperationConfig<BeaconShopItemDoc>(query_config);
|
||||
if (result.isFail())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
foreach (var beacon_shop_item_doc in read_docs)
|
||||
{
|
||||
var beaconShopItemAttrib = beacon_shop_item_doc.getAttrib<BeaconShopItemAttrib>();
|
||||
NullReferenceCheckHelper.throwIfNull(beaconShopItemAttrib, () => $"beaconShopItemAttrib is null !!");
|
||||
beaconShopItemAttrib.IsActiveSelling = false;
|
||||
beacon_shop_item_doc.setQueryType(QueryType.Update);
|
||||
|
||||
result = await dynamo_db_client.simpleUpdateDocumentWithDocType(beacon_shop_item_doc);
|
||||
if (result.isFail())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static BeaconShopItemBoardInfo toBeaconShopItemMongoDataClient(this BeaconShopMongoDoc beaconShopMongoDoc)
|
||||
{
|
||||
var beacon_shop_4_client = new BeaconShopItemBoardInfo();
|
||||
@@ -81,7 +116,7 @@ namespace GameServer
|
||||
rabbit_mq_4_game.SendMessage(targetServer, ntf_packet);
|
||||
}
|
||||
|
||||
public static void send_GS2GS_NTF_UPDATE_BEACON_SHOP_ITEM(USER_GUID targetUserGuid, BEACON_GUID targetBeaconGuid)
|
||||
public static void send_GS2GS_NTF_UPDATE_BEACON_SHOP_ITEM(USER_GUID targetUserGuid, BEACON_GUID targetBeaconGuid, bool hasBeaconShopItem)
|
||||
{
|
||||
var server_logic = GameServerApp.getServerLogic();
|
||||
|
||||
@@ -94,6 +129,7 @@ namespace GameServer
|
||||
|
||||
ntf_update_beacon_shop_item.TargetUserGuid = targetUserGuid;
|
||||
ntf_update_beacon_shop_item.TargetBeaconGuid = targetBeaconGuid;
|
||||
ntf_update_beacon_shop_item.HasBeaconShopItem = hasBeaconShopItem == true ? BoolType.True : BoolType.False;
|
||||
|
||||
rabbit_mq_4_game.sendMessageToExchangeAllGame(ntf_packet);
|
||||
}
|
||||
@@ -112,7 +148,7 @@ namespace GameServer
|
||||
item_attrib.ItemStackCount = itemStackCount;
|
||||
item_attrib.Level = beacon_shop_item_attrib.Level;
|
||||
item_attrib.Attributes = beacon_shop_item_attrib.Attributes.Select(x => x).ToList();
|
||||
item_attrib.EquipedIvenType = beacon_shop_item_attrib.EquipedIvenType;
|
||||
item_attrib.EquipedInvenType = beacon_shop_item_attrib.EquipedInvenType;
|
||||
item_attrib.EquipedPos = beacon_shop_item_attrib.EquipedPos;
|
||||
|
||||
return itemDoc;
|
||||
|
||||
Reference in New Issue
Block a user