C# Класс Terraria.ModLoader.PlayerHooks

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Add ( ModPlayer player ) : void
GetModPlayer ( Player player, Mod mod, string name ) : ModPlayer
SendCustomBiomes ( ModPlayer modPlayer, BinaryWriter writer ) : bool
SetupPlayer ( Player player ) : void
Unload ( ) : void

Описание методов

AnglerQuestReward() публичный статический Метод

public static AnglerQuestReward ( Player player, float rareMultiplier, List rewardItems ) : void
player Player
rareMultiplier float
rewardItems List
Результат void

CanBeHitByNPC() публичный статический Метод

public static CanBeHitByNPC ( Player player, NPC npc, int &cooldownSlot ) : bool
player Player
npc NPC
cooldownSlot int
Результат bool

CanBeHitByProjectile() публичный статический Метод

public static CanBeHitByProjectile ( Player player, Projectile proj ) : bool
player Player
proj Projectile
Результат bool

CanHitNPC() публичный статический Метод

public static CanHitNPC ( Player player, System.Item item, NPC target ) : bool?
player Player
item System.Item
target NPC
Результат bool?

CanHitNPCWithProj() публичный статический Метод

public static CanHitNPCWithProj ( Projectile proj, NPC target ) : bool?
proj Projectile
target NPC
Результат bool?

CanHitPvp() публичный статический Метод

public static CanHitPvp ( Player player, System.Item item, Player target ) : bool
player Player
item System.Item
target Player
Результат bool

CanHitPvpWithProj() публичный статический Метод

public static CanHitPvpWithProj ( Projectile proj, Player target ) : bool
proj Projectile
target Player
Результат bool

CatchFish() публичный статический Метод

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
Результат void

ConsumeAmmo() публичный статический Метод

public static ConsumeAmmo ( Player player, System.Item weapon, System.Item ammo ) : bool
player Player
weapon System.Item
ammo System.Item
Результат bool

CopyCustomBiomesTo() публичный статический Метод

public static CopyCustomBiomesTo ( Player player, Player other ) : void
player Player
other Player
Результат void

CustomBiomesMatch() публичный статический Метод

public static CustomBiomesMatch ( Player player, Player other ) : bool
player Player
other Player
Результат bool

DrawEffects() публичный статический Метод

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
Результат void

FrameEffects() публичный статический Метод

public static FrameEffects ( Player player ) : void
player Player
Результат void

GetDrawHeadLayers() публичный статический Метод

public static GetDrawHeadLayers ( Player drawPlayer ) : List
drawPlayer Player
Результат List

GetDrawLayers() публичный статический Метод

public static GetDrawLayers ( Player drawPlayer ) : List
drawPlayer Player
Результат List

GetDyeTraderReward() публичный статический Метод

public static GetDyeTraderReward ( Player player, List rewardPool ) : void
player Player
rewardPool List
Результат void

GetFishingLevel() публичный статический Метод

public static GetFishingLevel ( Player player, System.Item fishingRod, System.Item bait, int &fishingLevel ) : void
player Player
fishingRod System.Item
bait System.Item
fishingLevel int
Результат void

GetMapBackgroundImage() публичный статический Метод

public static GetMapBackgroundImage ( Player player ) : Microsoft.Xna.Framework.Graphics.Texture2D
player Player
Результат Microsoft.Xna.Framework.Graphics.Texture2D

GetWeaponDamage() публичный статический Метод

public static GetWeaponDamage ( Player player, System.Item item, int &damage ) : void
player Player
item System.Item
damage int
Результат void

GetWeaponKnockback() публичный статический Метод

public static GetWeaponKnockback ( Player player, System.Item item, float &knockback ) : void
player Player
item System.Item
knockback float
Результат void

Hurt() публичный статический Метод

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
Результат void

Kill() публичный статический Метод

public static Kill ( Player player, double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource ) : void
player Player
damage double
hitDirection int
pvp bool
damageSource PlayerDeathReason
Результат void

MeleeEffects() публичный статический Метод

public static MeleeEffects ( Player player, System.Item item, Rectangle hitbox ) : void
player Player
item System.Item
hitbox Microsoft.Xna.Framework.Rectangle
Результат void

ModifyDrawInfo() публичный статический Метод

public static ModifyDrawInfo ( Terraria.ModLoader.PlayerDrawInfo &drawInfo ) : void
drawInfo Terraria.ModLoader.PlayerDrawInfo
Результат void

ModifyHitByNPC() публичный статический Метод

public static ModifyHitByNPC ( Player player, NPC npc, int &damage, bool &crit ) : void
player Player
npc NPC
damage int
crit bool
Результат void

ModifyHitByProjectile() публичный статический Метод

public static ModifyHitByProjectile ( Player player, Projectile proj, int &damage, bool &crit ) : void
player Player
proj Projectile
damage int
crit bool
Результат void

ModifyHitNPC() публичный статический Метод

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
Результат void

ModifyHitNPCWithProj() публичный статический Метод

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
Результат void

ModifyHitPvp() публичный статический Метод

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
Результат void

ModifyHitPvpWithProj() публичный статический Метод

public static ModifyHitPvpWithProj ( Projectile proj, Player target, int &damage, bool &crit ) : void
proj Projectile
target Player
damage int
crit bool
Результат void

ModifyScreenPosition() публичный статический Метод

public static ModifyScreenPosition ( Player player ) : void
player Player
Результат void

ModifyZoom() публичный статический Метод

public static ModifyZoom ( Player player, float &zoom ) : void
player Player
zoom float
Результат void

NaturalLifeRegen() публичный статический Метод

