C# Class Terraria.ModLoader.ItemLoader

Afficher le fichier Open project: bluemagic123/tModLoader Class Usage Examples

Private Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthode 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 méthode

public static AltFunctionUse ( Item item, Player player ) : bool
item Item
player Terraria.Player
Résultat bool

AnglerChat() public static méthode

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

ArmorArmGlowMask() public static méthode

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
Résultat void

ArmorSetShadows() public static méthode

public static ArmorSetShadows ( Player player ) : void
player Terraria.Player
Résultat void

AutoLightSelect() public static méthode

public static AutoLightSelect ( Item item, bool &dryTorch, bool &wetTorch, bool &glowstick ) : void
item Item
dryTorch bool
wetTorch bool
glowstick bool
Résultat void

CanEquipAccessory() public static méthode

public static CanEquipAccessory ( Item item, int slot ) : bool
item Item
slot int
Résultat bool

CanHitNPC() public static méthode

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

CanHitPvp() public static méthode

public static CanHitPvp ( Item item, Player player, Player target ) : bool
item Item
player Terraria.Player
target Terraria.Player
Résultat bool

CanRightClick() public static méthode

public static CanRightClick ( Item item ) : bool
item Item
Résultat bool

CanUseItem() public static méthode

public static CanUseItem ( Item item, Player player ) : bool
item Item
player Terraria.Player
Résultat bool

CaughtFishStack() public static méthode

public static CaughtFishStack ( Item item ) : void
item Item
Résultat void

CheckProjOnSwing() public static méthode

public static CheckProjOnSwing ( Player player, Item item ) : bool
player Terraria.Player
item Item
Résultat bool

ConsumeAmmo() public static méthode

public static ConsumeAmmo ( Item item, Item ammo, Player player ) : bool
item Item
ammo Item
player Terraria.Player
Résultat bool

ConsumeItem() public static méthode

public static ConsumeItem ( Item item, Player player ) : bool
item Item
player Terraria.Player
Résultat bool

DrawArmorColor() public static méthode

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
Résultat void

DrawBody() public static méthode

public static DrawBody ( Player player ) : bool
player Terraria.Player
Résultat bool

DrawHair() public static méthode

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

DrawHands() public static méthode

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

DrawHead() public static méthode

public static DrawHead ( Player player ) : bool
player Terraria.Player
Résultat bool

DrawLegs() public static méthode

public static DrawLegs ( Player player ) : bool
player Terraria.Player
Résultat bool

ExtractinatorUse() public static méthode

public static ExtractinatorUse ( int &resultType, int &resultStack, int extractType ) : void
resultType int
resultStack int
extractType int
Résultat void

GetAlpha() public static méthode

public static GetAlpha ( Item item, Color lightColor ) : Color?
item Item
lightColor Color
Résultat Color?

GetItem() public static méthode

public static GetItem ( int type ) : ModItem
type int
Résultat ModItem

GetWeaponDamage() public static méthode

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

GetWeaponKnockback() public static méthode

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

GetWing() public static méthode

public static GetWing ( Player player ) : Item
player Terraria.Player
Résultat Item

GrabRange() public static méthode

public static GrabRange ( Item item, Player player, int &grabRange ) : void
item Item
player Player
grabRange int
Résultat void

GrabStyle() public static méthode

public static GrabStyle ( Item item, Player player ) : bool
item Item
player Player
Résultat bool

HoldItem() public static méthode

public static HoldItem ( Item item, Player player ) : void
item Item
player Player
Résultat void

HoldItemFrame() public static méthode

public static HoldItemFrame ( Item item, Player player ) : bool
item Item
player Player
Résultat bool

HoldStyle() public static méthode

public static HoldStyle ( Item item, Player player ) : void
item Item
player Player
Résultat void

HoldoutOffset() public static méthode

public static HoldoutOffset ( float gravDir, int type, Vector2 &offset ) : void
gravDir float
type int
offset Vector2
Résultat void

HoldoutOrigin() public static méthode

public static HoldoutOrigin ( Player player, Vector2 &origin ) : void
player Player
origin Vector2
Résultat void

HorizontalWingSpeeds() public static méthode

