fix: Optimizes TextDefinition to eliminate allocations. Removes TextDefinition ctor. (#1221)
### BREAKING CHANGE ### The constructor for `TextDefinition` has been removed. Instead use `TextDefinition.Of()` or cast the integer/string to TextDefinition.
This commit is contained in:
parent
213b7025af
commit
910e06767b
50 changed files with 790 additions and 722 deletions
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Britain : Town
|
||||
{
|
||||
public class Britain : Town
|
||||
{
|
||||
public Britain() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
0,
|
||||
0x1869,
|
||||
"Britain",
|
||||
"Britain",
|
||||
new TextDefinition(1011433, "BRITAIN"),
|
||||
new TextDefinition(1011561, "TOWN STONE FOR BRITAIN"),
|
||||
new TextDefinition(1041034, "The Faction Sigil Monolith of Britain"),
|
||||
new TextDefinition(1041404, "The Faction Town Sigil Monolith of Britain"),
|
||||
new TextDefinition(1041413, "Faction Town Stone of Britain"),
|
||||
new TextDefinition(1041395, "Faction Town Sigil of Britain"),
|
||||
new TextDefinition(1041386, "Corrupted Faction Town Sigil of Britain"),
|
||||
new Point3D(1592, 1680, 10),
|
||||
new Point3D(1588, 1676, 10)
|
||||
);
|
||||
}
|
||||
public Britain() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
0,
|
||||
0x1869,
|
||||
"Britain",
|
||||
"Britain",
|
||||
1011433, // BRITAIN
|
||||
1011561, // TOWN STONE FOR BRITAIN
|
||||
1041034, // The Faction Sigil Monolith of Britain
|
||||
1041404, // The Faction Town Sigil Monolith of Britain
|
||||
1041413, // Faction Town Stone of Britain
|
||||
1041395, // Faction Town Sigil of Britain
|
||||
1041386, // Corrupted Faction Town Sigil of Britain
|
||||
new Point3D(1592, 1680, 10),
|
||||
new Point3D(1588, 1676, 10)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Magincia : Town
|
||||
{
|
||||
public class Magincia : Town
|
||||
{
|
||||
public Magincia() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
7,
|
||||
0x1870,
|
||||
"Magincia",
|
||||
"Magincia",
|
||||
new TextDefinition(1011440, "MAGINCIA"),
|
||||
new TextDefinition(1011568, "TOWN STONE FOR MAGINCIA"),
|
||||
new TextDefinition(1041041, "The Faction Sigil Monolith of Magincia"),
|
||||
new TextDefinition(1041411, "The Faction Town Sigil Monolith of Magincia"),
|
||||
new TextDefinition(1041420, "Faction Town Stone of Magincia"),
|
||||
new TextDefinition(1041402, "Faction Town Sigil of Magincia"),
|
||||
new TextDefinition(1041393, "Corrupted Faction Town Sigil of Magincia"),
|
||||
new Point3D(3714, 2235, 20),
|
||||
new Point3D(3712, 2230, 20)
|
||||
);
|
||||
}
|
||||
public Magincia() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
7,
|
||||
0x1870,
|
||||
"Magincia",
|
||||
"Magincia",
|
||||
1011440, // MAGINCIA
|
||||
1011568, // TOWN STONE FOR MAGINCIA
|
||||
1041041, // The Faction Sigil Monolith of Magincia
|
||||
1041411, // The Faction Town Sigil Monolith of Magincia
|
||||
1041420, // Faction Town Stone of Magincia
|
||||
1041402, // Faction Town Sigil of Magincia
|
||||
1041393, // Corrupted Faction Town Sigil of Magincia
|
||||
new Point3D(3714, 2235, 20),
|
||||
new Point3D(3712, 2230, 20)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Minoc : Town
|
||||
{
|
||||
public class Minoc : Town
|
||||
{
|
||||
public Minoc() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
2,
|
||||
0x186B,
|
||||
"Minoc",
|
||||
"Minoc",
|
||||
new TextDefinition(1011437, "MINOC"),
|
||||
new TextDefinition(1011564, "TOWN STONE FOR MINOC"),
|
||||
new TextDefinition(1041036, "The Faction Sigil Monolith of Minoc"),
|
||||
new TextDefinition(1041406, "The Faction Town Sigil Monolith Minoc"),
|
||||
new TextDefinition(1041415, "Faction Town Stone of Minoc"),
|
||||
new TextDefinition(1041397, "Faction Town Sigil of Minoc"),
|
||||
new TextDefinition(1041388, "Corrupted Faction Town Sigil of Minoc"),
|
||||
new Point3D(2471, 439, 15),
|
||||
new Point3D(2469, 445, 15)
|
||||
);
|
||||
}
|
||||
public Minoc() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
2,
|
||||
0x186B,
|
||||
"Minoc",
|
||||
"Minoc",
|
||||
1011437, // MINOC
|
||||
1011564, // TOWN STONE FOR MINOC
|
||||
1041036, // The Faction Sigil Monolith of Minoc
|
||||
1041406, // The Faction Town Sigil Monolith Minoc
|
||||
1041415, // Faction Town Stone of Minoc
|
||||
1041397, // Faction Town Sigil of Minoc
|
||||
1041388, // Corrupted Faction Town Sigil of Minoc
|
||||
new Point3D(2471, 439, 15),
|
||||
new Point3D(2469, 445, 15)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Moonglow : Town
|
||||
{
|
||||
public class Moonglow : Town
|
||||
{
|
||||
public Moonglow() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
3,
|
||||
0x186C,
|
||||
"Moonglow",
|
||||
"Moonglow",
|
||||
new TextDefinition(1011435, "MOONGLOW"),
|
||||
new TextDefinition(1011563, "TOWN STONE FOR MOONGLOW"),
|
||||
new TextDefinition(1041037, "The Faction Sigil Monolith of Moonglow"),
|
||||
new TextDefinition(1041407, "The Faction Town Sigil Monolith of Moonglow"),
|
||||
new TextDefinition(1041416, "Faction Town Stone of Moonglow"),
|
||||
new TextDefinition(1041398, "Faction Town Sigil of Moonglow"),
|
||||
new TextDefinition(1041389, "Corrupted Faction Town Sigil of Moonglow"),
|
||||
new Point3D(4436, 1083, 0),
|
||||
new Point3D(4432, 1086, 0)
|
||||
);
|
||||
}
|
||||
public Moonglow() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
3,
|
||||
0x186C,
|
||||
"Moonglow",
|
||||
"Moonglow",
|
||||
1011435, // MOONGLOW
|
||||
1011563, // TOWN STONE FOR MOONGLOW
|
||||
1041037, // The Faction Sigil Monolith of Moonglow
|
||||
1041407, // The Faction Town Sigil Monolith of Moonglow
|
||||
1041416, // Faction Town Stone of Moonglow
|
||||
1041398, // Faction Town Sigil of Moonglow
|
||||
1041389, // Corrupted Faction Town Sigil of Moonglow
|
||||
new Point3D(4436, 1083, 0),
|
||||
new Point3D(4432, 1086, 0)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class SkaraBrae : Town
|
||||
{
|
||||
public class SkaraBrae : Town
|
||||
{
|
||||
public SkaraBrae() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
6,
|
||||
0x186F,
|
||||
"Skara Brae",
|
||||
"Skara Brae",
|
||||
new TextDefinition(1011439, "SKARA BRAE"),
|
||||
new TextDefinition(1011567, "TOWN STONE FOR SKARA BRAE"),
|
||||
new TextDefinition(1041040, "The Faction Sigil Monolith of Skara Brae"),
|
||||
new TextDefinition(1041410, "The Faction Town Sigil Monolith of Skara Brae"),
|
||||
new TextDefinition(1041419, "Faction Town Stone of Skara Brae"),
|
||||
new TextDefinition(1041401, "Faction Town Sigil of Skara Brae"),
|
||||
new TextDefinition(1041392, "Corrupted Faction Town Sigil of Skara Brae"),
|
||||
new Point3D(576, 2200, 0),
|
||||
new Point3D(572, 2196, 0)
|
||||
);
|
||||
}
|
||||
public SkaraBrae() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
6,
|
||||
0x186F,
|
||||
"Skara Brae",
|
||||
"Skara Brae",
|
||||
1011439, // SKARA BRAE
|
||||
1011567, // TOWN STONE FOR SKARA BRAE
|
||||
1041040, // The Faction Sigil Monolith of Skara Brae
|
||||
1041410, // The Faction Town Sigil Monolith of Skara Brae
|
||||
1041419, // Faction Town Stone of Skara Brae
|
||||
1041401, // Faction Town Sigil of Skara Brae
|
||||
1041392, // Corrupted Faction Town Sigil of Skara Brae
|
||||
new Point3D(576, 2200, 0),
|
||||
new Point3D(572, 2196, 0)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Trinsic : Town
|
||||
{
|
||||
public class Trinsic : Town
|
||||
{
|
||||
public Trinsic() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
1,
|
||||
0x186A,
|
||||
"Trinsic",
|
||||
"Trinsic",
|
||||
new TextDefinition(1011434, "TRINSIC"),
|
||||
new TextDefinition(1011562, "TOWN STONE FOR TRINSIC"),
|
||||
new TextDefinition(1041035, "The Faction Sigil Monolith of Trinsic"),
|
||||
new TextDefinition(1041405, "The Faction Town Sigil Monolith of Trinsic"),
|
||||
new TextDefinition(1041414, "Faction Town Stone of Trinsic"),
|
||||
new TextDefinition(1041396, "Faction Town Sigil of Trinsic"),
|
||||
new TextDefinition(1041387, "Corrupted Faction Town Sigil of Trinsic"),
|
||||
new Point3D(1914, 2717, 20),
|
||||
new Point3D(1909, 2720, 20)
|
||||
);
|
||||
}
|
||||
public Trinsic() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
1,
|
||||
0x186A,
|
||||
"Trinsic",
|
||||
"Trinsic",
|
||||
1011434, // TRINSIC
|
||||
1011562, // TOWN STONE FOR TRINSIC
|
||||
1041035, // The Faction Sigil Monolith of Trinsic
|
||||
1041405, // The Faction Town Sigil Monolith of Trinsic
|
||||
1041414, // Faction Town Stone of Trinsic
|
||||
1041396, // Faction Town Sigil of Trinsic
|
||||
1041387, // Corrupted Faction Town Sigil of Trinsic
|
||||
new Point3D(1914, 2717, 20),
|
||||
new Point3D(1909, 2720, 20)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Vesper : Town
|
||||
{
|
||||
public class Vesper : Town
|
||||
{
|
||||
public Vesper() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
5,
|
||||
0x186E,
|
||||
"Vesper",
|
||||
"Vesper",
|
||||
new TextDefinition(1016413, "VESPER"),
|
||||
new TextDefinition(1011566, "TOWN STONE FOR VESPER"),
|
||||
new TextDefinition(1041039, "The Faction Sigil Monolith of Vesper"),
|
||||
new TextDefinition(1041409, "The Faction Town Sigil Monolith of Vesper"),
|
||||
new TextDefinition(1041418, "Faction Town Stone of Vesper"),
|
||||
new TextDefinition(1041400, "Faction Town Sigil of Vesper"),
|
||||
new TextDefinition(1041391, "Corrupted Faction Town Sigil of Vesper"),
|
||||
new Point3D(2982, 818, 0),
|
||||
new Point3D(2985, 821, 0)
|
||||
);
|
||||
}
|
||||
public Vesper() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
5,
|
||||
0x186E,
|
||||
"Vesper",
|
||||
"Vesper",
|
||||
1016413, // VESPER
|
||||
1011566, // TOWN STONE FOR VESPER
|
||||
1041039, // The Faction Sigil Monolith of Vesper
|
||||
1041409, // The Faction Town Sigil Monolith of Vesper
|
||||
1041418, // Faction Town Stone of Vesper
|
||||
1041400, // Faction Town Sigil of Vesper
|
||||
1041391, // Corrupted Faction Town Sigil of Vesper
|
||||
new Point3D(2982, 818, 0),
|
||||
new Point3D(2985, 821, 0)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
namespace Server.Factions
|
||||
namespace Server.Factions;
|
||||
|
||||
public class Yew : Town
|
||||
{
|
||||
public class Yew : Town
|
||||
{
|
||||
public Yew() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
4,
|
||||
0x186D,
|
||||
"Yew",
|
||||
"Yew",
|
||||
new TextDefinition(1011438, "YEW"),
|
||||
new TextDefinition(1011565, "TOWN STONE FOR YEW"),
|
||||
new TextDefinition(1041038, "The Faction Sigil Monolith of Yew"),
|
||||
new TextDefinition(1041408, "The Faction Town Sigil Monolith of Yew"),
|
||||
new TextDefinition(1041417, "Faction Town Stone of Yew"),
|
||||
new TextDefinition(1041399, "Faction Town Sigil of Yew"),
|
||||
new TextDefinition(1041390, "Corrupted Faction Town Sigil of Yew"),
|
||||
new Point3D(548, 979, 0),
|
||||
new Point3D(542, 980, 0)
|
||||
);
|
||||
}
|
||||
public Yew() =>
|
||||
Definition =
|
||||
new TownDefinition(
|
||||
4,
|
||||
0x186D,
|
||||
"Yew",
|
||||
"Yew",
|
||||
1011438, // YEW
|
||||
1011565, // TOWN STONE FOR YEW
|
||||
1041038, // The Faction Sigil Monolith of Yew
|
||||
1041408, // The Faction Town Sigil Monolith of Yew
|
||||
1041417, // Faction Town Stone of Yew
|
||||
1041399, // Faction Town Sigil of Yew
|
||||
1041390, // Corrupted Faction Town Sigil of Yew
|
||||
new Point3D(548, 979, 0),
|
||||
new Point3D(542, 980, 0)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue