C# Class Terraria.ModLoader.PlayerHooks

Mostra file Open project: bluemagic123/tModLoader Class Usage Examples

Public Methods

Method Description
AnglerQuestReward ( Player player, float rareMultiplier, List rewardItems ) : void
CanBeHitByNPC ( Player player, NPC npc, int &cooldownSlot ) : bool
CanBeHitByProjectile ( Player player, Projectile proj ) : bool
CanHitNPC ( Player player, System.Item item, NPC target ) : bool?
CanHitNPCWithProj ( Projectile proj, NPC target ) : bool?
CanHitPvp ( Player player, System.Item item, Player target ) : bool
CanHitPvpWithProj ( Projectile proj, Player target ) : bool
CatchFish ( Player player, System.Item fishingRod, int power, int liquidType, int poolSize, int worldLayer, int questFish, int &caughtType, bool &junk ) : void
ConsumeAmmo ( Player player, System.Item weapon, System.Item ammo ) : bool
CopyCustomBiomesTo ( Player player, Player other ) : void
CustomBiomesMatch ( Player player, Player other ) : bool
DrawEffects ( Terraria.ModLoader.PlayerDrawInfo drawInfo, float &r, float &g, float &b, float &a, bool &fullBright ) : void
FrameEffects ( Player player ) : void
GetDrawHeadLayers ( Player drawPlayer ) : List
GetDrawLayers ( Player drawPlayer ) : List
GetDyeTraderReward ( Player player, List rewardPool ) : void
GetFishingLevel ( Player player, System.Item fishingRod, System.Item bait, int &fishingLevel ) : void
GetMapBackgroundImage ( Player player ) : Microsoft.Xna.Framework.Graphics.Texture2D
GetWeaponDamage ( Player player, System.Item item, int &damage ) : void
GetWeaponKnockback ( Player player, System.Item item, float &knockback ) : void
Hurt ( Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit ) : void
Kill ( Player player, double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource ) : void
MeleeEffects ( Player player, System.Item item, Rectangle hitbox ) : void
ModifyDrawInfo ( Terraria.ModLoader.PlayerDrawInfo &drawInfo ) : void
ModifyHitByNPC ( Player player, NPC npc, int &damage, bool &crit ) : void
ModifyHitByProjectile ( Player player, Projectile proj, int &damage, bool &crit ) : void
ModifyHitNPC ( Player player, System.Item item, NPC target, int &damage, float &knockback, bool &crit ) : void
ModifyHitNPCWithProj ( Projectile proj, NPC target, int &damage, float &knockback, bool &crit, int &hitDirection ) : void
ModifyHitPvp ( Player player, System.Item item, Player target, int &damage, bool &crit ) : void
ModifyHitPvpWithProj ( Projectile proj, Player target, int &damage, bool &crit ) : void
ModifyScreenPosition ( Player player ) : void
ModifyZoom ( Player player, float &zoom ) : void
NaturalLifeRegen ( Player player, float &regen ) : void
OnEnterWorld ( int playerIndex ) : void
OnHitAnything ( Player player, float x, float y, System.Entity victim ) : void
OnHitByNPC ( Player player, NPC npc, int damage, bool crit ) : void
OnHitByProjectile ( Player player, Projectile proj, int damage, bool crit ) : void
OnHitNPC ( Player player, System.Item item, NPC target, int damage, float knockback, bool crit ) : void
OnHitNPCWithProj ( Projectile proj, NPC target, int damage, float knockback, bool crit ) : void
OnHitPvp ( Player player, System.Item item, Player target, int damage, bool crit ) : void
OnHitPvpWithProj ( Projectile proj, Player target, int damage, bool crit ) : void
PlayerConnect ( int playerIndex ) : void
PlayerDisconnect ( int playerIndex ) : void
PostHurt ( Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit ) : void
PostItemCheck ( Player player ) : void
PostUpdate ( Player player ) : void
PostUpdateBuffs ( Player player ) : void
PostUpdateEquips ( Player player ) : void
PostUpdateMiscEffects ( Player player ) : void
PostUpdateRunSpeeds ( Player player ) : void
PreHurt ( Player player, bool pvp, bool quiet, int &damage, int &hitDirection, bool &crit, bool &customDamage, bool &playSound, bool &genGore, PlayerDeathReason &damageSource ) : bool
PreItemCheck ( Player player ) : bool
PreKill ( Player player, double damage, int hitDirection, bool pvp, bool &playSound, bool &genGore, PlayerDeathReason &damageSource ) : bool
PreUpdate ( Player player ) : void
PreUpdateBuffs ( Player player ) : void
ProcessTriggers ( Player player, TriggersSet triggersSet ) : void
ReceiveCustomBiomes ( Player player, BinaryReader reader ) : void
ResetEffects ( Player player ) : void
SendClientChanges ( Player player, Player clientPlayer ) : void
SendCustomBiomes ( Player player, BinaryWriter writer ) : void
SetControls ( Player player ) : void
SetStartInventory ( Player player ) : void
SetStartInventory ( Player player, IList items ) : void
SetupStartInventory ( Player player ) : IList
Shoot ( Player player, System.Item item, Vector2 &position, float &speedX, float &speedY, int &type, int &damage, float &knockBack ) : bool
SyncPlayer ( Player player, int toWho, int fromWho, bool newPlayer ) : void
UpdateBadLifeRegen ( Player player ) : void
UpdateBiomeVisuals ( Player player ) : void
UpdateBiomes ( Player player ) : void
UpdateDead ( Player player ) : void
UpdateEquips ( Player player, bool &wallSpeedBuff, bool &tileSpeedBuff, bool &tileRangeBuff ) : void
UpdateLifeRegen ( Player player ) : void
UpdateVanityAccessories ( Player player ) : void
clientClone ( Player player, Player clientClone ) : void