public static HorizontalWingSpeeds ( Player player ) : void
player Player
Résultat void

IsAnglerQuestAvailable() public static méthode

public static IsAnglerQuestAvailable ( int itemID, bool &notAvailable ) : void
itemID int
notAvailable bool
Résultat void

IsModBossBag() public static méthode

public static IsModBossBag ( Item item ) : bool
item Item
Résultat bool

MeleeEffects() public static méthode

public static MeleeEffects ( Item item, Player player, Rectangle hitbox ) : void
item Item
player Player
hitbox Rectangle
Résultat void

ModifyHitNPC() public static méthode

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
Résultat void

ModifyHitPvp() public static méthode

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

ModifyTooltips() public static méthode

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
Résultat void

NeedsModSaving() public static méthode

public static NeedsModSaving ( Item item ) : bool
item Item
Résultat bool

OnCraft() public static méthode

public static OnCraft ( Item item, Recipe recipe ) : void
item Item
recipe Recipe
Résultat void

OnHitNPC() public static méthode

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
Résultat void

OnHitPvp() public static méthode

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

OnPickup() public static méthode

public static OnPickup ( Item item, Player player ) : bool
item Item
player Player
Résultat bool

OpenBossBag() public static méthode

public static OpenBossBag ( int type, Player player, int &npc ) : void
type int
player Player
npc int
Résultat void

OpenVanillaBag() public static méthode

public static OpenVanillaBag ( string context, Player player, int arg ) : void
context string
player Player
arg int
Résultat void

PostDrawInInventory() public static méthode

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
Résultat void

PostDrawInWorld() public static méthode

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
Résultat void

PostReforge() public static méthode

public static PostReforge ( Item item ) : void
item Item
Résultat void

PostUpdate() public static méthode

public static PostUpdate ( Item item ) : void
item Item
Résultat void

PreDrawInInventory() public static méthode

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
Résultat bool

PreDrawInWorld() public static méthode

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
Résultat bool

PreOpenVanillaBag() public static méthode

public static PreOpenVanillaBag ( string context, Player player, int arg ) : bool
context string
player Player
arg int
Résultat bool

PreReforge() public static méthode

public static PreReforge ( Item item ) : void
item Item
Résultat void

PreUpdateVanitySet() public static méthode

public static PreUpdateVanitySet ( Player player ) : void
player Player
Résultat void

RightClick() public static méthode

public static RightClick ( Item item, Player player ) : void
item Item
player Player
Résultat void

SetMatch() public static méthode

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

Shoot() public static méthode

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
Résultat bool

Update() public static méthode

public static Update ( Item item, float &gravity, float &maxFallSpeed ) : void
item Item
gravity float
maxFallSpeed float
Résultat void

UpdateAccessory() public static méthode

public static UpdateAccessory ( Item item, Player player, bool hideVisual ) : void
item Item
player Player
hideVisual bool
Résultat void

UpdateArmorSet() public static méthode

public static UpdateArmorSet ( Player player, Item head, Item body, Item legs ) : void
player Player
head Item
body Item
legs Item
Résultat void

UpdateEquip() public static méthode

public static UpdateEquip ( Item item, Player player ) : void
item Item
player Player
Résultat void

UpdateInventory() public static méthode

public static UpdateInventory ( Item item, Player player ) : void
item Item
player Player
Résultat void

UpdateVanity() public static méthode

public static UpdateVanity ( Player player ) : void
player Player
Résultat void

UpdateVanitySet() public static méthode

public static UpdateVanitySet ( Player player ) : void
player Player
Résultat void

UseItem() public static méthode

public static UseItem ( Item item, Player player ) : bool
item Item
player Player
Résultat bool

UseItemFrame() public static méthode

public static UseItemFrame ( Item item, Player player ) : bool
item Item
player Player
Résultat bool

UseItemHitbox() public static méthode

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

UseStyle() public static méthode

public static UseStyle ( Item item, Player player ) : void
item Item
player Player
Résultat void

VerticalWingSpeeds() public static méthode

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
Résultat void

WingUpdate() public static méthode

public static WingUpdate ( Player player, bool inUse ) : void
player Player
inUse bool
Résultat void