Files
hjha-server/GameModule/GlobalManager/IPLocation.cs
xiaoou e9616125ce feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) +
game logic (GameFix/GameDAL/ServerData) +
network layer (NetWorkMessage) +
data layer (ObjectModel) +
utilities (MrWu/Core/Config/CloudAPI/dll) +
adapters (zyxAdapter/base)

.NET 8.0 C# solution, 16 projects, 958 source files
2026-07-07 12:02:15 +08:00

31 lines
905 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using GameMessage;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Server.DB.Redis;
using StackExchange.Redis;
using MrWu.Debug;
using Server.Core;
namespace Server
{
public static class IPLocation
{
public static async void UpdateDevice(DeviceInfo deviceInfo, string ip)
{
IPManager.IpInfo ipInfo = await IPManager.Instance.GetIpInfoAsync(ip);
if (ipInfo != null)
{
deviceInfo.address = ipInfo.Address;
deviceInfo.district = ipInfo.District;
deviceInfo.province = ipInfo.Province;
deviceInfo.jingdu = ipInfo.Longitude;
deviceInfo.weidu = ipInfo.Latitude;
}
}
}
}