Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LoadFromWorld()

void Terraria.GameContent.Creative.CreativePowerManager.LoadFromWorld ( BinaryReader reader,
int versionGameWasLastSavedOn )
inline

Definition at line 138 of file CreativePowerManager.cs.

139 {
140 while (reader.ReadBoolean())
141 {
142 ushort key = reader.ReadUInt16();
143 if (_powersById.TryGetValue(key, out var value) && value is IPersistentPerWorldContent persistentPerWorldContent)
144 {
146 continue;
147 }
148 break;
149 }
150 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
virtual bool ReadBoolean()
virtual ushort ReadUInt16()
Dictionary< ushort, ICreativePower > _powersById

References Terraria.GameContent.Creative.CreativePowerManager._powersById, System.IO.BinaryReader.ReadBoolean(), System.IO.BinaryReader.ReadUInt16(), and System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue().