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

◆ ItemCheck_UseCombatBook()

void Terraria.Player.ItemCheck_UseCombatBook ( Item sItem)
inlineprivate

Definition at line 45058 of file Player.cs.

45059 {
45060 if (!NPC.combatBookWasUsed && sItem.type == 4382 && itemAnimation > 0 && ItemTimeIsZero)
45061 {
45063 if (Main.netMode == 0)
45064 {
45065 NPC.combatBookWasUsed = true;
45066 Main.NewText(Language.GetTextValue("Misc.CombatBookUsed"), 50, byte.MaxValue, 130);
45067 }
45068 else
45069 {
45070 NetMessage.SendData(61, -1, -1, null, whoAmI, -11f);
45071 }
45072 }
45073 if (!NPC.combatBookVolumeTwoWasUsed && sItem.type == 5336 && itemAnimation > 0 && ItemTimeIsZero)
45074 {
45076 if (Main.netMode == 0)
45077 {
45078 NPC.combatBookVolumeTwoWasUsed = true;
45079 Main.NewText(Language.GetTextValue("Misc.CombatBookVolumeTwoUsed"), 50, byte.MaxValue, 130);
45080 }
45081 else
45082 {
45083 NetMessage.SendData(61, -1, -1, null, whoAmI, -17f);
45084 }
45085 }
45086 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
bool ItemTimeIsZero
Definition Player.cs:4402
void ApplyItemTime(Item sItem, float multiplier=1f, bool? callUseItem=null)
Definition Player.cs:4907

References Terraria.Player.ApplyItemTime(), Terraria.NPC.combatBookVolumeTwoWasUsed, Terraria.NPC.combatBookWasUsed, Terraria.Localization.Language.GetTextValue(), Terraria.Player.itemAnimation, Terraria.Player.ItemTimeIsZero, Terraria.Main.netMode, Terraria.Main.NewText(), Terraria.NetMessage.SendData(), and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ItemCheck_OwnerOnlyCode().

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