C# Class Terraria.ModLoader.ItemLoader

Mostrar archivo Open project: bluemagic123/tModLoader Class Usage Examples

Private Properties

Property Type Description
AnimatedItemFrame Microsoft.Xna.Framework.Rectangle
DrawAnimatedItem void
GeneralPrefix bool
GetItemInfo ItemInfo
IsModItem bool
ItemLoader System
MagicPrefix bool
MeleePrefix bool
RangedPrefix bool
ReadNetGlobalOrder void
ReserveItemID int
ResizeArrays void
SetupItem void
SetupItemInfo void
Unload void
WeaponPrefix bool
WriteNetGlobalOrder void

Public Methods

Method Description
AltFunctionUse ( Item item, Player player ) : bool
AnglerChat ( bool turningInFish, bool anglerQuestFinished, int type, string &chat, string &catchLocation ) : void
ArmorArmGlowMask ( int slot, Player drawPlayer, float shadow, int &glowMask, Color &color ) : void
ArmorSetShadows ( Player player ) : void
AutoLightSelect ( Item item, bool &dryTorch, bool &wetTorch, bool &glowstick ) : void
CanEquipAccessory ( Item item, int slot ) : bool
CanHitNPC ( Item item, Player player, Terraria.NPC target ) : bool?
CanHitPvp ( Item item, Player player, Player target ) : bool
CanRightClick ( Item item ) : bool
CanUseItem ( Item item, Player player ) : bool
CaughtFishStack ( Item item ) : void
CheckProjOnSwing ( Player player, Item item ) : bool
ConsumeAmmo ( Item item, Item ammo, Player player ) : bool
ConsumeItem ( Item item, Player player ) : bool
DrawArmorColor ( EquipType type, int slot, Player drawPlayer, float shadow, Color &color, int &glowMask, Color &glowMaskColor ) : void
DrawBody ( Player player ) : bool
DrawHair ( Player player, bool &drawHair, bool &drawAltHair ) : void
DrawHands ( Player player, bool &drawHands, bool &drawArms ) : void
DrawHead ( Player player ) : bool
DrawLegs ( Player player ) : bool
ExtractinatorUse ( int &resultType, int &resultStack, int extractType ) : void
GetAlpha ( Item item, Color lightColor ) : Color?
GetItem ( int type ) : ModItem
GetWeaponDamage ( Item item, Player player, int &damage ) : void
GetWeaponKnockback ( Item item, Player player, float &knockback ) : void
GetWing ( Player player ) : Item
GrabRange ( Item item, Player player, int &grabRange ) : void
GrabStyle ( Item item, Player player ) : bool
HoldItem ( Item item, Player player ) : void
HoldItemFrame ( Item item, Player player ) : bool
HoldStyle ( Item item, Player player ) : void
HoldoutOffset ( float gravDir, int type, Vector2 &offset ) : void
HoldoutOrigin ( Player player, Vector2 &origin ) : void
HorizontalWingSpeeds ( Player player ) : void
IsAnglerQuestAvailable ( int itemID, bool &notAvailable ) : void
IsModBossBag ( Item item ) : bool
MeleeEffects ( Item item, Player player, Rectangle hitbox ) : void
ModifyHitNPC ( Item item, Player player, NPC target, int &damage, float &knockBack, bool &crit ) : void
ModifyHitPvp ( Item item, Player player, Player target, int &damage, bool &crit ) : void
ModifyTooltips ( Item item, int &numTooltips, string names, string &text, bool &modifier, bool &badModifier, int &oneDropLogo, Color &overrideColor ) : void
NeedsModSaving ( Item item ) : bool
OnCraft ( Item item, Recipe recipe ) : void
OnHitNPC ( Item item, Player player, NPC target, int damage, float knockBack, bool crit ) : void
OnHitPvp ( Item item, Player player, Player target, int damage, bool crit ) : void
OnPickup ( Item item, Player player ) : bool
OpenBossBag ( int type, Player player, int &npc ) : void
OpenVanillaBag ( string context, Player player, int arg ) : void
PostDrawInInventory ( Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale ) : void
PostDrawInWorld ( Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI ) : void
PostReforge ( Item item ) : void
PostUpdate ( Item item ) : void
PreDrawInInventory ( Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale ) : bool
PreDrawInWorld ( Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float &rotation, float &scale, int whoAmI ) : bool
PreOpenVanillaBag ( string context, Player player, int arg ) : bool
PreReforge ( Item item ) : void
PreUpdateVanitySet ( Player player ) : void
RightClick ( Item item, Player player ) : void
SetMatch ( int armorSlot, int type, bool male, int &equipSlot, bool &robes ) : void
Shoot ( Item item, Player player, Vector2 &position, float &speedX, float &speedY, int &type, int &damage, float &knockBack ) : bool
Update ( Item item, float &gravity, float &maxFallSpeed ) : void
UpdateAccessory ( Item item, Player player, bool hideVisual ) : void
UpdateArmorSet ( Player player, Item head, Item body, Item legs ) : void
UpdateEquip ( Item item, Player player ) : void
UpdateInventory ( Item item, Player player ) : void
UpdateVanity ( Player player ) : void
UpdateVanitySet ( Player player ) : void
UseItem ( Item item, Player player ) : bool
UseItemFrame ( Item item, Player player ) : bool
UseItemHitbox ( Item item, Player player, Rectangle &hitbox, bool &noHitbox ) : void
UseStyle ( Item item, Player player ) : void
VerticalWingSpeeds ( Player player, float &ascentWhenFalling, float &ascentWhenRising, float &maxCanAscendMultiplier, float &maxAscentMultiplier, float &constantAscend ) : void
WingUpdate ( Player player, bool inUse ) : void

