public void CloseOmok(Character pOwner) { MiniGamePacket.RemoveAnnounceBox(pOwner); for (int i = 0; i < 2; i++) { if (Users[i] != null) { if (Users[i].RoomSlotId == 1) { MiniGamePacket.RoomClosedMessage(Users[i]); } Users[i].Room = null; Users[i].RoomSlotId = 0; EnteredUsers--; } } }
public void RemovePlayerFromShop(Character pCharacter) { MiniRoomBase mrb = pCharacter.Room; if (pCharacter == Users[0]) { // Kick all players for (int i = 0; i < EnteredUsers; i++) { if (pCharacter != Users[i]) { PlayerShopPackets.CloseShop(Users[i], 2); EnteredUsers--; Users[i].Room = null; Users[i].RoomSlotId = 0; } } PlayerShop ps = PlayerShops[mrb.ID]; ps.RevertItems(pCharacter); MiniGamePacket.RemoveAnnounceBox(pCharacter); PlayerShops.Remove(mrb.ID); pCharacter.Field.PlayerShops.Remove(mrb.ID); pCharacter.Room = null; pCharacter.RoomSlotId = 0; } else { PlayerShopPackets.RemovePlayer(pCharacter, mrb); EnteredUsers--; Users[pCharacter.RoomSlotId] = null; pCharacter.Room = null; pCharacter.RoomSlotId = 0; } }