public GSPacketIn SendMarryProp(Game.Server.GameObjects.GamePlayer player, SqlDataProvider.Data.MarryProp info) { throw new NotImplementedException(); }
public GSPacketIn SendMarryProp(GamePlayer player, MarryProp info) { GSPacketIn pkg = new GSPacketIn((byte)ePackageType.MARRYPROP_GET, player.PlayerCharacter.ID); pkg.WriteBoolean(info.IsMarried); pkg.WriteInt(info.SpouseID); pkg.WriteString(info.SpouseName); pkg.WriteBoolean(info.IsCreatedMarryRoom); pkg.WriteInt(info.SelfMarryRoomID); pkg.WriteBoolean(info.IsGotRing); SendTCP(pkg); return pkg; }
public MarryProp GetMarryProp(int id) { SqlDataReader reader = null; try { SqlParameter[] para = new SqlParameter[1]; para[0] = new SqlParameter("@UserID", id); db.GetReader(ref reader, "SP_Select_Marry_Prop", para); while (reader.Read()) { MarryProp info = new MarryProp(); info.IsMarried = (bool)reader["IsMarried"]; info.SpouseID = (int)reader["SpouseID"]; info.SpouseName = reader["SpouseName"].ToString(); info.IsCreatedMarryRoom = (bool)reader["IsCreatedMarryRoom"]; info.SelfMarryRoomID = (int)reader["SelfMarryRoomID"]; info.IsGotRing = (bool)reader["IsGotRing"]; return info; } } catch (Exception e) { if (log.IsErrorEnabled) log.Error("GetMarryProp", e); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } return null; }