Private Methods

Method Description
AnimatedItemFrame ( Item item ) : Rectangle
DrawAnimatedItem ( Item item, int whoAmI, Color color, Color alpha, float rotation, float scale ) : void
GeneralPrefix ( Item item ) : bool
GetItemInfo ( Item item, Mod mod, string name ) : ItemInfo
IsModItem ( Item item ) : bool
ItemLoader ( ) : System
MagicPrefix ( Item item ) : bool
MeleePrefix ( Item item ) : bool
RangedPrefix ( Item item ) : bool
ReadNetGlobalOrder ( BinaryReader r ) : void
ReserveItemID ( ) : int
ResizeArrays ( ) : void
SetupItem ( Item item ) : void
SetupItemInfo ( Item item ) : void
Unload ( ) : void
WeaponPrefix ( Item item ) : bool
WriteNetGlobalOrder ( BinaryWriter w ) : void

Method Details

AltFunctionUse() public static method

public static AltFunctionUse ( Item item, Player player ) : bool
item Item
player Terraria.Player
return bool

AnglerChat() public static method

public static AnglerChat ( bool turningInFish, bool anglerQuestFinished, int type, string &chat, string &catchLocation ) : void
turningInFish bool
anglerQuestFinished bool
type int
chat string
catchLocation string
return void

ArmorArmGlowMask() public static method

public static ArmorArmGlowMask ( int slot, Player drawPlayer, float shadow, int &glowMask, Color &color ) : void
slot int
drawPlayer Terraria.Player
shadow float
glowMask int
color Color
return void

ArmorSetShadows() public static method

public static ArmorSetShadows ( Player player ) : void
player Terraria.Player
return void

AutoLightSelect() public static method

public static AutoLightSelect ( Item item, bool &dryTorch, bool &wetTorch, bool &glowstick ) : void
item Item
dryTorch bool
wetTorch bool
glowstick bool
return void

CanEquipAccessory() public static method

public static CanEquipAccessory ( Item item, int slot ) : bool
item Item
slot int
return bool

CanHitNPC() public static method

public static CanHitNPC ( Item item, Player player, Terraria.NPC target ) : bool?
item Item
player Terraria.Player
target Terraria.NPC
return bool?

CanHitPvp() public static method

public static CanHitPvp ( Item item, Player player, Player target ) : bool
item Item
player Terraria.Player
target Terraria.Player
return bool

CanRightClick() public static method

public static CanRightClick ( Item item ) : bool
item Item
return bool

CanUseItem() public static method

public static CanUseItem ( Item item, Player player ) : bool
item Item
player Terraria.Player
return bool

CaughtFishStack() public static method

public static CaughtFishStack ( Item item ) : void
item Item
return void

CheckProjOnSwing() public static method

public static CheckProjOnSwing ( Player player, Item item ) : bool
player Terraria.Player
item Item
return bool

ConsumeAmmo() public static method

public static ConsumeAmmo ( Item item, Item ammo, Player player ) : bool
item Item
ammo Item
player Terraria.Player
return bool

ConsumeItem() public static method

public static ConsumeItem ( Item item, Player player ) : bool
item Item
player Terraria.Player
return bool

DrawArmorColor() public static method

