示例#1
0
 public void Reconnect(ReconnectPacket pkt)
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         RealmManager.Disconnect(this); // saves player on exit
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#2
0
 void DisconnectFromRealm()
 {
     RealmManager.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         Save();
         RealmManager.Disconnect(this);
     }, PendingPriority.Destruction);
 }
示例#3
0
 //Following must execute, network loop will discard disconnected client, so logic loop
 void DisconnectFromRealm()         //
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         Save();                      //Save our data before disconnecting
         RealmManager.Disconnect(this);
     }, PendingPriority.Destruction); //Destroy any existing data from the connection
 }
示例#4
0
 public void Reconnect(ReconnectPacket pkt)
 {
     RealmManager.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         Save();
         RealmManager.Disconnect(this);
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#5
0
 //Following must execute, network loop will discard disconnected client, so logic loop
 private void DisconnectFromRealm()
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         Save();
         psr.Database.SaveCharacter(psr.Account, psr.Character);
         RealmManager.Disconnect(this);
     }, PendingPriority.Destruction);
 }
示例#6
0
 public void Reconnect(ReconnectPacket pkt)
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         //psr.Database.SaveCharacter(psr.Account, psr.Character);
         Save();
         RealmManager.Disconnect(this);
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#7
0
 //Following must execute, network loop will discard disconnected client, so logic loop
 void DisconnectFromRealm()
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.Owner.BroadcastPacket(new TextPacket()
             {
                 BubbleTime = 0,
                 Stars      = -1,
                 Name       = "",
                 Text       = account.Name + " has disconnected."
             }, Player);
             Player.SaveToCharacter();
         }
         Save();
         RealmManager.Disconnect(this);
     }, PendingPriority.Destruction);
 }
示例#8
0
 //Following must execute, network loop will discard disconnected client, so logic loop
 private void DisconnectFromRealm()
 {
     RealmManager.Logic.AddPendingAction(t =>
                                         RealmManager.Disconnect(this), PendingPriority.Destruction);
 }