решил проблему щас другая при входе на гейм сервер вот такая фигня
[Info] Start PointBlank Game Server.
[Info] Develop by LoveJava.
[Info] Version 0.0.0.5 | Build 198
[Info] Server configuration was successfully loaded.
[Info] Network configuration was successfully loaded.
[Info] DataBase configuration was successfully loaded.
[Info] [PlayerTemplate] loaded 1 players template
[Info] [RankInfoTemplate] loaded 56 Rank info Template
[Info] Tcp server started at 127.0.0.1:39191
[Info] New client session #1 is connected.
[Warning] System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в PB.Game.Network.Packets.Receive.CM_USER_ENTER_REQ.RunImpl() в C:\Users\lovej\OneDrive\Dev\C#\PointBlankEmulator\PB.Game\Network\Packets\Receive\CM_USER_ENTER_REQ.cs:строка 33
Добавлено через 36 секунд
Код:
using PB.Core.DataBase.ManagerDao;
using PB.Core.Network;
using PB.Game.Network.Packets.Send;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace PB.Game.Network.Packets.Receive
{
public class CM_USER_ENTER_REQ : ReceivePacket
{
private byte[] _IP;
private string account;
private int Account_len;
public override void ReadImpl()
{
base.readH();
this.Account_len = base.readC();
this.account = base.readS(this.Account_len - 1);
base.readQ();
base.readC();
base.readC();
this._IP = base.readB(4);
}
public override void RunImpl()
{
try
{
Client.setAccount(AccountDao.load().get(this.account).getClient().Account.player_id);
Client.restoreAccount(this.account);
AccountDao.load().get(this.account).setClient(base.getClient());
AccountDao.load().get(this.account).setLocalAddress(this._IP);
AccountDao.load().get(this.account).setPublicAddress((base.getClient().RemoteIPAddress));
AccountDao.load().UpdateIP(AccountDao.load().get(this.account).getPlayerId(), AccountDao.load().get(this.account).addrEndPoint);
Client.sendPacket(new PROTOCOL_BASE_USER_ENTER_ACK());
}
catch (Exception exception)
{
Log.Warn(exception.ToString());
Client.close();
}
}
}
}