Private Methods

Method Description
Add ( ModPlayer player ) : void
GetModPlayer ( Player player, Mod mod, string name ) : ModPlayer
SendCustomBiomes ( ModPlayer modPlayer, BinaryWriter writer ) : bool
SetupPlayer ( Player player ) : void
Unload ( ) : void

Method Details

AnglerQuestReward() public static method

public static AnglerQuestReward ( Player player, float rareMultiplier, List rewardItems ) : void
player Player
rareMultiplier float
rewardItems List
return void

CanBeHitByNPC() public static method

public static CanBeHitByNPC ( Player player, NPC npc, int &cooldownSlot ) : bool
player Player
npc NPC
cooldownSlot int
return bool

CanBeHitByProjectile() public static method

public static CanBeHitByProjectile ( Player player, Projectile proj ) : bool
player Player
proj Projectile
return bool

CanHitNPC() public static method

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

CanHitNPCWithProj() public static method

public static CanHitNPCWithProj ( Projectile proj, NPC target ) : bool?
proj Projectile
target NPC
return bool?

CanHitPvp() public static method

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

CanHitPvpWithProj() public static method

public static CanHitPvpWithProj ( Projectile proj, Player target ) : bool
proj Projectile
target Player
return bool

CatchFish() public static method

public static CatchFish ( Player player, System.Item fishingRod, int power, int liquidType, int poolSize, int worldLayer, int questFish, int &caughtType, bool &junk ) : void
player Player
fishingRod System.Item
power int
liquidType int
poolSize int
worldLayer int
questFish int
caughtType int
junk bool
return void

ConsumeAmmo() public static method

public static ConsumeAmmo ( Player player, System.Item weapon, System.Item ammo ) : bool
player Player
weapon System.Item
ammo System.Item
return bool

CopyCustomBiomesTo() public static method

public static CopyCustomBiomesTo ( Player player, Player other ) : void
player Player
other Player
return void

CustomBiomesMatch() public static method

public static CustomBiomesMatch ( Player player, Player other ) : bool
player Player
other Player
return bool

