private void SetTroopTheme(Session session, Packet packet) { uint cityId; string itemId; try { cityId = packet.GetUInt32(); itemId = packet.GetString(); } catch (Exception) { ReplyError(session, packet, Error.Unexpected); return; } locker.Lock(session.Player).Do(() => { var city = session.Player.GetCity(cityId); if (city == null) { ReplyError(session, packet, Error.CityNotFound); return; } var result = themeManager.SetDefaultTroopTheme(city, itemId); ReplyWithResult(session, packet, result); }); }