public static DrawArmorColor ( EquipType type, int slot, Player drawPlayer, float shadow, Color &color, int &glowMask, Color &glowMaskColor ) : void
type EquipType
slot int
drawPlayer Terraria.Player
shadow float
color Color
glowMask int
glowMaskColor Color
return void

DrawBody() public static method

public static DrawBody ( Player player ) : bool
player Terraria.Player
return bool

DrawHair() public static method

public static DrawHair ( Player player, bool &drawHair, bool &drawAltHair ) : void
player Terraria.Player
drawHair bool
drawAltHair bool
return void

DrawHands() public static method

public static DrawHands ( Player player, bool &drawHands, bool &drawArms ) : void
player Terraria.Player
drawHands bool
drawArms bool
return void

DrawHead() public static method

public static DrawHead ( Player player ) : bool
player Terraria.Player
return bool

DrawLegs() public static method

public static DrawLegs ( Player player ) : bool
player Terraria.Player
return bool

ExtractinatorUse() public static method

public static ExtractinatorUse ( int &resultType, int &resultStack, int extractType ) : void
resultType int
resultStack int
extractType int
return void

GetAlpha() public static method

public static GetAlpha ( Item item, Color lightColor ) : Color?
item Item
lightColor Color
return Color?

GetItem() public static method

public static GetItem ( int type ) : ModItem
type int
return ModItem

GetWeaponDamage() public static method

public static GetWeaponDamage ( Item item, Player player, int &damage ) : void
item Item
player Terraria.Player
damage int
return void

GetWeaponKnockback() public static method

public static GetWeaponKnockback ( Item item, Player player, float &knockback ) : void
item Item
player Terraria.Player
knockback float
return void

GetWing() public static method

public static GetWing ( Player player ) : Item
player Terraria.Player
return Item

GrabRange() public static method

public static GrabRange ( Item item, Player player, int &grabRange ) : void
item Item
player Player
grabRange int
return void

GrabStyle() public static method

public static GrabStyle ( Item item, Player player ) : bool
item Item
player Player
return bool

HoldItem() public static method

public static HoldItem ( Item item, Player player ) : void
item Item
player Player
return void

HoldItemFrame() public static method

public static HoldItemFrame ( Item item, Player player ) : bool
item Item
player Player
return bool

HoldStyle() public static method

public static HoldStyle ( Item item, Player player ) : void
item Item
player Player
return void

HoldoutOffset() public static method

public static HoldoutOffset ( float gravDir, int type, Vector2 &offset ) : void
gravDir float
type int
offset Vector2
return void

HoldoutOrigin() public static method

public static HoldoutOrigin ( Player player, Vector2 &origin ) : void
player Player
origin Vector2
return void

HorizontalWingSpeeds() public static method

public static HorizontalWingSpeeds ( Player player ) : void
player Player
return void

IsAnglerQuestAvailable() public static method

public static IsAnglerQuestAvailable ( int itemID, bool &notAvailable ) : void
itemID int
notAvailable bool
return void

IsModBossBag() public static method

public static IsModBossBag ( Item item ) : bool
item Item
return bool

MeleeEffects() public static method

public static MeleeEffects ( Item item, Player player, Rectangle hitbox ) : void
item Item
player Player
hitbox Rectangle
return void

ModifyHitNPC() public static method

public static ModifyHitNPC ( Item item, Player player, NPC target, int &damage, float &knockBack, bool &crit ) : void
item Item
player Player
target NPC
damage int
knockBack float
crit bool
return void

ModifyHitPvp() public static method

public static ModifyHitPvp ( Item item, Player player, Player target, int &damage, bool &crit ) : void
item Item
player Player
target Player
damage int
crit bool
return void

ModifyTooltips() public static method

public static ModifyTooltips ( Item item, int &numTooltips, string names, string &text, bool &modifier, bool &badModifier, int &oneDropLogo, Color &overrideColor ) : void
item Item
numTooltips int
names string
text string
modifier bool
badModifier bool
oneDropLogo int
overrideColor Color
return void

NeedsModSaving() public static method

public static NeedsModSaving ( Item item ) : bool
item Item
return bool

OnCraft() public static method

public static OnCraft ( Item item, Recipe recipe ) : void
item Item
recipe Recipe
return void

OnHitNPC() public static method

public static OnHitNPC ( Item item, Player player, NPC target, int damage, float knockBack, bool crit ) : void
item Item
player Player
target NPC
damage int
knockBack float
crit bool
return void

OnHitPvp() public static method

public static OnHitPvp ( Item item, Player player, Player target, int damage, bool crit ) : void
item Item
player Player
target Player
damage int
crit bool
return void

