초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
//using System;
//using System.Collections.Generic;
//using System.Diagnostics.CodeAnalysis;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
//using ServerCommon;
//using ServerCore; using ServerBase;
//using Nettention.Proud;
//namespace GameServer
//{
// public class OwnedLand
// {
// LandListEntity LandList = new();
// public OwnedLand() { }
// public async Task<bool> LoadDB(string accountGuid, string eoa)
// {
// var landListDocument = await GameServerApp.Instance.MainDB.GetLandList(accountGuid);
// if (landListDocument == null)
// {
// Log.getLogger().error("document is null");
// return false;
// }
// if (!LandList.ReadFrom(landListDocument))
// {
// Log.getLogger().error("LandList read error");
// return false;
// }
// if (GameServerApp.Instance.Config.NftRule.NftDBAccess)
// {
// var (error_code, tokenInfos) = await NFTHelper.getLandNFTs(eoa);
// if (error_code.isFail() || tokenInfos == null)
// {
// Log.getLogger().error($"GetLandNFTs Fail");
// return false;
// }
// LandListAttr landListAttr = new LandListAttr();
// foreach (var tokenInfo in tokenInfos)
// {
// if (tokenInfo.is_staked == 0)
// continue;
// landListAttr.landIds.Add(tokenInfo.metaId);
// }
// var newLandListDocument = MainDB.DocumentForInsert(EEntityType.LandList, accountGuid, string.Empty, landListAttr);
// await GameServerApp.Instance.MainDB.UpdateDocument(newLandListDocument);
// if (!LandList.ReadFrom(newLandListDocument))
// {
// Log.getLogger().error("LandList read error");
// return false;
// }
// }
// return true;
// }
// public void SendInfo(HostID hostId)
// {
// // TODO: 소유지가 없는 경우 패킷 보낼지 말지 결정
// ClientToGame clientToGame = new ClientToGame();
// clientToGame.Message = new ClientToGameMessage();
// clientToGame.Message.OwnedLandNoti = new ClientToGameMessage.Types.OwnedLandNoti();
// foreach (var landId in LandList.Attr.landIds)
// {
// clientToGame.Message.OwnedLandNoti.List.Add(landId);
// }
// GameServer.Instance.Send(hostId, RmiContext.ReliableSend, clientToGame);
// }
// public bool IsOwnedLand(int landId)
// {
// return LandList.Attr.landIds.TryGetValue(landId, out _);
// }
// }
//}