DrawEffects() public static method

public static DrawEffects ( Terraria.ModLoader.PlayerDrawInfo drawInfo, float &r, float &g, float &b, float &a, bool &fullBright ) : void
drawInfo Terraria.ModLoader.PlayerDrawInfo
r float
g float
b float
a float
fullBright bool
return void

FrameEffects() public static method

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

GetDrawHeadLayers() public static method

public static GetDrawHeadLayers ( Player drawPlayer ) : List
drawPlayer Player
return List

GetDrawLayers() public static method

public static GetDrawLayers ( Player drawPlayer ) : List
drawPlayer Player
return List

GetDyeTraderReward() public static method

public static GetDyeTraderReward ( Player player, List rewardPool ) : void
player Player
rewardPool List
return void

GetFishingLevel() public static method

public static GetFishingLevel ( Player player, System.Item fishingRod, System.Item bait, int &fishingLevel ) : void
player Player
fishingRod System.Item
bait System.Item
fishingLevel int
return void

GetMapBackgroundImage() public static method

public static GetMapBackgroundImage ( Player player ) : Microsoft.Xna.Framework.Graphics.Texture2D
player Player
return Microsoft.Xna.Framework.Graphics.Texture2D

GetWeaponDamage() public static method

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

GetWeaponKnockback() public static method

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

Hurt() public static method

public static Hurt ( Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit ) : void
player Player
pvp bool
quiet bool
damage double
hitDirection int
crit bool
return void

Kill() public static method

public static Kill ( Player player, double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource ) : void
player Player
damage double
hitDirection int
pvp bool
damageSource PlayerDeathReason
return void

MeleeEffects() public static method

public static MeleeEffects ( Player player, System.Item item, Rectangle hitbox ) : void
player Player
item System.Item
hitbox Microsoft.Xna.Framework.Rectangle
return void

ModifyDrawInfo() public static method

public static ModifyDrawInfo ( Terraria.ModLoader.PlayerDrawInfo &drawInfo ) : void
drawInfo Terraria.ModLoader.PlayerDrawInfo
return void

ModifyHitByNPC() public static method

public static ModifyHitByNPC ( Player player, NPC npc, int &damage, bool &crit ) : void
player Player
npc NPC
damage int
crit bool
return void

ModifyHitByProjectile() public static method

public static ModifyHitByProjectile ( Player player, Projectile proj, int &damage, bool &crit ) : void
player Player
proj Projectile
damage int
crit bool
return void

ModifyHitNPC() public static method

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

ModifyHitNPCWithProj() public static method

public static ModifyHitNPCWithProj ( Projectile proj, NPC target, int &damage, float &knockback, bool &crit, int &hitDirection ) : void
proj Projectile
target NPC
damage int
knockback float
crit bool
hitDirection int
return void

ModifyHitPvp() public static method

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

ModifyHitPvpWithProj() public static method

public static ModifyHitPvpWithProj ( Projectile proj, Player target, int &damage, bool &crit ) : void
proj Projectile
target Player
damage int
crit bool
return void

ModifyScreenPosition() public static method

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

ModifyZoom() public static method

public static ModifyZoom ( Player player, float &zoom ) : void
player Player
zoom float
return void

NaturalLifeRegen() public static method

public static NaturalLifeRegen ( Player player, float &regen ) : void
player Player
regen float
return void

OnEnterWorld() public static method

public static OnEnterWorld ( int playerIndex ) : void
playerIndex int
return void

OnHitAnything() public static method

public static OnHitAnything ( Player player, float x, float y, System.Entity victim ) : void
player Player
x float
y float
victim System.Entity
return void

OnHitByNPC() public static method

public static OnHitByNPC ( Player player, NPC npc, int damage, bool crit ) : void
player Player
npc NPC
damage int
crit bool
return void

OnHitByProjectile() public static method

public static OnHitByProjectile ( Player player, Projectile proj, int damage, bool crit ) : void
player Player
proj Projectile
damage int
crit bool
return void

