parent
096d39609e
commit
8e9221bb5a
400 changed files with 3688 additions and 5969 deletions
|
|
@ -57,14 +57,13 @@ namespace Server
|
|||
{
|
||||
int type = reader.ReadEncodedInt();
|
||||
|
||||
switch (type)
|
||||
return type switch
|
||||
{
|
||||
case 0: return new TextDefinition();
|
||||
case 1: return new TextDefinition(reader.ReadEncodedInt());
|
||||
case 2: return new TextDefinition(reader.ReadString());
|
||||
}
|
||||
|
||||
return null;
|
||||
0 => new TextDefinition(),
|
||||
1 => new TextDefinition(reader.ReadEncodedInt()),
|
||||
2 => new TextDefinition(reader.ReadString()),
|
||||
_ => null
|
||||
};
|
||||
}
|
||||
|
||||
public static void AddTo(ObjectPropertyList list, TextDefinition def)
|
||||
|
|
@ -163,6 +162,6 @@ namespace Server
|
|||
return isInteger ? new TextDefinition(i) : new TextDefinition(value);
|
||||
}
|
||||
|
||||
public static bool IsNullOrEmpty(TextDefinition def) => def == null || def.IsEmpty;
|
||||
public static bool IsNullOrEmpty(TextDefinition def) => def?.IsEmpty != false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue