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

◆ DespawnIfMeetingConditions()

void Terraria.Item.DespawnIfMeetingConditions ( int i)
inlineprivate

Definition at line 50176 of file Item.cs.

50177 {
50178 //IL_012c: Unknown result type (might be due to invalid IL or missing references)
50179 //IL_015a: Unknown result type (might be due to invalid IL or missing references)
50180 //IL_015f: Unknown result type (might be due to invalid IL or missing references)
50181 //IL_016e: Unknown result type (might be due to invalid IL or missing references)
50182 //IL_01f4: Unknown result type (might be due to invalid IL or missing references)
50183 //IL_020a: Unknown result type (might be due to invalid IL or missing references)
50184 //IL_0210: Unknown result type (might be due to invalid IL or missing references)
50185 //IL_0226: Unknown result type (might be due to invalid IL or missing references)
50186 //IL_0230: Unknown result type (might be due to invalid IL or missing references)
50187 //IL_0235: Unknown result type (might be due to invalid IL or missing references)
50188 //IL_0265: Unknown result type (might be due to invalid IL or missing references)
50189 //IL_026b: Unknown result type (might be due to invalid IL or missing references)
50190 //IL_0275: Unknown result type (might be due to invalid IL or missing references)
50191 //IL_027a: Unknown result type (might be due to invalid IL or missing references)
50192 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
50193 //IL_006c: Unknown result type (might be due to invalid IL or missing references)
50194 //IL_0072: Unknown result type (might be due to invalid IL or missing references)
50195 //IL_008c: Unknown result type (might be due to invalid IL or missing references)
50196 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
50197 if (type == 75 && Main.dayTime && !Main.remixWorld && !shimmered && !beingGrabbed)
50198 {
50199 for (int j = 0; j < 10; j++)
50200 {
50201 Dust.NewDust(position, width, height, 15, velocity.X, velocity.Y, 150, default(Color), 1.2f);
50202 }
50203 for (int k = 0; k < 3; k++)
50204 {
50205 Gore.NewGore(position, new Vector2(velocity.X, velocity.Y), Main.rand.Next(16, 18));
50206 }
50207 active = false;
50208 type = 0;
50209 stack = 0;
50210 if (Main.netMode == 2)
50211 {
50212 NetMessage.SendData(21, -1, -1, null, i);
50213 }
50214 }
50215 if (type == 4143 && timeSinceItemSpawned > 300)
50216 {
50217 for (int l = 0; l < 20; l++)
50218 {
50219 Dust.NewDust(position, width, height, 15, velocity.X, velocity.Y, 150, Color.Lerp(Color.CornflowerBlue, Color.Indigo, Main.rand.NextFloat()), 1.2f);
50220 }
50221 active = false;
50222 type = 0;
50223 stack = 0;
50224 if (Main.netMode == 2)
50225 {
50226 NetMessage.SendData(21, -1, -1, null, i);
50227 }
50228 }
50229 if (type == 3822 && !DD2Event.Ongoing)
50230 {
50231 int num = Main.rand.Next(18, 24);
50232 for (int m = 0; m < num; m++)
50233 {
50234 int num2 = Dust.NewDust(base.Center, 0, 0, 61, 0f, 0f, 0, default(Color), 1.7f);
50235 Dust obj = Main.dust[num2];
50236 obj.velocity *= 8f;
50237 Main.dust[num2].velocity.Y -= 1f;
50238 Main.dust[num2].position = Vector2.Lerp(Main.dust[num2].position, base.Center, 0.5f);
50239 Main.dust[num2].noGravity = true;
50240 Main.dust[num2].noLight = true;
50241 }
50242 active = false;
50243 type = 0;
50244 stack = 0;
50245 if (Main.netMode == 2)
50246 {
50247 NetMessage.SendData(21, -1, -1, null, i);
50248 }
50249 }
50250 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
Definition Item.cs:396
bool shimmered
Definition Item.cs:779
bool beingGrabbed
If true, then this item is currently being grabbed by a player. Items being grabbed by the player ca...
Definition Item.cs:189
int timeSinceItemSpawned
A value that increases every tick an item is in the world. Defaults to the value in F:Terraria....
Definition Item.cs:196
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
Definition Item.cs:345

References Terraria.Entity.active, Terraria.Item.beingGrabbed, Terraria.Main.dayTime, Terraria.Main.dust, Terraria.Entity.height, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Gore.NewGore(), Terraria.GameContent.Events.DD2Event.Ongoing, Terraria.Entity.position, Terraria.Main.rand, Terraria.Main.remixWorld, Terraria.NetMessage.SendData(), Terraria.Item.shimmered, Terraria.Item.stack, Terraria.Item.timeSinceItemSpawned, Terraria.Item.type, Terraria.Entity.velocity, and Terraria.Entity.width.

Referenced by Terraria.Item.UpdateItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: