Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
CountItem()
int Terraria.Player.CountItem
(
int
type
,
int
stopCountingAt
=
0
)
inline
Definition at line
8497
of file
Player.cs
.
8498
{
8499
int
num = 0;
8500
for
(
int
i = 0;
i
!= 58;
i
++)
8501
{
8502
if
(
inventory
[i].stack > 0 &&
inventory
[i].
type
==
type
)
8503
{
8504
num +=
inventory
[
i
].
stack
;
8505
if
(num >=
stopCountingAt
)
8506
{
8507
return
num;
8508
}
8509
}
8510
}
8511
return
num;
8512
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
Terraria.Item.stack
int stack
Definition
Item.cs:149
Terraria.Player.inventory
Item[] inventory
Definition
Player.cs:1257
System.Text.RegularExpressions.ExceptionArgument.i
@ i
System.ExceptionArgument.type
@ type
References
Terraria.Item.stack
, and
System.type
.
Terraria
Player
Generated by
1.10.0