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

◆ ItemSlot_OnItemTransferred()

static void Terraria.GameContent.LucyAxeMessage.ItemSlot_OnItemTransferred ( ItemSlot::ItemTransferInfo info)
inlinestaticprivate

Definition at line 77 of file LucyAxeMessage.cs.

78 {
79 if (info.ItemType != 5095)
80 {
81 return;
82 }
83 bool flag = CountsAsStorage(info.FromContenxt);
84 bool flag2 = CountsAsStorage(info.ToContext);
85 if (flag != flag2)
86 {
87 MessageSource messageSource = ((!flag) ? MessageSource.Storage : MessageSource.PickedUp);
88 if (_messageCooldownsByType[(int)messageSource] <= 0)
89 {
90 PutMessageTypeOnCooldown(messageSource, 420);
91 Player localPlayer = Main.LocalPlayer;
92 Create(messageSource, localPlayer.Top, new Vector2(localPlayer.direction * 7, -2f));
93 }
94 }
95 }
static void PutMessageTypeOnCooldown(MessageSource source, int timeInFrames)
static bool CountsAsStorage(int itemSlotContext)
static void Create(MessageSource source, Vector2 position, Vector2 velocity)

References Terraria.GameContent.LucyAxeMessage._messageCooldownsByType, Terraria.GameContent.LucyAxeMessage.CountsAsStorage(), Terraria.GameContent.LucyAxeMessage.Create(), Terraria.Entity.direction, Terraria.Main.LocalPlayer, Terraria.GameContent.LucyAxeMessage.PutMessageTypeOnCooldown(), and Terraria.Entity.Top.

Referenced by Terraria.GameContent.LucyAxeMessage.Initialize().