OnPickup() public static method

public static OnPickup ( Item item, Player player ) : bool
item Item
player Player
return bool

OpenBossBag() public static method

public static OpenBossBag ( int type, Player player, int &npc ) : void
type int
player Player
npc int
return void

OpenVanillaBag() public static method

public static OpenVanillaBag ( string context, Player player, int arg ) : void
context string
player Player
arg int
return void

PostDrawInInventory() public static method

public static PostDrawInInventory ( Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale ) : void
item Item
spriteBatch SpriteBatch
position Vector2
frame Rectangle
drawColor Color
itemColor Color
origin Vector2
scale float
return void

PostDrawInWorld() public static method

public static PostDrawInWorld ( Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI ) : void
item Item
spriteBatch SpriteBatch
lightColor Color
alphaColor Color
rotation float
scale float
whoAmI int
return void

PostReforge() public static method

public static PostReforge ( Item item ) : void
item Item
return void

PostUpdate() public static method

public static PostUpdate ( Item item ) : void
item Item
return void

PreDrawInInventory() public static method

public static PreDrawInInventory ( Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale ) : bool
item Item
spriteBatch SpriteBatch
position Vector2
frame Rectangle
drawColor Color
itemColor Color
origin Vector2
scale float
return bool

PreDrawInWorld() public static method

public static PreDrawInWorld ( Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float &rotation, float &scale, int whoAmI ) : bool
item Item
spriteBatch SpriteBatch
lightColor Color
alphaColor Color
rotation float
scale float
whoAmI int
return bool

PreOpenVanillaBag() public static method

public static PreOpenVanillaBag ( string context, Player player, int arg ) : bool
context string
player Player
arg int
return bool

PreReforge() public static method

public static PreReforge ( Item item ) : void
item Item
return void

PreUpdateVanitySet() public static method

public static PreUpdateVanitySet ( Player player ) : void
player Player
return void

RightClick() public static method

public static RightClick ( Item item, Player player ) : void
item Item
player Player
return void

SetMatch() public static method

public static SetMatch ( int armorSlot, int type, bool male, int &equipSlot, bool &robes ) : void
armorSlot int
type int
male bool
equipSlot int
robes bool
return void

Shoot() public static method

public static Shoot ( Item item, Player player, Vector2 &position, float &speedX, float &speedY, int &type, int &damage, float &knockBack ) : bool
item Item
player Player
position Vector2
speedX float
speedY float
type int
damage int
knockBack float
return bool

Update() public static method

public static Update ( Item item, float &gravity, float &maxFallSpeed ) : void
item Item
gravity float
maxFallSpeed float
return void

UpdateAccessory() public static method

public static UpdateAccessory ( Item item, Player player, bool hideVisual ) : void
item Item
player Player
hideVisual bool
return void

UpdateArmorSet() public static method

public static UpdateArmorSet ( Player player, Item head, Item body, Item legs ) : void
player Player
head Item
body Item
legs Item
return void

UpdateEquip() public static method

public static UpdateEquip ( Item item, Player player ) : void
item Item
player Player
return void

UpdateInventory() public static method

public static UpdateInventory ( Item item, Player player ) : void
item Item
player Player
return void

UpdateVanity() public static method

public static UpdateVanity ( Player player ) : void
player Player
return void

UpdateVanitySet() public static method

public static UpdateVanitySet ( Player player ) : void
player Player
return void

UseItem() public static method

public static UseItem ( Item item, Player player ) : bool
item Item
player Player
return bool

UseItemFrame() public static method

public static UseItemFrame ( Item item, Player player ) : bool
item Item
player Player
return bool

UseItemHitbox() public static method

public static UseItemHitbox ( Item item, Player player, Rectangle &hitbox, bool &noHitbox ) : void
item Item
player Player
hitbox Rectangle
noHitbox bool
return void

UseStyle() public static method

public static UseStyle ( Item item, Player player ) : void
item Item
player Player
return void

VerticalWingSpeeds() public static method

public static VerticalWingSpeeds ( Player player, float &ascentWhenFalling, float &ascentWhenRising, float &maxCanAscendMultiplier, float &maxAscentMultiplier, float &constantAscend ) : void
player Player
ascentWhenFalling float
ascentWhenRising float
maxCanAscendMultiplier float
maxAscentMultiplier float
constantAscend float
return void

WingUpdate() public static method

public static WingUpdate ( Player player, bool inUse ) : void
player Player
inUse bool
return void