public void Reconnect(ReconnectPacket pkt) { RealmManager.Logic.AddPendingAction(t => { RealmManager.Disconnect(this); // saves player on exit SendPacket(pkt); }, PendingPriority.Destruction); }
void DisconnectFromRealm() { RealmManager.AddPendingAction(t => { if (Player != null) { Player.SaveToCharacter(); } Save(); RealmManager.Disconnect(this); }, PendingPriority.Destruction); }
//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 }
public void Reconnect(ReconnectPacket pkt) { RealmManager.AddPendingAction(t => { if (Player != null) { Player.SaveToCharacter(); } Save(); RealmManager.Disconnect(this); SendPacket(pkt); }, PendingPriority.Destruction); }
//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); }
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); }
//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); }
//Following must execute, network loop will discard disconnected client, so logic loop private void DisconnectFromRealm() { RealmManager.Logic.AddPendingAction(t => RealmManager.Disconnect(this), PendingPriority.Destruction); }