Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
this[SlotId id]
T
ReLogic.Utilities.SlotVector
< T >.
this
[
SlotId
id]
get
set
Definition at line
97
of file
SlotVector.cs
.
98
{
99
get
100
{
101
uint
index
=
id
.Index;
102
if
(
index
>=
_array
.Length)
103
{
104
throw
new
ArgumentOutOfRangeException
();
105
}
106
if
(!
_array
[
index
].
Id
.IsActive ||
id
!=
_array
[
index
].
Id
)
107
{
108
throw
new
KeyNotFoundException
();
109
}
110
return
_array
[
index
].
Value
;
111
}
112
set
113
{
114
uint
index
=
id
.Index;
115
if
(
index
>=
_array
.Length)
116
{
117
throw
new
ArgumentOutOfRangeException
();
118
}
119
if
(!
_array
[
index
].
Id
.IsActive ||
id
!=
_array
[
index
].
Id
)
120
{
121
throw
new
KeyNotFoundException
();
122
}
123
_array
[
index
] =
new
ItemPair(
value
,
id
);
124
}
125
}
ReLogic.Utilities.SlotVector._array
readonly ItemPair[] _array
Definition
SlotVector.cs:63
System.ArgumentOutOfRangeException
Definition
ArgumentOutOfRangeException.cs:9
System.Collections.Generic.KeyNotFoundException
Definition
KeyNotFoundException.cs:9
System.Xml.Schema.XmlTypeCode.Id
@ Id
System.ExceptionArgument.value
@ value
System.ExceptionArgument.index
@ index
ReLogic.Utilities.SlotVector.ItemPair.Id
readonly SlotId Id
Definition
SlotVector.cs:52
ReLogic.Utilities.SlotVector.ItemPair.Value
readonly T Value
Definition
SlotVector.cs:50
ReLogic
Utilities
SlotVector
Generated by
1.10.0