public static NaturalLifeRegen ( Player player, float &regen ) : void
player Player
regen float
Результат void

OnEnterWorld() публичный статический Метод

public static OnEnterWorld ( int playerIndex ) : void
playerIndex int
Результат void

OnHitAnything() публичный статический Метод

public static OnHitAnything ( Player player, float x, float y, System.Entity victim ) : void
player Player
x float
y float
victim System.Entity
Результат void

OnHitByNPC() публичный статический Метод

public static OnHitByNPC ( Player player, NPC npc, int damage, bool crit ) : void
player Player
npc NPC
damage int
crit bool
Результат void

OnHitByProjectile() публичный статический Метод

public static OnHitByProjectile ( Player player, Projectile proj, int damage, bool crit ) : void
player Player
proj Projectile
damage int
crit bool
Результат void

OnHitNPC() публичный статический Метод

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
Результат void

OnHitNPCWithProj() публичный статический Метод

public static OnHitNPCWithProj ( Projectile proj, NPC target, int damage, float knockback, bool crit ) : void
proj Projectile
target NPC
damage int
knockback float
crit bool
Результат void

OnHitPvp() публичный статический Метод

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
Результат void

OnHitPvpWithProj() публичный статический Метод

public static OnHitPvpWithProj ( Projectile proj, Player target, int damage, bool crit ) : void
proj Projectile
target Player
damage int
crit bool
Результат void

PlayerConnect() публичный статический Метод

public static PlayerConnect ( int playerIndex ) : void
playerIndex int
Результат void

PlayerDisconnect() публичный статический Метод

public static PlayerDisconnect ( int playerIndex ) : void
playerIndex int
Результат void

PostHurt() публичный статический Метод

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
Результат void

PostItemCheck() публичный статический Метод

public static PostItemCheck ( Player player ) : void
player Player
Результат void

PostUpdate() публичный статический Метод

public static PostUpdate ( Player player ) : void
player Player
Результат void

PostUpdateBuffs() публичный статический Метод

public static PostUpdateBuffs ( Player player ) : void
player Player
Результат void

PostUpdateEquips() публичный статический Метод

public static PostUpdateEquips ( Player player ) : void
player Player
Результат void

PostUpdateMiscEffects() публичный статический Метод

public static PostUpdateMiscEffects ( Player player ) : void
player Player
Результат void

PostUpdateRunSpeeds() публичный статический Метод

public static PostUpdateRunSpeeds ( Player player ) : void
player Player
Результат void

PreHurt() публичный статический Метод

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
Результат bool

PreItemCheck() публичный статический Метод

public static PreItemCheck ( Player player ) : bool
player Player
Результат bool

PreKill() публичный статический Метод

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
Результат bool

PreUpdate() публичный статический Метод

public static PreUpdate ( Player player ) : void
player Player
Результат void

PreUpdateBuffs() публичный статический Метод

public static PreUpdateBuffs ( Player player ) : void
player Player
Результат void

ProcessTriggers() публичный статический Метод

public static ProcessTriggers ( Player player, TriggersSet triggersSet ) : void
player Player
triggersSet TriggersSet
Результат void

ReceiveCustomBiomes() публичный статический Метод

public static ReceiveCustomBiomes ( Player player, BinaryReader reader ) : void
player Player
reader System.IO.BinaryReader
Результат void

ResetEffects() публичный статический Метод

public static ResetEffects ( Player player ) : void
player Player
Результат void

SendClientChanges() публичный статический Метод

public static SendClientChanges ( Player player, Player clientPlayer ) : void
player Player
clientPlayer Player
Результат void

SendCustomBiomes() публичный статический Метод

public static SendCustomBiomes ( Player player, BinaryWriter writer ) : void
player Player
writer System.IO.BinaryWriter
Результат void

SetControls() публичный статический Метод

public static SetControls ( Player player ) : void
player Player
Результат void

SetStartInventory() публичный статический Метод

public static SetStartInventory ( Player player ) : void
player Player
Результат void

SetStartInventory() публичный статический Метод

public static SetStartInventory ( Player player, IList items ) : void
player Player
items IList
Результат void

SetupStartInventory() публичный статический Метод

public static SetupStartInventory ( Player player ) : IList
player Player
Результат IList

Shoot() публичный статический Метод

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
Результат bool

SyncPlayer() публичный статический Метод

public static SyncPlayer ( Player player, int toWho, int fromWho, bool newPlayer ) : void
player Player
toWho int
fromWho int
newPlayer bool
Результат void

UpdateBadLifeRegen() публичный статический Метод

public static UpdateBadLifeRegen ( Player player ) : void
player Player
Результат void

UpdateBiomeVisuals() публичный статический Метод

public static UpdateBiomeVisuals ( Player player ) : void
player Player
Результат void

UpdateBiomes() публичный статический Метод

public static UpdateBiomes ( Player player ) : void
player Player
Результат void

UpdateDead() публичный статический Метод

public static UpdateDead ( Player player ) : void
player Player
Результат void

UpdateEquips() публичный статический Метод

public static UpdateEquips ( Player player, bool &wallSpeedBuff, bool &tileSpeedBuff, bool &tileRangeBuff ) : void
player Player
wallSpeedBuff bool
tileSpeedBuff bool
tileRangeBuff bool
Результат void

UpdateLifeRegen() публичный статический Метод

public static UpdateLifeRegen ( Player player ) : void
player Player
Результат void

UpdateVanityAccessories() публичный статический Метод

public static UpdateVanityAccessories ( Player player ) : void
player Player
Результат void

clientClone() публичный статический Метод

public static clientClone ( Player player, Player clientClone ) : void
player Player
clientClone Player
Результат void