OnHitNPC() public static method

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

OnHitNPCWithProj() public static method

public static OnHitNPCWithProj ( Projectile proj, NPC target, int damage, float knockback, bool crit ) : void
proj Projectile
target NPC
damage int
knockback float
crit bool
return void

OnHitPvp() public static method

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

OnHitPvpWithProj() public static method

public static OnHitPvpWithProj ( Projectile proj, Player target, int damage, bool crit ) : void
proj Projectile
target Player
damage int
crit bool
return void

PlayerConnect() public static method

public static PlayerConnect ( int playerIndex ) : void
playerIndex int
return void

PlayerDisconnect() public static method

public static PlayerDisconnect ( int playerIndex ) : void
playerIndex int
return void

PostHurt() public static method

public static PostHurt ( Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit ) : void
player Player
pvp bool
quiet bool
damage double
hitDirection int
crit bool
return void

PostItemCheck() public static method

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

PostUpdate() public static method

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

PostUpdateBuffs() public static method

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

PostUpdateEquips() public static method

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

PostUpdateMiscEffects() public static method

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

PostUpdateRunSpeeds() public static method

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

PreHurt() public static method

public static PreHurt ( Player player, bool pvp, bool quiet, int &damage, int &hitDirection, bool &crit, bool &customDamage, bool &playSound, bool &genGore, PlayerDeathReason &damageSource ) : bool
player Player
pvp bool
quiet bool
damage int
hitDirection int
crit bool
customDamage bool
playSound bool
genGore bool
damageSource PlayerDeathReason
return bool

PreItemCheck() public static method

public static PreItemCheck ( Player player ) : bool
player Player
return bool

PreKill() public static method

public static PreKill ( Player player, double damage, int hitDirection, bool pvp, bool &playSound, bool &genGore, PlayerDeathReason &damageSource ) : bool
player Player
damage double
hitDirection int
pvp bool
playSound bool
genGore bool
damageSource PlayerDeathReason
return bool

PreUpdate() public static method

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

PreUpdateBuffs() public static method

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

ProcessTriggers() public static method

public static ProcessTriggers ( Player player, TriggersSet triggersSet ) : void
player Player
triggersSet TriggersSet
return void

ReceiveCustomBiomes() public static method

public static ReceiveCustomBiomes ( Player player, BinaryReader reader ) : void
player Player
reader System.IO.BinaryReader
return void

ResetEffects() public static method

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

SendClientChanges() public static method

public static SendClientChanges ( Player player, Player clientPlayer ) : void
player Player
clientPlayer Player
return void

SendCustomBiomes() public static method

public static SendCustomBiomes ( Player player, BinaryWriter writer ) : void
player Player
writer System.IO.BinaryWriter
return void

SetControls() public static method

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

SetStartInventory() public static method

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

SetStartInventory() public static method

public static SetStartInventory ( Player player, IList items ) : void
player Player
items IList
return void

SetupStartInventory() public static method

public static SetupStartInventory ( Player player ) : IList
player Player
return IList

Shoot() public static method

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

SyncPlayer() public static method

public static SyncPlayer ( Player player, int toWho, int fromWho, bool newPlayer ) : void
player Player
toWho int
fromWho int
newPlayer bool
return void

UpdateBadLifeRegen() public static method

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

UpdateBiomeVisuals() public static method

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

UpdateBiomes() public static method

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

UpdateDead() public static method

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

UpdateEquips() public static method

public static UpdateEquips ( Player player, bool &wallSpeedBuff, bool &tileSpeedBuff, bool &tileRangeBuff ) : void
player Player
wallSpeedBuff bool
tileSpeedBuff bool
tileRangeBuff bool
return void

UpdateLifeRegen() public static method

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

UpdateVanityAccessories() public static method

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

clientClone() public static method

public static clientClone ( Player player, Player clientClone ) : void
player Player
clientClone Player
return void