tModLoader v0.11.8.9
A mod to make and play Terraria mods
Terraria.ModLoader.PlayerHooks Class Reference

This is where all ModPlayer hooks are gathered and called. More...

+ Collaboration diagram for Terraria.ModLoader.PlayerHooks:

Classes

class  HookList
 

Static Public Member Functions

static void AnglerQuestReward (Player player, float rareMultiplier, List< Item > rewardItems)
 
static bool CanBeHitByNPC (Player player, NPC npc, ref int cooldownSlot)
 
static bool CanBeHitByProjectile (Player player, Projectile proj)
 
static bool CanBuyItem (Player player, NPC npc, Item[] shopInventory, Item item)
 
static ? bool CanHitNPC (Player player, Item item, NPC target)
 
static ? bool CanHitNPCWithProj (Projectile proj, NPC target)
 
static bool CanHitPvp (Player player, Item item, Player target)
 
static bool CanHitPvpWithProj (Projectile proj, Player target)
 
static bool CanSellItem (Player player, NPC npc, Item[] shopInventory, Item item)
 
static void CatchFish (Player player, Item fishingRod, int power, int liquidType, int poolSize, int worldLayer, int questFish, ref int caughtType, ref bool junk)
 
static void clientClone (Player player, Player clientClone)
 
static bool ConsumeAmmo (Player player, Item weapon, Item ammo)
 
static void CopyCustomBiomesTo (Player player, Player other)
 
static bool CustomBiomesMatch (Player player, Player other)
 
static void DrawEffects (PlayerDrawInfo drawInfo, ref float r, ref float g, ref float b, ref float a, ref bool fullBright)
 
static void FrameEffects (Player player)
 
static List< PlayerHeadLayerGetDrawHeadLayers (Player drawPlayer)
 
static List< PlayerLayerGetDrawLayers (Player drawPlayer)
 
static void GetDyeTraderReward (Player player, List< int > rewardPool)
 
static void GetFishingLevel (Player player, Item fishingRod, Item bait, ref int fishingLevel)
 
static void GetHealLife (Player player, Item item, bool quickHeal, ref int healValue)
 
static void GetHealMana (Player player, Item item, bool quickHeal, ref int healValue)
 
static Texture2D GetMapBackgroundImage (Player player)
 
static void GetWeaponCrit (Player player, Item item, ref int crit)
 
static void GetWeaponDamage (Player player, Item item, ref int damage)
 
static void GetWeaponKnockback (Player player, Item item, ref float knockback)
 
static void Hurt (Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit)
 
static void Kill (Player player, double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource)
 
static void MeleeEffects (Player player, Item item, Rectangle hitbox)
 
static float MeleeSpeedMultiplier (Player player, Item item)
 
static void ModifyDrawInfo (ref PlayerDrawInfo drawInfo)
 
static void ModifyHitByNPC (Player player, NPC npc, ref int damage, ref bool crit)
 
static void ModifyHitByProjectile (Player player, Projectile proj, ref int damage, ref bool crit)
 
static void ModifyHitNPC (Player player, Item item, NPC target, ref int damage, ref float knockback, ref bool crit)
 
static void ModifyHitNPCWithProj (Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 
static void ModifyHitPvp (Player player, Item item, Player target, ref int damage, ref bool crit)
 
static void ModifyHitPvpWithProj (Projectile proj, Player target, ref int damage, ref bool crit)
 
static void ModifyManaCost (Player player, Item item, ref float reduce, ref float mult)
 
static bool ModifyNurseHeal (Player p, NPC npc, ref int health, ref bool removeDebuffs, ref string chat)
 
static void ModifyNursePrice (Player p, NPC npc, int health, bool removeDebuffs, ref int price)
 
static void ModifyScreenPosition (Player player)
 
static void ModifyWeaponDamage (Player player, Item item, ref float add, ref float mult, ref float flat)
 Calls ModItem.HookModifyWeaponDamage, then all GlobalItem.HookModifyWeaponDamage hooks. More...
 
static void ModifyZoom (Player player, ref float zoom)
 
static void NaturalLifeRegen (Player player, ref float regen)
 
static void OnConsumeAmmo (Player player, Item weapon, Item ammo)
 
static void OnConsumeMana (Player player, Item item, int manaConsumed)
 
static void OnEnterWorld (int playerIndex)
 
static void OnHitAnything (Player player, float x, float y, Entity victim)
 
static void OnHitByNPC (Player player, NPC npc, int damage, bool crit)
 
static void OnHitByProjectile (Player player, Projectile proj, int damage, bool crit)
 
static void OnHitNPC (Player player, Item item, NPC target, int damage, float knockback, bool crit)
 
static void OnHitNPCWithProj (Projectile proj, NPC target, int damage, float knockback, bool crit)
 
static void OnHitPvp (Player player, Item item, Player target, int damage, bool crit)
 
static void OnHitPvpWithProj (Projectile proj, Player target, int damage, bool crit)
 
static void OnMissingMana (Player player, Item item, int manaNeeded)
 
static void OnRespawn (Player player)
 
static void PlayerConnect (int playerIndex)
 
static void PlayerDisconnect (int playerIndex)
 
static void PostBuyItem (Player player, NPC npc, Item[] shopInventory, Item item)
 
static void PostHurt (Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit)
 
static void PostItemCheck (Player player)
 
static void PostNurseHeal (Player player, NPC npc, int health, bool removeDebuffs, int price)
 
static void PostSavePlayer (Player player)
 
static void PostSellItem (Player player, NPC npc, Item[] shopInventory, Item item)
 
static void PostUpdate (Player player)
 
static void PostUpdateBuffs (Player player)
 
static void PostUpdateEquips (Player player)
 
static void PostUpdateMiscEffects (Player player)
 
static void PostUpdateRunSpeeds (Player player)
 
static bool PreHurt (Player player, bool pvp, bool quiet, ref int damage, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
 
static bool PreItemCheck (Player player)
 
static bool PreKill (Player player, double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
 
static void PreSavePlayer (Player player)
 
static void PreUpdate (Player player)
 
static void PreUpdateBuffs (Player player)
 
static void PreUpdateMovement (Player player)
 
static void ProcessTriggers (Player player, TriggersSet triggersSet)
 
static void ReceiveCustomBiomes (Player player, BinaryReader reader)
 
static void ResetEffects (Player player)
 
static void SendClientChanges (Player player, Player clientPlayer)
 
static void SendCustomBiomes (Player player, BinaryWriter writer)
 
static void SetControls (Player player)
 
static void SetStartInventory (Player player)
 
static void SetStartInventory (Player player, IList< Item > items)
 
static IList< Item > SetupStartInventory (Player player, bool mediumcoreDeath=false)
 
static bool ShiftClickSlot (Player player, Item[] inventory, int context, int slot)
 
static bool Shoot (Player player, Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
 
static void SyncPlayer (Player player, int toWho, int fromWho, bool newPlayer)
 
static float TotalMeleeSpeedMultiplier (Player player, Item item)
 
static int TotalMeleeTime (float useAnimation, Player player, Item item)
 
static int TotalUseTime (float useTime, Player player, Item item)
 
static float TotalUseTimeMultiplier (Player player, Item item)
 
static void UpdateAutopause (Player player)
 
static void UpdateBadLifeRegen (Player player)
 
static void UpdateBiomes (Player player)
 
static void UpdateBiomeVisuals (Player player)
 
static void UpdateDead (Player player)
 
static void UpdateEquips (Player player, ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff)
 
static void UpdateLifeRegen (Player player)
 
static void UpdateVanityAccessories (Player player)
 
static float UseTimeMultiplier (Player player, Item item)
 

Private Member Functions

delegate bool DelegateCanBeHitByNPC (NPC npc, ref int cooldownSlot)
 
delegate void DelegateCatchFish (Item fishingRod, Item bait, int power, int liquidType, int poolSize, int worldLayer, int questFish, ref int caughtType, ref bool junk)
 
delegate void DelegateDrawEffects (PlayerDrawInfo drawInfo, ref float r, ref float g, ref float b, ref float a, ref bool fullBright)
 
delegate void DelegateGetFishingLevel (Item fishingRod, Item bait, ref int fishingLevel)
 
delegate void DelegateGetHealLife (Item item, bool quickHeal, ref int healValue)
 
delegate void DelegateGetHealMana (Item item, bool quickHeal, ref int healValue)
 
delegate void DelegateGetWeaponCrit (Item item, ref int crit)
 
delegate void DelegateGetWeaponDamage (Item item, ref int damage)
 
delegate void DelegateGetWeaponKnockback (Item item, ref float knockback)
 
delegate void DelegateModifyDrawInfo (ref PlayerDrawInfo drawInfo)
 
delegate void DelegateModifyHitByNPC (NPC npc, ref int damage, ref bool crit)
 
delegate void DelegateModifyHitByProjectile (Projectile proj, ref int damage, ref bool crit)
 
delegate void DelegateModifyHitNPC (Item item, NPC target, ref int damage, ref float knockback, ref bool crit)
 
delegate void DelegateModifyHitNPCWithProj (Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 
delegate void DelegateModifyHitPvp (Item item, Player target, ref int damage, ref bool crit)
 
delegate void DelegateModifyHitPvpWithProj (Projectile proj, Player target, ref int damage, ref bool crit)
 
delegate void DelegateModifyManaCost (Item item, ref float reduce, ref float mult)
 
delegate bool DelegateModifyNurseHeal (NPC npc, ref int health, ref bool removeDebuffs, ref string chatText)
 
delegate void DelegateModifyNursePrice (NPC npc, int health, bool removeDebuffs, ref int price)
 
delegate void DelegateModifyWeaponDamage (Item item, ref float add, ref float mult, ref float flat)
 
delegate void DelegateModifyWeaponDamageOld (Item item, ref float add, ref float mult)
 
delegate void DelegateModifyZoom (ref float zoom)
 
delegate void DelegateNaturalLifeRegen (ref float regen)
 
delegate bool DelegatePreHurt (bool pvp, bool quiet, ref int damage, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
 
delegate bool DelegatePreKill (double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
 
delegate bool DelegateShoot (Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
 
delegate void DelegateUpdateEquips (ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff)
 

Static Private Member Functions

static HookList AddHook< F > (Expression< Func< ModPlayer, F > > func)
 
static bool HasMethod (Type t, string method, params Type[] args)
 
static bool SendCustomBiomes (ModPlayer modPlayer, BinaryWriter writer)
 

Static Private Attributes

static HookList HookAnglerQuestReward = AddHook<Action<float, List<Item>>>(p => p.AnglerQuestReward)
 
static HookList HookCanBeHitByNPC = AddHook<DelegateCanBeHitByNPC>(p => p.CanBeHitByNPC)
 
static HookList HookCanBeHitByProjectile = AddHook<Func<Projectile, bool>>(p => p.CanBeHitByProjectile)
 
static HookList HookCanBuyItem = AddHook<Func<NPC, Item[], Item, bool>>(p => p.CanBuyItem)
 
static HookList HookCanHitNPC = AddHook<Func<Item, NPC, bool?>>(p => p.CanHitNPC)
 
static HookList HookCanHitNPCWithProj = AddHook<Func<Projectile, NPC, bool?>>(p => p.CanHitNPCWithProj)
 
static HookList HookCanHitPvp = AddHook<Func<Item, Player, bool>>(p => p.CanHitPvp)
 
static HookList HookCanHitPvpWithProj = AddHook<Func<Projectile, Player, bool>>(p => p.CanHitPvpWithProj)
 
static HookList HookCanSellItem = AddHook<Func<NPC, Item[], Item, bool>>(p => p.CanSellItem)
 
static HookList HookCatchFish = AddHook<DelegateCatchFish>(p => p.CatchFish)
 
static HookList HookClientClone = AddHook<Action<ModPlayer>>(p => p.clientClone)
 
static HookList HookConsumeAmmo = AddHook<Func<Item, Item, bool>>(p => p.ConsumeAmmo)
 
static HookList HookCopyCustomBiomesTo = AddHook<Action<Player>>(p => p.CopyCustomBiomesTo)
 
static HookList HookCustomBiomesMatch = AddHook<Func<Player, bool>>(p => p.CustomBiomesMatch)
 
static HookList HookDrawEffects = AddHook<DelegateDrawEffects>(p => p.DrawEffects)
 
static HookList HookFrameEffects = AddHook<Action>(p => p.FrameEffects)
 
static HookList HookGetDyeTraderReward = AddHook<Action<List<int>>>(p => p.GetDyeTraderReward)
 
static HookList HookGetFishingLevel = AddHook<DelegateGetFishingLevel>(p => p.GetFishingLevel)
 
static HookList HookGetHealLife = AddHook<DelegateGetHealLife>(p => p.GetHealLife)
 
static HookList HookGetHealMana = AddHook<DelegateGetHealMana>(p => p.GetHealMana)
 
static HookList HookGetMapBackgroundImage = AddHook<Func<Texture2D>>(p => p.GetMapBackgroundImage)
 
static HookList HookGetWeaponCrit = AddHook<DelegateGetWeaponCrit>(p => p.GetWeaponCrit)
 
static HookList HookGetWeaponDamage = AddHook<DelegateGetWeaponDamage>(p => p.GetWeaponDamage)
 
static HookList HookGetWeaponKnockback = AddHook<DelegateGetWeaponKnockback>(p => p.GetWeaponKnockback)
 
static HookList HookHurt = AddHook<Action<bool, bool, double, int, bool>>(p => p.Hurt)
 
static HookList HookKill = AddHook<Action<double, int, bool, PlayerDeathReason>>(p => p.Kill)
 
static HookList HookMeleeEffects = AddHook<Action<Item, Rectangle>>(p => p.MeleeEffects)
 
static HookList HookMeleeSpeedMultiplier = AddHook<Func<Item, float>>(p => p.MeleeSpeedMultiplier)
 
static HookList HookModifyDrawHeadLayers = AddHook<Action<List<PlayerHeadLayer>>>(p => p.ModifyDrawHeadLayers)
 
static HookList HookModifyDrawInfo = AddHook<DelegateModifyDrawInfo>(p => p.ModifyDrawInfo)
 
static HookList HookModifyDrawLayers = AddHook<Action<List<PlayerLayer>>>(p => p.ModifyDrawLayers)
 
static HookList HookModifyHitByNPC = AddHook<DelegateModifyHitByNPC>(p => p.ModifyHitByNPC)
 
static HookList HookModifyHitByProjectile = AddHook<DelegateModifyHitByProjectile>(p => p.ModifyHitByProjectile)
 
static HookList HookModifyHitNPC = AddHook<DelegateModifyHitNPC>(p => p.ModifyHitNPC)
 
static HookList HookModifyHitNPCWithProj = AddHook<DelegateModifyHitNPCWithProj>(p => p.ModifyHitNPCWithProj)
 
static HookList HookModifyHitPvp = AddHook<DelegateModifyHitPvp>(p => p.ModifyHitPvp)
 
static HookList HookModifyHitPvpWithProj = AddHook<DelegateModifyHitPvpWithProj>(p => p.ModifyHitPvpWithProj)
 
static HookList HookModifyManaCost = AddHook<DelegateModifyManaCost>(p => p.ModifyManaCost)
 
static HookList HookModifyNurseHeal = AddHook<DelegateModifyNurseHeal>(p => p.ModifyNurseHeal)
 
static HookList HookModifyNursePrice = AddHook<DelegateModifyNursePrice>(p => p.ModifyNursePrice)
 
static HookList HookModifyScreenPosition = AddHook<Action>(p => p.ModifyScreenPosition)
 
static HookList HookModifyWeaponDamage = AddHook<DelegateModifyWeaponDamage>(p => p.ModifyWeaponDamage)
 
static HookList HookModifyWeaponDamageOld = AddHook<DelegateModifyWeaponDamage>(p => p.ModifyWeaponDamage)
 
static HookList HookModifyZoom = AddHook<DelegateModifyZoom>(p => p.ModifyZoom)
 
static HookList HookNaturalLifeRegen = AddHook<DelegateNaturalLifeRegen>(p => p.NaturalLifeRegen)
 
static HookList HookOnConsumeAmmo = AddHook<Action<Item, Item>>(p => p.OnConsumeAmmo)
 
static HookList HookOnConsumeMana = AddHook<Action<Item, int>>(p => p.OnConsumeMana)
 
static HookList HookOnEnterWorld = AddHook<Action<Player>>(p => p.OnEnterWorld)
 
static HookList HookOnHitAnything = AddHook<Action<float, float, Entity>>(p => p.OnHitAnything)
 
static HookList HookOnHitByNPC = AddHook<Action<NPC, int, bool>>(p => p.OnHitByNPC)
 
static HookList HookOnHitByProjectile = AddHook<Action<Projectile, int, bool>>(p => p.OnHitByProjectile)
 
static HookList HookOnHitNPC = AddHook<Action<Item, NPC, int, float, bool>>(p => p.OnHitNPC)
 
static HookList HookOnHitNPCWithProj = AddHook<Action<Projectile, NPC, int, float, bool>>(p => p.OnHitNPCWithProj)
 
static HookList HookOnHitPvp = AddHook<Action<Item, Player, int, bool>>(p => p.OnHitPvp)
 
static HookList HookOnHitPvpWithProj = AddHook<Action<Projectile, Player, int, bool>>(p => p.OnHitPvpWithProj)
 
static HookList HookOnMissingMana = AddHook<Action<Item, int>>(p => p.OnMissingMana)
 
static HookList HookOnRespawn = AddHook<Action<Player>>(p => p.OnRespawn)
 
static HookList HookPlayerConnect = AddHook<Action<Player>>(p => p.PlayerConnect)
 
static HookList HookPlayerDisconnect = AddHook<Action<Player>>(p => p.PlayerDisconnect)
 
static HookList HookPostBuyItem = AddHook<Action<NPC, Item[], Item>>(p => p.PostBuyItem)
 
static HookList HookPostHurt = AddHook<Action<bool, bool, double, int, bool>>(p => p.PostHurt)
 
static HookList HookPostItemCheck = AddHook<Action>(p => p.PostItemCheck)
 
static HookList HookPostNurseHeal = AddHook<Action<NPC, int, bool, int>>(p => p.PostNurseHeal)
 
static HookList HookPostSavePlayer = AddHook<Action>(p => p.PostSavePlayer)
 
static HookList HookPostSellItem = AddHook<Action<NPC, Item[], Item>>(p => p.PostSellItem)
 
static HookList HookPostUpdate = AddHook<Action>(p => p.PostUpdate)
 
static HookList HookPostUpdateBuffs = AddHook<Action>(p => p.PostUpdateBuffs)
 
static HookList HookPostUpdateEquips = AddHook<Action>(p => p.PostUpdateEquips)
 
static HookList HookPostUpdateMiscEffects = AddHook<Action>(p => p.PostUpdateMiscEffects)
 
static HookList HookPostUpdateRunSpeeds = AddHook<Action>(p => p.PostUpdateRunSpeeds)
 
static HookList HookPreHurt = AddHook<DelegatePreHurt>(p => p.PreHurt)
 
static HookList HookPreItemCheck = AddHook<Func<bool>>(p => p.PreItemCheck)
 
static HookList HookPreKill = AddHook<DelegatePreKill>(p => p.PreKill)
 
static HookList HookPreSavePlayer = AddHook<Action>(p => p.PreSavePlayer)
 
static HookList HookPreUpdate = AddHook<Action>(p => p.PreUpdate)
 
static HookList HookPreUpdateBuffs = AddHook<Action>(p => p.PreUpdateBuffs)
 
static HookList HookPreUpdateMovement = AddHook<Action>(p => p.PreUpdateMovement)
 
static HookList HookProcessTriggers = AddHook<Action<TriggersSet>>(p => p.ProcessTriggers)
 
static HookList HookResetEffects = AddHook<Action>(p => p.ResetEffects)
 
static List< HookListhooks = new List<HookList>()
 
static HookList HookSendClientChanges = AddHook<Action<ModPlayer>>(p => p.SendClientChanges)
 
static HookList HookSendCustomBiomes = AddHook<Action<BinaryWriter>>(p => p.SendCustomBiomes)
 
static HookList HookSetControls = AddHook<Action>(p => p.SetControls)
 
static HookList HookSetupStartInventory = AddHook<Action<List<Item>, bool>>(p => p.SetupStartInventory)
 
static HookList HookSetupStartInventoryOld = AddHook<Action<List<Item>>>(p => p.SetupStartInventory)
 
static HookList HookShiftClickSlot = AddHook<Func<Item[], int, int, bool>>(p => p.ShiftClickSlot)
 
static HookList HookShoot = AddHook<DelegateShoot>(p => p.Shoot)
 
static HookList HookSyncPlayer = AddHook<Action<int, int, bool>>(p => p.SyncPlayer)
 
static HookList HookUpdateAutopause = AddHook<Action>(p => p.UpdateAutopause)
 
static HookList HookUpdateBadLifeRegen = AddHook<Action>(p => p.UpdateBadLifeRegen)
 
static HookList HookUpdateBiomes = AddHook<Action>(p => p.UpdateBiomes)
 
static HookList HookUpdateBiomeVisuals = AddHook<Action>(p => p.UpdateBiomeVisuals)
 
static HookList HookUpdateDead = AddHook<Action>(p => p.UpdateDead)
 
static HookList HookUpdateEquips = AddHook<DelegateUpdateEquips>(p => p.UpdateEquips)
 
static HookList HookUpdateLifeRegen = AddHook<Action>(p => p.UpdateLifeRegen)
 
static HookList HookUpdateVanityAccessories = AddHook<Action>(p => p.UpdateVanityAccessories)
 
static HookList HookUseTimeMultiplier = AddHook<Func<Item, float>>(p => p.UseTimeMultiplier)
 
static readonly IList< ModPlayerplayers = new List<ModPlayer>()
 

Detailed Description

This is where all ModPlayer hooks are gathered and called.

Definition at line 20 of file PlayerHooks.cs.

Member Function Documentation

◆ AddHook< F >()

static HookList Terraria.ModLoader.PlayerHooks.AddHook< F > ( Expression< Func< ModPlayer, F > >  func)
staticprivate

Definition at line 36 of file PlayerHooks.cs.

36 {
37 var hook = new HookList(ModLoader.Method(func));
38 hooks.Add(hook);
39 return hook;
40 }
static List< HookList > hooks
Definition: PlayerHooks.cs:34

References Terraria.ModLoader.PlayerHooks.hooks.

◆ AnglerQuestReward()

static void Terraria.ModLoader.PlayerHooks.AnglerQuestReward ( Player  player,
float  rareMultiplier,
List< Item >  rewardItems 
)
static

Definition at line 936 of file PlayerHooks.cs.

936 {
937 foreach (int index in HookAnglerQuestReward.arr) {
938 player.modPlayers[index].AnglerQuestReward(rareMultiplier, rewardItems);
939 }
940 }
static HookList HookAnglerQuestReward
Definition: PlayerHooks.cs:934

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookAnglerQuestReward.

◆ CanBeHitByNPC()

static bool Terraria.ModLoader.PlayerHooks.CanBeHitByNPC ( Player  player,
NPC  npc,
ref int  cooldownSlot 
)
static

Definition at line 855 of file PlayerHooks.cs.

855 {
856 foreach (int index in HookCanBeHitByNPC.arr) {
857 if (!player.modPlayers[index].CanBeHitByNPC(npc, ref cooldownSlot)) {
858 return false;
859 }
860 }
861 return true;
862 }
static HookList HookCanBeHitByNPC
Definition: PlayerHooks.cs:853

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCanBeHitByNPC.

◆ CanBeHitByProjectile()

static bool Terraria.ModLoader.PlayerHooks.CanBeHitByProjectile ( Player  player,
Projectile  proj 
)
static

Definition at line 883 of file PlayerHooks.cs.

883 {
884 foreach (int index in HookCanBeHitByProjectile.arr) {
885 if (!player.modPlayers[index].CanBeHitByProjectile(proj)) {
886 return false;
887 }
888 }
889 return true;
890 }
static HookList HookCanBeHitByProjectile
Definition: PlayerHooks.cs:881

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCanBeHitByProjectile.

◆ CanBuyItem()

static bool Terraria.ModLoader.PlayerHooks.CanBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1170 of file PlayerHooks.cs.

1170 {
1171 foreach (int index in HookCanBuyItem.arr) {
1172 if (!player.modPlayers[index].CanBuyItem(npc, shopInventory, item))
1173 return false;
1174 }
1175 return true;
1176 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.ModPlayer.CanBuyItem(), and Terraria.ModLoader.PlayerHooks.HookCanBuyItem.

+ Here is the call graph for this function:

◆ CanHitNPC()

static ? bool Terraria.ModLoader.PlayerHooks.CanHitNPC ( Player  player,
Item  item,
NPC  target 
)
static

Definition at line 717 of file PlayerHooks.cs.

717 {
718 bool? flag = null;
719 foreach (int index in HookCanHitNPC.arr) {
720 bool? canHit = player.modPlayers[index].CanHitNPC(item, target);
721 if (canHit.HasValue && !canHit.Value) {
722 return false;
723 }
724 if (canHit.HasValue) {
725 flag = canHit.Value;
726 }
727 }
728 return flag;
729 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCanHitNPC.

◆ CanHitNPCWithProj()

static ? bool Terraria.ModLoader.PlayerHooks.CanHitNPCWithProj ( Projectile  proj,
NPC  target 
)
static

Definition at line 750 of file PlayerHooks.cs.

750 {
751 if (proj.npcProj || proj.trap) {
752 return null;
753 }
754 Player player = Main.player[proj.owner];
755 bool? flag = null;
756 foreach (int index in HookCanHitNPCWithProj.arr) {
757 bool? canHit = player.modPlayers[index].CanHitNPCWithProj(proj, target);
758 if (canHit.HasValue && !canHit.Value) {
759 return false;
760 }
761 if (canHit.HasValue) {
762 flag = canHit.Value;
763 }
764 }
765 return flag;
766 }
static HookList HookCanHitNPCWithProj
Definition: PlayerHooks.cs:748

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCanHitNPCWithProj.

◆ CanHitPvp()

static bool Terraria.ModLoader.PlayerHooks.CanHitPvp ( Player  player,
Item  item,
Player  target 
)
static

Definition at line 795 of file PlayerHooks.cs.

795 {
796 foreach (int index in HookCanHitPvp.arr) {
797 if (!player.modPlayers[index].CanHitPvp(item, target)) {
798 return false;
799 }
800 }
801 return true;
802 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCanHitPvp.

◆ CanHitPvpWithProj()

static bool Terraria.ModLoader.PlayerHooks.CanHitPvpWithProj ( Projectile  proj,
Player  target 
)
static

Definition at line 823 of file PlayerHooks.cs.

823 {
824 Player player = Main.player[proj.owner];
825 foreach (int index in HookCanHitPvpWithProj.arr) {
826 if (!player.modPlayers[index].CanHitPvpWithProj(proj, target)) {
827 return false;
828 }
829 }
830 return true;
831 }
static HookList HookCanHitPvpWithProj
Definition: PlayerHooks.cs:821

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCanHitPvpWithProj.

◆ CanSellItem()

static bool Terraria.ModLoader.PlayerHooks.CanSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1152 of file PlayerHooks.cs.

1152 {
1153 foreach (int index in HookCanSellItem.arr) {
1154 if (!player.modPlayers[index].CanSellItem(npc, shopInventory, item))
1155 return false;
1156 }
1157 return true;
1158 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.ModPlayer.CanSellItem(), and Terraria.ModLoader.PlayerHooks.HookCanSellItem.

+ Here is the call graph for this function:

◆ CatchFish()

static void Terraria.ModLoader.PlayerHooks.CatchFish ( Player  player,
Item  fishingRod,
int  power,
int  liquidType,
int  poolSize,
int  worldLayer,
int  questFish,
ref int  caughtType,
ref bool  junk 
)
static

Definition at line 912 of file PlayerHooks.cs.

912 {
913 int i = 0;
914 while (i < 58) {
915 if (player.inventory[i].stack > 0 && player.inventory[i].bait > 0) {
916 break;
917 }
918 i++;
919 }
920 foreach (int index in HookCatchFish.arr) {
921 player.modPlayers[index].CatchFish(fishingRod, player.inventory[i], power, liquidType, poolSize, worldLayer, questFish, ref caughtType, ref junk);
922 }
923 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCatchFish.

◆ clientClone()

static void Terraria.ModLoader.PlayerHooks.clientClone ( Player  player,
Player  clientClone 
)
static

Definition at line 272 of file PlayerHooks.cs.

272 {
273 foreach (int index in HookClientClone.arr) {
274 player.modPlayers[index].clientClone(clientClone.modPlayers[index]);
275 }
276 }
static HookList HookClientClone
Definition: PlayerHooks.cs:270
static void clientClone(Player player, Player clientClone)
Definition: PlayerHooks.cs:272

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.clientClone(), and Terraria.ModLoader.PlayerHooks.HookClientClone.

Referenced by Terraria.ModLoader.PlayerHooks.clientClone().

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

◆ ConsumeAmmo()

static bool Terraria.ModLoader.PlayerHooks.ConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 671 of file PlayerHooks.cs.

671 {
672 foreach (int index in HookConsumeAmmo.arr) {
673 if (!player.modPlayers[index].ConsumeAmmo(weapon, ammo)) {
674 return false;
675 }
676 }
677 return true;
678 }
static HookList HookConsumeAmmo
Definition: PlayerHooks.cs:669

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookConsumeAmmo.

◆ CopyCustomBiomesTo()

static void Terraria.ModLoader.PlayerHooks.CopyCustomBiomesTo ( Player  player,
Player  other 
)
static

Definition at line 195 of file PlayerHooks.cs.

195 {
196 foreach (int index in HookCopyCustomBiomesTo.arr) {
197 player.modPlayers[index].CopyCustomBiomesTo(other);
198 }
199 }
static HookList HookCopyCustomBiomesTo
Definition: PlayerHooks.cs:193

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCopyCustomBiomesTo.

◆ CustomBiomesMatch()

static bool Terraria.ModLoader.PlayerHooks.CustomBiomesMatch ( Player  player,
Player  other 
)
static

Definition at line 184 of file PlayerHooks.cs.

184 {
185 foreach (int index in HookCustomBiomesMatch.arr) {
186 if (!player.modPlayers[index].CustomBiomesMatch(other)) {
187 return false;
188 }
189 }
190 return true;
191 }
static HookList HookCustomBiomesMatch
Definition: PlayerHooks.cs:182

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookCustomBiomesMatch.

◆ DelegateCanBeHitByNPC()

delegate bool Terraria.ModLoader.PlayerHooks.DelegateCanBeHitByNPC ( NPC  npc,
ref int  cooldownSlot 
)
private

◆ DelegateCatchFish()

delegate void Terraria.ModLoader.PlayerHooks.DelegateCatchFish ( Item  fishingRod,
Item  bait,
int  power,
int  liquidType,
int  poolSize,
int  worldLayer,
int  questFish,
ref int  caughtType,
ref bool  junk 
)
private

◆ DelegateDrawEffects()

delegate void Terraria.ModLoader.PlayerHooks.DelegateDrawEffects ( PlayerDrawInfo  drawInfo,
ref float  r,
ref float  g,
ref float  b,
ref float  a,
ref bool  fullBright 
)
private

◆ DelegateGetFishingLevel()

delegate void Terraria.ModLoader.PlayerHooks.DelegateGetFishingLevel ( Item  fishingRod,
Item  bait,
ref int  fishingLevel 
)
private

◆ DelegateGetHealLife()

delegate void Terraria.ModLoader.PlayerHooks.DelegateGetHealLife ( Item  item,
bool  quickHeal,
ref int  healValue 
)
private

◆ DelegateGetHealMana()

delegate void Terraria.ModLoader.PlayerHooks.DelegateGetHealMana ( Item  item,
bool  quickHeal,
ref int  healValue 
)
private

◆ DelegateGetWeaponCrit()

delegate void Terraria.ModLoader.PlayerHooks.DelegateGetWeaponCrit ( Item  item,
ref int  crit 
)
private

◆ DelegateGetWeaponDamage()

delegate void Terraria.ModLoader.PlayerHooks.DelegateGetWeaponDamage ( Item  item,
ref int  damage 
)
private

◆ DelegateGetWeaponKnockback()

delegate void Terraria.ModLoader.PlayerHooks.DelegateGetWeaponKnockback ( Item  item,
ref float  knockback 
)
private

◆ DelegateModifyDrawInfo()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyDrawInfo ( ref PlayerDrawInfo  drawInfo)
private

◆ DelegateModifyHitByNPC()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitByNPC ( NPC  npc,
ref int  damage,
ref bool  crit 
)
private

◆ DelegateModifyHitByProjectile()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitByProjectile ( Projectile  proj,
ref int  damage,
ref bool  crit 
)
private

◆ DelegateModifyHitNPC()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitNPC ( Item  item,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit 
)
private

◆ DelegateModifyHitNPCWithProj()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitNPCWithProj ( Projectile  proj,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit,
ref int  hitDirection 
)
private

◆ DelegateModifyHitPvp()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitPvp ( Item  item,
Player  target,
ref int  damage,
ref bool  crit 
)
private

◆ DelegateModifyHitPvpWithProj()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitPvpWithProj ( Projectile  proj,
Player  target,
ref int  damage,
ref bool  crit 
)
private

◆ DelegateModifyManaCost()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyManaCost ( Item  item,
ref float  reduce,
ref float  mult 
)
private

◆ DelegateModifyNurseHeal()

delegate bool Terraria.ModLoader.PlayerHooks.DelegateModifyNurseHeal ( NPC  npc,
ref int  health,
ref bool  removeDebuffs,
ref string  chatText 
)
private

◆ DelegateModifyNursePrice()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyNursePrice ( NPC  npc,
int  health,
bool  removeDebuffs,
ref int  price 
)
private

◆ DelegateModifyWeaponDamage()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyWeaponDamage ( Item  item,
ref float  add,
ref float  mult,
ref float  flat 
)
private

◆ DelegateModifyWeaponDamageOld()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyWeaponDamageOld ( Item  item,
ref float  add,
ref float  mult 
)
private

◆ DelegateModifyZoom()

delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyZoom ( ref float  zoom)
private

◆ DelegateNaturalLifeRegen()

delegate void Terraria.ModLoader.PlayerHooks.DelegateNaturalLifeRegen ( ref float  regen)
private

◆ DelegatePreHurt()

delegate bool Terraria.ModLoader.PlayerHooks.DelegatePreHurt ( bool  pvp,
bool  quiet,
ref int  damage,
ref int  hitDirection,
ref bool  crit,
ref bool  customDamage,
ref bool  playSound,
ref bool  genGore,
ref PlayerDeathReason  damageSource 
)
private

◆ DelegatePreKill()

delegate bool Terraria.ModLoader.PlayerHooks.DelegatePreKill ( double  damage,
int  hitDirection,
bool  pvp,
ref bool  playSound,
ref bool  genGore,
ref PlayerDeathReason  damageSource 
)
private

◆ DelegateShoot()

delegate bool Terraria.ModLoader.PlayerHooks.DelegateShoot ( Item  item,
ref Vector2  position,
ref float  speedX,
ref float  speedY,
ref int  type,
ref int  damage,
ref float  knockBack 
)
private

◆ DelegateUpdateEquips()

delegate void Terraria.ModLoader.PlayerHooks.DelegateUpdateEquips ( ref bool  wallSpeedBuff,
ref bool  tileSpeedBuff,
ref bool  tileRangeBuff 
)
private

◆ DrawEffects()

static void Terraria.ModLoader.PlayerHooks.DrawEffects ( PlayerDrawInfo  drawInfo,
ref float  r,
ref float  g,
ref float  b,
ref float  a,
ref bool  fullBright 
)
static

Definition at line 953 of file PlayerHooks.cs.

953 {
954 ModPlayer[] modPlayers = drawInfo.drawPlayer.modPlayers;
955 foreach (int index in HookDrawEffects.arr) {
956 modPlayers[index].DrawEffects(drawInfo, ref r, ref g, ref b, ref a, ref fullBright);
957 }
958 }
static HookList HookDrawEffects
Definition: PlayerHooks.cs:951

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerDrawInfo.drawPlayer, and Terraria.ModLoader.PlayerHooks.HookDrawEffects.

◆ FrameEffects()

static void Terraria.ModLoader.PlayerHooks.FrameEffects ( Player  player)
static

Definition at line 431 of file PlayerHooks.cs.

431 {
432 foreach (int index in HookFrameEffects.arr) {
433 player.modPlayers[index].FrameEffects();
434 }
435 }
static HookList HookFrameEffects
Definition: PlayerHooks.cs:429

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookFrameEffects.

◆ GetDrawHeadLayers()

static List< PlayerHeadLayer > Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers ( Player  drawPlayer)
static

Definition at line 1025 of file PlayerHooks.cs.

1025 {
1026 List<PlayerHeadLayer> layers = new List<PlayerHeadLayer> {
1027 PlayerHeadLayer.Head,
1028 PlayerHeadLayer.Hair,
1029 PlayerHeadLayer.AltHair,
1030 PlayerHeadLayer.Armor,
1031 PlayerHeadLayer.FaceAcc
1032 };
1033 foreach (PlayerHeadLayer layer in layers) {
1034 layer.visible = true;
1035 }
1036 foreach (int index in HookModifyDrawHeadLayers.arr) {
1037 drawPlayer.modPlayers[index].ModifyDrawHeadLayers(layers);
1038 }
1039 return layers;
1040 }
static HookList HookModifyDrawHeadLayers

References Terraria.ModLoader.PlayerHeadLayer.AltHair, Terraria.ModLoader.PlayerHeadLayer.Armor, Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHeadLayer.Hair, Terraria.ModLoader.PlayerHeadLayer.Head, and Terraria.ModLoader.PlayerHooks.HookModifyDrawHeadLayers.

◆ GetDrawLayers()

static List< PlayerLayer > Terraria.ModLoader.PlayerHooks.GetDrawLayers ( Player  drawPlayer)
static

Definition at line 972 of file PlayerHooks.cs.

972 {
973 List<PlayerLayer> layers = new List<PlayerLayer> {
974 PlayerLayer.HairBack,
975 PlayerLayer.MountBack,
976 PlayerLayer.MiscEffectsBack,
977 PlayerLayer.BackAcc,
978 PlayerLayer.Wings,
979 PlayerLayer.BalloonAcc,
980 PlayerLayer.Skin
981 };
982 if (drawPlayer.wearsRobe) {
983 layers.Add(PlayerLayer.ShoeAcc);
984 layers.Add(PlayerLayer.Legs);
985 }
986 else {
987 layers.Add(PlayerLayer.Legs);
988 layers.Add(PlayerLayer.ShoeAcc);
989 }
990 layers.Add(PlayerLayer.Body);
991 layers.Add(PlayerLayer.HandOffAcc);
992 layers.Add(PlayerLayer.WaistAcc);
993 layers.Add(PlayerLayer.NeckAcc);
994 layers.Add(PlayerLayer.Face);
995 layers.Add(PlayerLayer.Hair);
996 layers.Add(PlayerLayer.Head);
997 layers.Add(PlayerLayer.FaceAcc);
998 if (drawPlayer.mount.Cart) {
999 layers.Add(PlayerLayer.ShieldAcc);
1000 layers.Add(PlayerLayer.MountFront);
1001 }
1002 else {
1003 layers.Add(PlayerLayer.MountFront);
1004 layers.Add(PlayerLayer.ShieldAcc);
1005 }
1006 layers.Add(PlayerLayer.SolarShield);
1007 layers.Add(PlayerLayer.HeldProjBack);
1008 layers.Add(PlayerLayer.HeldItem);
1009 layers.Add(PlayerLayer.Arms);
1010 layers.Add(PlayerLayer.HandOnAcc);
1011 layers.Add(PlayerLayer.HeldProjFront);
1012 layers.Add(PlayerLayer.FrontAcc);
1013 layers.Add(PlayerLayer.MiscEffectsFront);
1014 foreach (PlayerLayer layer in layers) {
1015 layer.visible = true;
1016 }
1017 foreach (int index in HookModifyDrawLayers.arr) {
1018 drawPlayer.modPlayers[index].ModifyDrawLayers(layers);
1019 }
1020 return layers;
1021 }
static HookList HookModifyDrawLayers
Definition: PlayerHooks.cs:970

References Terraria.ModLoader.PlayerLayer.Arms, Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerLayer.BackAcc, Terraria.ModLoader.PlayerLayer.BalloonAcc, Terraria.ModLoader.PlayerLayer.Body, Terraria.ModLoader.PlayerLayer.Face, Terraria.ModLoader.PlayerLayer.FaceAcc, Terraria.ModLoader.PlayerLayer.FrontAcc, Terraria.ModLoader.PlayerLayer.Hair, Terraria.ModLoader.PlayerLayer.HairBack, Terraria.ModLoader.PlayerLayer.HandOffAcc, Terraria.ModLoader.PlayerLayer.HandOnAcc, Terraria.ModLoader.PlayerLayer.Head, Terraria.ModLoader.PlayerLayer.HeldItem, Terraria.ModLoader.PlayerLayer.HeldProjBack, Terraria.ModLoader.PlayerLayer.HeldProjFront, Terraria.ModLoader.PlayerHooks.HookModifyDrawLayers, Terraria.ModLoader.PlayerLayer.Legs, Terraria.ModLoader.PlayerLayer.MiscEffectsBack, Terraria.ModLoader.PlayerLayer.MiscEffectsFront, Terraria.ModLoader.PlayerLayer.MountBack, Terraria.ModLoader.PlayerLayer.MountFront, Terraria.ModLoader.PlayerLayer.NeckAcc, Terraria.ModLoader.PlayerLayer.ShieldAcc, Terraria.ModLoader.PlayerLayer.ShoeAcc, Terraria.ModLoader.PlayerLayer.SolarShield, Terraria.ModLoader.PlayerLayer.WaistAcc, and Terraria.ModLoader.PlayerLayer.Wings.

◆ GetDyeTraderReward()

static void Terraria.ModLoader.PlayerHooks.GetDyeTraderReward ( Player  player,
List< int >  rewardPool 
)
static

Definition at line 944 of file PlayerHooks.cs.

944 {
945 foreach (int index in HookGetDyeTraderReward.arr) {
946 player.modPlayers[index].GetDyeTraderReward(rewardPool);
947 }
948 }
static HookList HookGetDyeTraderReward
Definition: PlayerHooks.cs:942

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetDyeTraderReward.

◆ GetFishingLevel()

static void Terraria.ModLoader.PlayerHooks.GetFishingLevel ( Player  player,
Item  fishingRod,
Item  bait,
ref int  fishingLevel 
)
static

Definition at line 928 of file PlayerHooks.cs.

928 {
929 foreach (int index in HookGetFishingLevel.arr) {
930 player.modPlayers[index].GetFishingLevel(fishingRod, bait, ref fishingLevel);
931 }
932 }
static HookList HookGetFishingLevel
Definition: PlayerHooks.cs:926

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetFishingLevel.

◆ GetHealLife()

static void Terraria.ModLoader.PlayerHooks.GetHealLife ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 552 of file PlayerHooks.cs.

552 {
553 if (item.IsAir)
554 return;
555
556 foreach (int index in HookGetHealLife.arr) {
557 player.modPlayers[index].GetHealLife(item, quickHeal, ref healValue);
558 }
559 }
static HookList HookGetHealLife
Definition: PlayerHooks.cs:550

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetHealLife.

◆ GetHealMana()

static void Terraria.ModLoader.PlayerHooks.GetHealMana ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 564 of file PlayerHooks.cs.

564 {
565 if (item.IsAir)
566 return;
567
568 foreach (int index in HookGetHealMana.arr) {
569 player.modPlayers[index].GetHealMana(item, quickHeal, ref healValue);
570 }
571 }
static HookList HookGetHealMana
Definition: PlayerHooks.cs:562

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetHealMana.

◆ GetMapBackgroundImage()

static Texture2D Terraria.ModLoader.PlayerHooks.GetMapBackgroundImage ( Player  player)
static

Definition at line 296 of file PlayerHooks.cs.

296 {
297 Texture2D texture = null;
298 foreach (int index in HookGetMapBackgroundImage.arr) {
299 texture = player.modPlayers[index].GetMapBackgroundImage();
300 if (texture != null) {
301 return texture;
302 }
303 }
304 return texture;
305 }
static HookList HookGetMapBackgroundImage
Definition: PlayerHooks.cs:294

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetMapBackgroundImage.

◆ GetWeaponCrit()

static void Terraria.ModLoader.PlayerHooks.GetWeaponCrit ( Player  player,
Item  item,
ref int  crit 
)
static

Definition at line 662 of file PlayerHooks.cs.

662 {
663 if (item.IsAir) return;
664 foreach (int index in HookGetWeaponCrit.arr) {
665 player.modPlayers[index].GetWeaponCrit(item, ref crit);
666 }
667 }
static HookList HookGetWeaponCrit
Definition: PlayerHooks.cs:660

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetWeaponCrit.

◆ GetWeaponDamage()

static void Terraria.ModLoader.PlayerHooks.GetWeaponDamage ( Player  player,
Item  item,
ref int  damage 
)
static

Definition at line 611 of file PlayerHooks.cs.

611 {
612 if (item.IsAir)
613 return;
614
615 foreach (int index in HookGetWeaponDamage.arr) {
616 player.modPlayers[index].GetWeaponDamage(item, ref damage);
617 }
618 }
static HookList HookGetWeaponDamage
Definition: PlayerHooks.cs:609

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetWeaponDamage.

Referenced by Terraria.ModLoader.CombinedHooks.GetWeaponDamage().

+ Here is the caller graph for this function:

◆ GetWeaponKnockback()

static void Terraria.ModLoader.PlayerHooks.GetWeaponKnockback ( Player  player,
Item  item,
ref float  knockback 
)
static

Definition at line 650 of file PlayerHooks.cs.

650 {
651 if (item.IsAir)
652 return;
653
654 foreach (int index in HookGetWeaponKnockback.arr) {
655 player.modPlayers[index].GetWeaponKnockback(item, ref knockback);
656 }
657 }
static HookList HookGetWeaponKnockback
Definition: PlayerHooks.cs:648

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookGetWeaponKnockback.

◆ HasMethod()

static bool Terraria.ModLoader.PlayerHooks.HasMethod ( Type  t,
string  method,
params Type[]  args 
)
staticprivate

Definition at line 1106 of file PlayerHooks.cs.

1106 {
1107 return t.GetMethod(method, args).DeclaringType != typeof(ModPlayer);
1108 }

◆ Hurt()

static void Terraria.ModLoader.PlayerHooks.Hurt ( Player  player,
bool  pvp,
bool  quiet,
double  damage,
int  hitDirection,
bool  crit 
)
static

Definition at line 455 of file PlayerHooks.cs.

455 {
456 foreach (int index in HookHurt.arr) {
457 player.modPlayers[index].Hurt(pvp, quiet, damage, hitDirection, crit);
458 }
459 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookHurt.

◆ Kill()

static void Terraria.ModLoader.PlayerHooks.Kill ( Player  player,
double  damage,
int  hitDirection,
bool  pvp,
PlayerDeathReason  damageSource 
)
static

Definition at line 486 of file PlayerHooks.cs.

486 {
487 foreach (int index in HookKill.arr) {
488 player.modPlayers[index].Kill(damage, hitDirection, pvp, damageSource);
489 }
490 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookKill.

◆ MeleeEffects()

static void Terraria.ModLoader.PlayerHooks.MeleeEffects ( Player  player,
Item  item,
Rectangle  hitbox 
)
static

Definition at line 701 of file PlayerHooks.cs.

701 {
702 foreach (int index in HookMeleeEffects.arr) {
703 player.modPlayers[index].MeleeEffects(item, hitbox);
704 }
705 }
static HookList HookMeleeEffects
Definition: PlayerHooks.cs:699

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookMeleeEffects.

◆ MeleeSpeedMultiplier()

static float Terraria.ModLoader.PlayerHooks.MeleeSpeedMultiplier ( Player  player,
Item  item 
)
static

Definition at line 531 of file PlayerHooks.cs.

531 {
532 float multiplier = 1f;
533 if (item.IsAir) return multiplier;
534 foreach (int index in HookMeleeSpeedMultiplier.arr) {
535 multiplier *= player.modPlayers[index].MeleeSpeedMultiplier(item);
536 }
537 return multiplier;
538 }
static HookList HookMeleeSpeedMultiplier
Definition: PlayerHooks.cs:529

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookMeleeSpeedMultiplier.

Referenced by Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier().

+ Here is the caller graph for this function:

◆ ModifyDrawInfo()

static void Terraria.ModLoader.PlayerHooks.ModifyDrawInfo ( ref PlayerDrawInfo  drawInfo)
static

Definition at line 963 of file PlayerHooks.cs.

963 {
964 ModPlayer[] modPlayers = drawInfo.drawPlayer.modPlayers;
965 foreach (int index in HookModifyDrawInfo.arr) {
966 modPlayers[index].ModifyDrawInfo(ref drawInfo);
967 }
968 }
static HookList HookModifyDrawInfo
Definition: PlayerHooks.cs:961

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookModifyDrawInfo, and Terraria.ModLoader.ModPlayer.ModifyDrawInfo().

+ Here is the call graph for this function:

◆ ModifyHitByNPC()

static void Terraria.ModLoader.PlayerHooks.ModifyHitByNPC ( Player  player,
NPC  npc,
ref int  damage,
ref bool  crit 
)
static

Definition at line 867 of file PlayerHooks.cs.

867 {
868 foreach (int index in HookModifyHitByNPC.arr) {
869 player.modPlayers[index].ModifyHitByNPC(npc, ref damage, ref crit);
870 }
871 }
static HookList HookModifyHitByNPC
Definition: PlayerHooks.cs:865

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyHitByNPC.

◆ ModifyHitByProjectile()

static void Terraria.ModLoader.PlayerHooks.ModifyHitByProjectile ( Player  player,
Projectile  proj,
ref int  damage,
ref bool  crit 
)
static

Definition at line 895 of file PlayerHooks.cs.

895 {
896 foreach (int index in HookModifyHitByProjectile.arr) {
897 player.modPlayers[index].ModifyHitByProjectile(proj, ref damage, ref crit);
898 }
899 }
static HookList HookModifyHitByProjectile
Definition: PlayerHooks.cs:893

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyHitByProjectile.

◆ ModifyHitNPC()

static void Terraria.ModLoader.PlayerHooks.ModifyHitNPC ( Player  player,
Item  item,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit 
)
static

Definition at line 734 of file PlayerHooks.cs.

734 {
735 foreach (int index in HookModifyHitNPC.arr) {
736 player.modPlayers[index].ModifyHitNPC(item, target, ref damage, ref knockback, ref crit);
737 }
738 }
static HookList HookModifyHitNPC
Definition: PlayerHooks.cs:732

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyHitNPC.

◆ ModifyHitNPCWithProj()

static void Terraria.ModLoader.PlayerHooks.ModifyHitNPCWithProj ( Projectile  proj,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit,
ref int  hitDirection 
)
static

Definition at line 771 of file PlayerHooks.cs.

771 {
772 if (proj.npcProj || proj.trap) {
773 return;
774 }
775 Player player = Main.player[proj.owner];
776 foreach (int index in HookModifyHitNPCWithProj.arr) {
777 player.modPlayers[index].ModifyHitNPCWithProj(proj, target, ref damage, ref knockback, ref crit, ref hitDirection);
778 }
779 }
static HookList HookModifyHitNPCWithProj
Definition: PlayerHooks.cs:769

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyHitNPCWithProj.

◆ ModifyHitPvp()

static void Terraria.ModLoader.PlayerHooks.ModifyHitPvp ( Player  player,
Item  item,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 807 of file PlayerHooks.cs.

807 {
808 foreach (int index in HookModifyHitPvp.arr) {
809 player.modPlayers[index].ModifyHitPvp(item, target, ref damage, ref crit);
810 }
811 }
static HookList HookModifyHitPvp
Definition: PlayerHooks.cs:805

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyHitPvp.

◆ ModifyHitPvpWithProj()

static void Terraria.ModLoader.PlayerHooks.ModifyHitPvpWithProj ( Projectile  proj,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 836 of file PlayerHooks.cs.

836 {
837 Player player = Main.player[proj.owner];
838 foreach (int index in HookModifyHitPvpWithProj.arr) {
839 player.modPlayers[index].ModifyHitPvpWithProj(proj, target, ref damage, ref crit);
840 }
841 }
static HookList HookModifyHitPvpWithProj
Definition: PlayerHooks.cs:834

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyHitPvpWithProj.

◆ ModifyManaCost()

static void Terraria.ModLoader.PlayerHooks.ModifyManaCost ( Player  player,
Item  item,
ref float  reduce,
ref float  mult 
)
static

Definition at line 576 of file PlayerHooks.cs.

576 {
577 if (item.IsAir)
578 return;
579
580 foreach (int index in HookModifyManaCost.arr) {
581 player.modPlayers[index].ModifyManaCost(item, ref reduce, ref mult);
582 }
583 }
static HookList HookModifyManaCost
Definition: PlayerHooks.cs:574

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyManaCost.

Referenced by Terraria.ModLoader.CombinedHooks.ModifyManaCost().

+ Here is the caller graph for this function:

◆ ModifyNurseHeal()

static bool Terraria.ModLoader.PlayerHooks.ModifyNurseHeal ( Player  p,
NPC  npc,
ref int  health,
ref bool  removeDebuffs,
ref string  chat 
)
static

Definition at line 1181 of file PlayerHooks.cs.

1181 {
1182 foreach (int index in HookModifyNurseHeal.arr) {
1183 if (!p.modPlayers[index].ModifyNurseHeal(npc, ref health, ref removeDebuffs, ref chat))
1184 return false;
1185 }
1186 return true;
1187 }
static HookList HookModifyNurseHeal

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyNurseHeal.

◆ ModifyNursePrice()

static void Terraria.ModLoader.PlayerHooks.ModifyNursePrice ( Player  p,
NPC  npc,
int  health,
bool  removeDebuffs,
ref int  price 
)
static

Definition at line 1192 of file PlayerHooks.cs.

1192 {
1193 foreach (int index in HookModifyNursePrice.arr) {
1194 p.modPlayers[index].ModifyNursePrice(npc, health, removeDebuffs, ref price);
1195 }
1196 }
static HookList HookModifyNursePrice

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyNursePrice.

◆ ModifyScreenPosition()

static void Terraria.ModLoader.PlayerHooks.ModifyScreenPosition ( Player  player)
static

Definition at line 1044 of file PlayerHooks.cs.

1044 {
1045 foreach (int index in HookModifyScreenPosition.arr) {
1046 player.modPlayers[index].ModifyScreenPosition();
1047 }
1048 }
static HookList HookModifyScreenPosition

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyScreenPosition.

◆ ModifyWeaponDamage()

static void Terraria.ModLoader.PlayerHooks.ModifyWeaponDamage ( Player  player,
Item  item,
ref float  add,
ref float  mult,
ref float  flat 
)
static

Calls ModItem.HookModifyWeaponDamage, then all GlobalItem.HookModifyWeaponDamage hooks.

Definition at line 627 of file PlayerHooks.cs.

627 {
628 if (item.IsAir)
629 return;
630
631 foreach (int index in HookModifyWeaponDamageOld.arr) {
632 player.modPlayers[index].ModifyWeaponDamage(item, ref add, ref mult);
633 }
634 foreach (int index in HookModifyWeaponDamage.arr) {
635 player.modPlayers[index].ModifyWeaponDamage(item, ref add, ref mult, ref flat);
636 }
637 }
static HookList HookModifyWeaponDamageOld
Definition: PlayerHooks.cs:621
static HookList HookModifyWeaponDamage
Definition: PlayerHooks.cs:623

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookModifyWeaponDamage, and Terraria.ModLoader.PlayerHooks.HookModifyWeaponDamageOld.

Referenced by Terraria.ModLoader.CombinedHooks.ModifyWeaponDamage().

+ Here is the caller graph for this function:

◆ ModifyZoom()

static void Terraria.ModLoader.PlayerHooks.ModifyZoom ( Player  player,
ref float  zoom 
)
static

Definition at line 1053 of file PlayerHooks.cs.

1053 {
1054 foreach (int index in HookModifyZoom.arr) {
1055 player.modPlayers[index].ModifyZoom(ref zoom);
1056 }
1057 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookModifyZoom.

◆ NaturalLifeRegen()

static void Terraria.ModLoader.PlayerHooks.NaturalLifeRegen ( Player  player,
ref float  regen 
)
static

Definition at line 326 of file PlayerHooks.cs.

326 {
327 foreach (int index in HookNaturalLifeRegen.arr) {
328 player.modPlayers[index].NaturalLifeRegen(ref regen);
329 }
330 }
static HookList HookNaturalLifeRegen
Definition: PlayerHooks.cs:324

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookNaturalLifeRegen.

◆ OnConsumeAmmo()

static void Terraria.ModLoader.PlayerHooks.OnConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 682 of file PlayerHooks.cs.

682 {
683 foreach (int index in HookOnConsumeAmmo.arr)
684 player.modPlayers[index].OnConsumeAmmo(weapon, ammo);
685 }
static HookList HookOnConsumeAmmo
Definition: PlayerHooks.cs:680

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnConsumeAmmo.

◆ OnConsumeMana()

static void Terraria.ModLoader.PlayerHooks.OnConsumeMana ( Player  player,
Item  item,
int  manaConsumed 
)
static

Definition at line 598 of file PlayerHooks.cs.

598 {
599 if (item.IsAir)
600 return;
601
602 foreach (int index in HookOnConsumeMana.arr) {
603 player.modPlayers[index].OnConsumeMana(item, manaConsumed);
604 }
605 }
static HookList HookOnConsumeMana
Definition: PlayerHooks.cs:596

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnConsumeMana.

Referenced by Terraria.ModLoader.CombinedHooks.OnConsumeMana().

+ Here is the caller graph for this function:

◆ OnEnterWorld()

static void Terraria.ModLoader.PlayerHooks.OnEnterWorld ( int  playerIndex)
static

Definition at line 1080 of file PlayerHooks.cs.

1080 {
1081 var player = Main.player[playerIndex];
1082 foreach (int index in HookOnEnterWorld.arr) {
1083 player.modPlayers[index].OnEnterWorld(player);
1084 }
1085 }
static HookList HookOnEnterWorld

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnEnterWorld.

◆ OnHitAnything()

static void Terraria.ModLoader.PlayerHooks.OnHitAnything ( Player  player,
float  x,
float  y,
Entity  victim 
)
static

Definition at line 709 of file PlayerHooks.cs.

709 {
710 foreach (int index in HookOnHitAnything.arr) {
711 player.modPlayers[index].OnHitAnything(x, y, victim);
712 }
713 }
static HookList HookOnHitAnything
Definition: PlayerHooks.cs:707

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitAnything.

◆ OnHitByNPC()

static void Terraria.ModLoader.PlayerHooks.OnHitByNPC ( Player  player,
NPC  npc,
int  damage,
bool  crit 
)
static

Definition at line 875 of file PlayerHooks.cs.

875 {
876 foreach (int index in HookOnHitByNPC.arr) {
877 player.modPlayers[index].OnHitByNPC(npc, damage, crit);
878 }
879 }
static HookList HookOnHitByNPC
Definition: PlayerHooks.cs:873

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitByNPC.

◆ OnHitByProjectile()

static void Terraria.ModLoader.PlayerHooks.OnHitByProjectile ( Player  player,
Projectile  proj,
int  damage,
bool  crit 
)
static

Definition at line 903 of file PlayerHooks.cs.

903 {
904 foreach (int index in HookOnHitByProjectile.arr) {
905 player.modPlayers[index].OnHitByProjectile(proj, damage, crit);
906 }
907 }
static HookList HookOnHitByProjectile
Definition: PlayerHooks.cs:901

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitByProjectile.

◆ OnHitNPC()

static void Terraria.ModLoader.PlayerHooks.OnHitNPC ( Player  player,
Item  item,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 742 of file PlayerHooks.cs.

742 {
743 foreach (int index in HookOnHitNPC.arr) {
744 player.modPlayers[index].OnHitNPC(item, target, damage, knockback, crit);
745 }
746 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitNPC.

◆ OnHitNPCWithProj()

static void Terraria.ModLoader.PlayerHooks.OnHitNPCWithProj ( Projectile  proj,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 783 of file PlayerHooks.cs.

783 {
784 if (proj.npcProj || proj.trap) {
785 return;
786 }
787 Player player = Main.player[proj.owner];
788 foreach (int index in HookOnHitNPCWithProj.arr) {
789 player.modPlayers[index].OnHitNPCWithProj(proj, target, damage, knockback, crit);
790 }
791 }
static HookList HookOnHitNPCWithProj
Definition: PlayerHooks.cs:781

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitNPCWithProj.

◆ OnHitPvp()

static void Terraria.ModLoader.PlayerHooks.OnHitPvp ( Player  player,
Item  item,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 815 of file PlayerHooks.cs.

815 {
816 foreach (int index in HookOnHitPvp.arr) {
817 player.modPlayers[index].OnHitPvp(item, target, damage, crit);
818 }
819 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitPvp.

◆ OnHitPvpWithProj()

static void Terraria.ModLoader.PlayerHooks.OnHitPvpWithProj ( Projectile  proj,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 845 of file PlayerHooks.cs.

845 {
846 Player player = Main.player[proj.owner];
847 foreach (int index in HookOnHitPvpWithProj.arr) {
848 player.modPlayers[index].OnHitPvpWithProj(proj, target, damage, crit);
849 }
850 }
static HookList HookOnHitPvpWithProj
Definition: PlayerHooks.cs:843

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnHitPvpWithProj.

◆ OnMissingMana()

static void Terraria.ModLoader.PlayerHooks.OnMissingMana ( Player  player,
Item  item,
int  manaNeeded 
)
static

Definition at line 587 of file PlayerHooks.cs.

587 {
588 if (item.IsAir)
589 return;
590
591 foreach (int index in HookOnMissingMana.arr) {
592 player.modPlayers[index].OnMissingMana(item, manaNeeded);
593 }
594 }
static HookList HookOnMissingMana
Definition: PlayerHooks.cs:585

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnMissingMana.

Referenced by Terraria.ModLoader.CombinedHooks.OnMissingMana().

+ Here is the caller graph for this function:

◆ OnRespawn()

static void Terraria.ModLoader.PlayerHooks.OnRespawn ( Player  player)
static

Definition at line 1089 of file PlayerHooks.cs.

1089 {
1090 foreach (int index in HookOnRespawn.arr) {
1091 player.modPlayers[index].OnRespawn(player);
1092 }
1093 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookOnRespawn.

◆ PlayerConnect()

static void Terraria.ModLoader.PlayerHooks.PlayerConnect ( int  playerIndex)
static

Definition at line 1061 of file PlayerHooks.cs.

1061 {
1062 var player = Main.player[playerIndex];
1063 foreach (int index in HookPlayerConnect.arr) {
1064 player.modPlayers[index].PlayerConnect(player);
1065 }
1066 }
static HookList HookPlayerConnect

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPlayerConnect.

◆ PlayerDisconnect()

static void Terraria.ModLoader.PlayerHooks.PlayerDisconnect ( int  playerIndex)
static

Definition at line 1070 of file PlayerHooks.cs.

1070 {
1071 var player = Main.player[playerIndex];
1072 foreach (int index in HookPlayerDisconnect.arr) {
1073 player.modPlayers[index].PlayerDisconnect(player);
1074 }
1075 }
static HookList HookPlayerDisconnect

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPlayerDisconnect.

◆ PostBuyItem()

static void Terraria.ModLoader.PlayerHooks.PostBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1162 of file PlayerHooks.cs.

1162 {
1163 foreach (int index in HookPostBuyItem.arr) {
1164 player.modPlayers[index].PostBuyItem(npc, shopInventory, item);
1165 }
1166 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookPostBuyItem, and Terraria.ModLoader.ModPlayer.PostBuyItem().

+ Here is the call graph for this function:

◆ PostHurt()

static void Terraria.ModLoader.PlayerHooks.PostHurt ( Player  player,
bool  pvp,
bool  quiet,
double  damage,
int  hitDirection,
bool  crit 
)
static

Definition at line 463 of file PlayerHooks.cs.

463 {
464 foreach (int index in HookPostHurt.arr) {
465 player.modPlayers[index].PostHurt(pvp, quiet, damage, hitDirection, crit);
466 }
467 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostHurt.

◆ PostItemCheck()

static void Terraria.ModLoader.PlayerHooks.PostItemCheck ( Player  player)
static

Definition at line 504 of file PlayerHooks.cs.

504 {
505 foreach (int index in HookPostItemCheck.arr) {
506 player.modPlayers[index].PostItemCheck();
507 }
508 }
static HookList HookPostItemCheck
Definition: PlayerHooks.cs:502

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostItemCheck.

◆ PostNurseHeal()

static void Terraria.ModLoader.PlayerHooks.PostNurseHeal ( Player  player,
NPC  npc,
int  health,
bool  removeDebuffs,
int  price 
)
static

Definition at line 1200 of file PlayerHooks.cs.

1200 {
1201 foreach (int index in HookPostNurseHeal.arr) {
1202 player.modPlayers[index].PostNurseHeal(npc, health, removeDebuffs, price);
1203 }
1204 }
static HookList HookPostNurseHeal

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookPostNurseHeal, and Terraria.ModLoader.ModPlayer.PostNurseHeal().

+ Here is the call graph for this function:

◆ PostSavePlayer()

static void Terraria.ModLoader.PlayerHooks.PostSavePlayer ( Player  player)
static

Definition at line 168 of file PlayerHooks.cs.

168 {
169 foreach (int index in HookPostSavePlayer.arr) {
170 player.modPlayers[index].PostSavePlayer();
171 }
172 }
static HookList HookPostSavePlayer
Definition: PlayerHooks.cs:166

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostSavePlayer.

◆ PostSellItem()

static void Terraria.ModLoader.PlayerHooks.PostSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1143 of file PlayerHooks.cs.

1143 {
1144 foreach (int index in HookPostSellItem.arr) {
1145 player.modPlayers[index].PostSellItem(npc, shopInventory, item);
1146 }
1147 }
static HookList HookPostSellItem

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookPostSellItem, and Terraria.ModLoader.ModPlayer.PostSellItem().

+ Here is the call graph for this function:

◆ PostUpdate()

static void Terraria.ModLoader.PlayerHooks.PostUpdate ( Player  player)
static

Definition at line 423 of file PlayerHooks.cs.

423 {
424 foreach (int index in HookPostUpdate.arr) {
425 player.modPlayers[index].PostUpdate();
426 }
427 }
static HookList HookPostUpdate
Definition: PlayerHooks.cs:421

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostUpdate.

◆ PostUpdateBuffs()

static void Terraria.ModLoader.PlayerHooks.PostUpdateBuffs ( Player  player)
static

Definition at line 366 of file PlayerHooks.cs.

366 {
367 foreach (int index in HookPostUpdateBuffs.arr) {
368 player.modPlayers[index].PostUpdateBuffs();
369 }
370 }
static HookList HookPostUpdateBuffs
Definition: PlayerHooks.cs:364

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostUpdateBuffs.

◆ PostUpdateEquips()

static void Terraria.ModLoader.PlayerHooks.PostUpdateEquips ( Player  player)
static

Definition at line 391 of file PlayerHooks.cs.

391 {
392 foreach (int index in HookPostUpdateEquips.arr) {
393 player.modPlayers[index].PostUpdateEquips();
394 }
395 }
static HookList HookPostUpdateEquips
Definition: PlayerHooks.cs:389

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostUpdateEquips.

◆ PostUpdateMiscEffects()

static void Terraria.ModLoader.PlayerHooks.PostUpdateMiscEffects ( Player  player)
static

Definition at line 399 of file PlayerHooks.cs.

399 {
400 foreach (int index in HookPostUpdateMiscEffects.arr) {
401 player.modPlayers[index].PostUpdateMiscEffects();
402 }
403 }
static HookList HookPostUpdateMiscEffects
Definition: PlayerHooks.cs:397

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostUpdateMiscEffects.

◆ PostUpdateRunSpeeds()

static void Terraria.ModLoader.PlayerHooks.PostUpdateRunSpeeds ( Player  player)
static

Definition at line 407 of file PlayerHooks.cs.

407 {
408 foreach (int index in HookPostUpdateRunSpeeds.arr) {
409 player.modPlayers[index].PostUpdateRunSpeeds();
410 }
411 }
static HookList HookPostUpdateRunSpeeds
Definition: PlayerHooks.cs:405

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPostUpdateRunSpeeds.

◆ PreHurt()

static bool Terraria.ModLoader.PlayerHooks.PreHurt ( Player  player,
bool  pvp,
bool  quiet,
ref int  damage,
ref int  hitDirection,
ref bool  crit,
ref bool  customDamage,
ref bool  playSound,
ref bool  genGore,
ref PlayerDeathReason  damageSource 
)
static

Definition at line 441 of file PlayerHooks.cs.

442 {
443 bool flag = true;
444 foreach (int index in HookPreHurt.arr) {
445 if (!player.modPlayers[index].PreHurt(pvp, quiet, ref damage, ref hitDirection, ref crit, ref customDamage,
446 ref playSound, ref genGore, ref damageSource)) {
447 flag = false;
448 }
449 }
450 return flag;
451 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreHurt.

◆ PreItemCheck()

static bool Terraria.ModLoader.PlayerHooks.PreItemCheck ( Player  player)
static

Definition at line 494 of file PlayerHooks.cs.

494 {
495 bool result = true;
496 foreach (int index in HookPreItemCheck.arr) {
497 result &= player.modPlayers[index].PreItemCheck();
498 }
499 return result;
500 }
static HookList HookPreItemCheck
Definition: PlayerHooks.cs:492

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreItemCheck.

◆ PreKill()

static bool Terraria.ModLoader.PlayerHooks.PreKill ( Player  player,
double  damage,
int  hitDirection,
bool  pvp,
ref bool  playSound,
ref bool  genGore,
ref PlayerDeathReason  damageSource 
)
static

Definition at line 473 of file PlayerHooks.cs.

474 {
475 bool flag = true;
476 foreach (int index in HookPreKill.arr) {
477 if (!player.modPlayers[index].PreKill(damage, hitDirection, pvp, ref playSound, ref genGore, ref damageSource)) {
478 flag = false;
479 }
480 }
481 return flag;
482 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreKill.

◆ PreSavePlayer()

static void Terraria.ModLoader.PlayerHooks.PreSavePlayer ( Player  player)
static

Definition at line 160 of file PlayerHooks.cs.

160 {
161 foreach (int index in HookPreSavePlayer.arr) {
162 player.modPlayers[index].PreSavePlayer();
163 }
164 }
static HookList HookPreSavePlayer
Definition: PlayerHooks.cs:158

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreSavePlayer.

◆ PreUpdate()

static void Terraria.ModLoader.PlayerHooks.PreUpdate ( Player  player)
static

Definition at line 342 of file PlayerHooks.cs.

342 {
343 foreach (int index in HookPreUpdate.arr) {
344 player.modPlayers[index].PreUpdate();
345 }
346 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreUpdate.

◆ PreUpdateBuffs()

static void Terraria.ModLoader.PlayerHooks.PreUpdateBuffs ( Player  player)
static

Definition at line 358 of file PlayerHooks.cs.

358 {
359 foreach (int index in HookPreUpdateBuffs.arr) {
360 player.modPlayers[index].PreUpdateBuffs();
361 }
362 }
static HookList HookPreUpdateBuffs
Definition: PlayerHooks.cs:356

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreUpdateBuffs.

◆ PreUpdateMovement()

static void Terraria.ModLoader.PlayerHooks.PreUpdateMovement ( Player  player)
static

Definition at line 415 of file PlayerHooks.cs.

415 {
416 foreach (int index in HookPreUpdateMovement.arr) {
417 player.modPlayers[index].PreUpdateMovement();
418 }
419 }
static HookList HookPreUpdateMovement
Definition: PlayerHooks.cs:413

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookPreUpdateMovement.

◆ ProcessTriggers()

static void Terraria.ModLoader.PlayerHooks.ProcessTriggers ( Player  player,
TriggersSet  triggersSet 
)
static

Definition at line 641 of file PlayerHooks.cs.

641 {
642 foreach (int index in HookProcessTriggers.arr) {
643 player.modPlayers[index].ProcessTriggers(triggersSet);
644 }
645 }
static HookList HookProcessTriggers
Definition: PlayerHooks.cs:639

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookProcessTriggers.

◆ ReceiveCustomBiomes()

static void Terraria.ModLoader.PlayerHooks.ReceiveCustomBiomes ( Player  player,
BinaryReader  reader 
)
static

Definition at line 240 of file PlayerHooks.cs.

240 {
241 int count = reader.ReadUInt16();
242 for (int k = 0; k < count; k++) {
243 string modName = reader.ReadString();
244 string name = reader.ReadString();
245 byte[] data = reader.ReadBytes(reader.ReadByte());
246 Mod mod = ModLoader.GetMod(modName);
247 ModPlayer modPlayer = mod == null ? null : player.GetModPlayer(mod, name);
248 if (modPlayer != null) {
249 using (MemoryStream stream = new MemoryStream(data)) {
250 using (BinaryReader customReader = new BinaryReader(stream)) {
251 try {
252 modPlayer.ReceiveCustomBiomes(customReader);
253 }
254 catch {
255 }
256 }
257 }
258 }
259 }
260 }

References Terraria.ModLoader.ModLoader.GetMod(), and Terraria.ModLoader.ModPlayer.ReceiveCustomBiomes().

+ Here is the call graph for this function:

◆ ResetEffects()

static void Terraria.ModLoader.PlayerHooks.ResetEffects ( Player  player)
static

Definition at line 63 of file PlayerHooks.cs.

63 {
64 foreach (int index in HookResetEffects.arr) {
65 player.modPlayers[index].ResetEffects();
66 }
67 }
static HookList HookResetEffects
Definition: PlayerHooks.cs:61

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookResetEffects.

◆ SendClientChanges()

static void Terraria.ModLoader.PlayerHooks.SendClientChanges ( Player  player,
Player  clientPlayer 
)
static

Definition at line 288 of file PlayerHooks.cs.

288 {
289 foreach (int index in HookSendClientChanges.arr) {
290 player.modPlayers[index].SendClientChanges(clientPlayer.modPlayers[index]);
291 }
292 }
static HookList HookSendClientChanges
Definition: PlayerHooks.cs:286

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookSendClientChanges.

◆ SendCustomBiomes() [1/2]

static bool Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( ModPlayer  modPlayer,
BinaryWriter  writer 
)
staticprivate

Definition at line 221 of file PlayerHooks.cs.

221 {
222 byte[] data;
223 using (MemoryStream stream = new MemoryStream()) {
224 using (BinaryWriter customWriter = new BinaryWriter(stream)) {
225 modPlayer.SendCustomBiomes(customWriter);
226 customWriter.Flush();
227 data = stream.ToArray();
228 }
229 }
230 if (data.Length > 0) {
231 writer.Write(modPlayer.mod.Name);
232 writer.Write(modPlayer.Name);
233 writer.Write((byte)data.Length);
234 writer.Write(data);
235 return true;
236 }
237 return false;
238 }

References Terraria.ModLoader.ModPlayer.mod, Terraria.ModLoader.Mod.Name, Terraria.ModLoader.ModPlayer.Name, and Terraria.ModLoader.ModPlayer.SendCustomBiomes().

+ Here is the call graph for this function:

◆ SendCustomBiomes() [2/2]

static void Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( Player  player,
BinaryWriter  writer 
)
static

Definition at line 203 of file PlayerHooks.cs.

203 {
204 ushort count = 0;
205 byte[] data;
206 using (MemoryStream stream = new MemoryStream()) {
207 using (BinaryWriter customWriter = new BinaryWriter(stream)) {
208 foreach (int index in HookSendCustomBiomes.arr) {
209 if (SendCustomBiomes(player.modPlayers[index], customWriter)) {
210 count++;
211 }
212 }
213 customWriter.Flush();
214 data = stream.ToArray();
215 }
216 }
217 writer.Write(count);
218 writer.Write(data);
219 }
static HookList HookSendCustomBiomes
Definition: PlayerHooks.cs:201
static void SendCustomBiomes(Player player, BinaryWriter writer)
Definition: PlayerHooks.cs:203

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookSendCustomBiomes, and Terraria.ModLoader.PlayerHooks.SendCustomBiomes().

Referenced by Terraria.ModLoader.PlayerHooks.SendCustomBiomes().

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

◆ SetControls()

static void Terraria.ModLoader.PlayerHooks.SetControls ( Player  player)
static

Definition at line 350 of file PlayerHooks.cs.

350 {
351 foreach (int index in HookSetControls.arr) {
352 player.modPlayers[index].SetControls();
353 }
354 }
static HookList HookSetControls
Definition: PlayerHooks.cs:348

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookSetControls.

◆ SetStartInventory() [1/2]

static void Terraria.ModLoader.PlayerHooks.SetStartInventory ( Player  player)
static

Definition at line 154 of file PlayerHooks.cs.

154 {
155 SetStartInventory(player, SetupStartInventory(player));
156 }
static void SetStartInventory(Player player, IList< Item > items)
Definition: PlayerHooks.cs:136
static IList< Item > SetupStartInventory(Player player, bool mediumcoreDeath=false)
Definition: PlayerHooks.cs:80

References Terraria.ModLoader.PlayerHooks.SetStartInventory(), and Terraria.ModLoader.PlayerHooks.SetupStartInventory().

+ Here is the call graph for this function:

◆ SetStartInventory() [2/2]

static void Terraria.ModLoader.PlayerHooks.SetStartInventory ( Player  player,
IList< Item >  items 
)
static

Definition at line 136 of file PlayerHooks.cs.

136 {
137 if (items.Count <= 50) {
138 for (int k = 0; k < items.Count && k < 49; k++)
139 player.inventory[k] = items[k];
140 }
141 else {
142 for (int k = 0; k < 49; k++) {
143 player.inventory[k] = items[k];
144 }
145 Item bag = new Item();
146 bag.SetDefaults(ModContent.ItemType<StartBag>());
147 for (int k = 49; k < items.Count; k++) {
148 ((StartBag)bag.modItem).AddItem(items[k]);
149 }
150 player.inventory[49] = bag;
151 }
152 }

References Terraria.ModLoader.Item.

Referenced by Terraria.ModLoader.PlayerHooks.SetStartInventory().

+ Here is the caller graph for this function:

◆ SetupStartInventory()

static IList< Item > Terraria.ModLoader.PlayerHooks.SetupStartInventory ( Player  player,
bool  mediumcoreDeath = false 
)
static

Definition at line 80 of file PlayerHooks.cs.

80 {
81 IList<Item> items = new List<Item>();
82 Item item = new Item();
83 item.SetDefaults(3507);
84 item.Prefix(-1);
85 items.Add(item);
86 item = new Item();
87 item.SetDefaults(3509);
88 item.Prefix(-1);
89 items.Add(item);
90 item = new Item();
91 item.SetDefaults(3506);
92 item.Prefix(-1);
93 items.Add(item);
94 if (Main.cEd && !mediumcoreDeath) {
95 item = new Item();
96 item.SetDefaults(603);
97 items.Add(item);
98 }
99 foreach (int index in HookSetupStartInventory.arr) {
100 player.modPlayers[index].SetupStartInventory(items, mediumcoreDeath);
101 }
102 foreach (int index in HookSetupStartInventoryOld.arr) {
103 player.modPlayers[index].SetupStartInventory(items);
104 }
105 IDictionary<int, int> counts = new Dictionary<int, int>();
106 foreach (Item item0 in items) {
107 if (item0.maxStack > 1) {
108 if (!counts.ContainsKey(item0.netID)) {
109 counts[item0.netID] = 0;
110 }
111 counts[item0.netID] += item0.stack;
112 }
113 }
114 int k = 0;
115 while (k < items.Count) {
116 bool flag = true;
117 int id = items[k].netID;
118 if (counts.ContainsKey(id)) {
119 items[k].stack = counts[id];
120 if (items[k].stack > items[k].maxStack) {
121 items[k].stack = items[k].maxStack;
122 }
123 counts[id] -= items[k].stack;
124 if (items[k].stack <= 0) {
125 items.RemoveAt(k);
126 flag = false;
127 }
128 }
129 if (flag) {
130 k++;
131 }
132 }
133 return items;
134 }
static HookList HookSetupStartInventoryOld
Definition: PlayerHooks.cs:78
static HookList HookSetupStartInventory
Definition: PlayerHooks.cs:77

References Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHooks.HookSetupStartInventory, Terraria.ModLoader.PlayerHooks.HookSetupStartInventoryOld, and Terraria.ModLoader.Item.

Referenced by Terraria.ModLoader.PlayerHooks.SetStartInventory().

+ Here is the caller graph for this function:

◆ ShiftClickSlot()

static bool Terraria.ModLoader.PlayerHooks.ShiftClickSlot ( Player  player,
Item[]  inventory,
int  context,
int  slot 
)
static

Definition at line 1097 of file PlayerHooks.cs.

1097 {
1098 foreach (int index in HookShiftClickSlot.arr) {
1099 if (player.modPlayers[index].ShiftClickSlot(inventory, context, slot)) {
1100 return true;
1101 }
1102 }
1103 return false;
1104 }
static HookList HookShiftClickSlot

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookShiftClickSlot.

◆ Shoot()

static bool Terraria.ModLoader.PlayerHooks.Shoot ( Player  player,
Item  item,
ref Vector2  position,
ref float  speedX,
ref float  speedY,
ref int  type,
ref int  damage,
ref float  knockBack 
)
static

Definition at line 690 of file PlayerHooks.cs.

690 {
691 foreach (int index in HookShoot.arr) {
692 if (!player.modPlayers[index].Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack)) {
693 return false;
694 }
695 }
696 return true;
697 }

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookShoot.

◆ SyncPlayer()

static void Terraria.ModLoader.PlayerHooks.SyncPlayer ( Player  player,
int  toWho,
int  fromWho,
bool  newPlayer 
)
static

Definition at line 280 of file PlayerHooks.cs.

280 {
281 foreach (int index in HookSyncPlayer.arr) {
282 player.modPlayers[index].SyncPlayer(toWho, fromWho, newPlayer);
283 }
284 }
static HookList HookSyncPlayer
Definition: PlayerHooks.cs:278

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookSyncPlayer.

◆ TotalMeleeSpeedMultiplier()

static float Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier ( Player  player,
Item  item 
)
static

Definition at line 540 of file PlayerHooks.cs.

540 {
541 return TotalUseTimeMultiplier(player, item) * MeleeSpeedMultiplier(player, item)
542 * ItemLoader.MeleeSpeedMultiplier(item, player);
543 }
static float MeleeSpeedMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:531
static float TotalUseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:521

References Terraria.ModLoader.ItemLoader.MeleeSpeedMultiplier(), Terraria.ModLoader.PlayerHooks.MeleeSpeedMultiplier(), and Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier().

Referenced by Terraria.ModLoader.PlayerHooks.TotalMeleeTime().

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

◆ TotalMeleeTime()

static int Terraria.ModLoader.PlayerHooks.TotalMeleeTime ( float  useAnimation,
Player  player,
Item  item 
)
static

Definition at line 545 of file PlayerHooks.cs.

545 {
546 return Math.Max(2, (int)(useAnimation / TotalMeleeSpeedMultiplier(player, item)));
547 }
static float TotalMeleeSpeedMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:540

References Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier().

+ Here is the call graph for this function:

◆ TotalUseTime()

static int Terraria.ModLoader.PlayerHooks.TotalUseTime ( float  useTime,
Player  player,
Item  item 
)
static

Definition at line 525 of file PlayerHooks.cs.

525 {
526 return Math.Max(2, (int)(useTime / TotalUseTimeMultiplier(player, item)));
527 }

References Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier().

+ Here is the call graph for this function:

◆ TotalUseTimeMultiplier()

static float Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 521 of file PlayerHooks.cs.

521 {
522 return UseTimeMultiplier(player, item) * ItemLoader.UseTimeMultiplier(item, player);
523 }
static float UseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:512

References Terraria.ModLoader.ItemLoader.UseTimeMultiplier(), and Terraria.ModLoader.PlayerHooks.UseTimeMultiplier().

Referenced by Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier(), and Terraria.ModLoader.PlayerHooks.TotalUseTime().

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

◆ UpdateAutopause()

static void Terraria.ModLoader.PlayerHooks.UpdateAutopause ( Player  player)
static

Definition at line 334 of file PlayerHooks.cs.

334 {
335 foreach (int index in HookUpdateAutopause.arr) {
336 player.modPlayers[index].UpdateAutopause();
337 }
338 }
static HookList HookUpdateAutopause
Definition: PlayerHooks.cs:332

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateAutopause.

◆ UpdateBadLifeRegen()

static void Terraria.ModLoader.PlayerHooks.UpdateBadLifeRegen ( Player  player)
static

Definition at line 309 of file PlayerHooks.cs.

309 {
310 foreach (int index in HookUpdateBadLifeRegen.arr) {
311 player.modPlayers[index].UpdateBadLifeRegen();
312 }
313 }
static HookList HookUpdateBadLifeRegen
Definition: PlayerHooks.cs:307

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateBadLifeRegen.

◆ UpdateBiomes()

static void Terraria.ModLoader.PlayerHooks.UpdateBiomes ( Player  player)
static

Definition at line 176 of file PlayerHooks.cs.

176 {
177 foreach (int index in HookUpdateBiomes.arr) {
178 player.modPlayers[index].UpdateBiomes();
179 }
180 }
static HookList HookUpdateBiomes
Definition: PlayerHooks.cs:174

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateBiomes.

◆ UpdateBiomeVisuals()

static void Terraria.ModLoader.PlayerHooks.UpdateBiomeVisuals ( Player  player)
static

Definition at line 264 of file PlayerHooks.cs.

264 {
265 foreach (int index in HookUpdateBiomeVisuals.arr) {
266 player.modPlayers[index].UpdateBiomeVisuals();
267 }
268 }
static HookList HookUpdateBiomeVisuals
Definition: PlayerHooks.cs:262

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateBiomeVisuals.

◆ UpdateDead()

static void Terraria.ModLoader.PlayerHooks.UpdateDead ( Player  player)
static

Definition at line 71 of file PlayerHooks.cs.

71 {
72 foreach (int index in HookUpdateDead.arr) {
73 player.modPlayers[index].UpdateDead();
74 }
75 }
static HookList HookUpdateDead
Definition: PlayerHooks.cs:69

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateDead.

◆ UpdateEquips()

static void Terraria.ModLoader.PlayerHooks.UpdateEquips ( Player  player,
ref bool  wallSpeedBuff,
ref bool  tileSpeedBuff,
ref bool  tileRangeBuff 
)
static

Definition at line 375 of file PlayerHooks.cs.

375 {
376 foreach (int index in HookUpdateEquips.arr) {
377 player.modPlayers[index].UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff);
378 }
379 }
static HookList HookUpdateEquips
Definition: PlayerHooks.cs:373

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateEquips.

◆ UpdateLifeRegen()

static void Terraria.ModLoader.PlayerHooks.UpdateLifeRegen ( Player  player)
static

Definition at line 317 of file PlayerHooks.cs.

317 {
318 foreach (int index in HookUpdateLifeRegen.arr) {
319 player.modPlayers[index].UpdateLifeRegen();
320 }
321 }
static HookList HookUpdateLifeRegen
Definition: PlayerHooks.cs:315

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateLifeRegen.

◆ UpdateVanityAccessories()

static void Terraria.ModLoader.PlayerHooks.UpdateVanityAccessories ( Player  player)
static

Definition at line 383 of file PlayerHooks.cs.

383 {
384 foreach (int index in HookUpdateVanityAccessories.arr) {
385 player.modPlayers[index].UpdateVanityAccessories();
386 }
387 }
static HookList HookUpdateVanityAccessories
Definition: PlayerHooks.cs:381

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUpdateVanityAccessories.

◆ UseTimeMultiplier()

static float Terraria.ModLoader.PlayerHooks.UseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 512 of file PlayerHooks.cs.

512 {
513 float multiplier = 1f;
514 if (item.IsAir) return multiplier;
515 foreach (int index in HookUseTimeMultiplier.arr) {
516 multiplier *= player.modPlayers[index].UseTimeMultiplier(item);
517 }
518 return multiplier;
519 }
static HookList HookUseTimeMultiplier
Definition: PlayerHooks.cs:510

References Terraria.ModLoader.PlayerHooks.HookList.arr, and Terraria.ModLoader.PlayerHooks.HookUseTimeMultiplier.

Referenced by Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier().

+ Here is the caller graph for this function:

Member Data Documentation

◆ HookAnglerQuestReward

HookList Terraria.ModLoader.PlayerHooks.HookAnglerQuestReward = AddHook<Action<float, List<Item>>>(p => p.AnglerQuestReward)
staticprivate

Definition at line 934 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.AnglerQuestReward().

◆ HookCanBeHitByNPC

HookList Terraria.ModLoader.PlayerHooks.HookCanBeHitByNPC = AddHook<DelegateCanBeHitByNPC>(p => p.CanBeHitByNPC)
staticprivate

Definition at line 853 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanBeHitByNPC().

◆ HookCanBeHitByProjectile

HookList Terraria.ModLoader.PlayerHooks.HookCanBeHitByProjectile = AddHook<Func<Projectile, bool>>(p => p.CanBeHitByProjectile)
staticprivate

Definition at line 881 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanBeHitByProjectile().

◆ HookCanBuyItem

HookList Terraria.ModLoader.PlayerHooks.HookCanBuyItem = AddHook<Func<NPC, Item[], Item, bool>>(p => p.CanBuyItem)
staticprivate

Definition at line 1168 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanBuyItem().

◆ HookCanHitNPC

HookList Terraria.ModLoader.PlayerHooks.HookCanHitNPC = AddHook<Func<Item, NPC, bool?>>(p => p.CanHitNPC)
staticprivate

Definition at line 715 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanHitNPC().

◆ HookCanHitNPCWithProj

HookList Terraria.ModLoader.PlayerHooks.HookCanHitNPCWithProj = AddHook<Func<Projectile, NPC, bool?>>(p => p.CanHitNPCWithProj)
staticprivate

Definition at line 748 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanHitNPCWithProj().

◆ HookCanHitPvp

HookList Terraria.ModLoader.PlayerHooks.HookCanHitPvp = AddHook<Func<Item, Player, bool>>(p => p.CanHitPvp)
staticprivate

Definition at line 793 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanHitPvp().

◆ HookCanHitPvpWithProj

HookList Terraria.ModLoader.PlayerHooks.HookCanHitPvpWithProj = AddHook<Func<Projectile, Player, bool>>(p => p.CanHitPvpWithProj)
staticprivate

Definition at line 821 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanHitPvpWithProj().

◆ HookCanSellItem

HookList Terraria.ModLoader.PlayerHooks.HookCanSellItem = AddHook<Func<NPC, Item[], Item, bool>>(p => p.CanSellItem)
staticprivate

Definition at line 1149 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CanSellItem().

◆ HookCatchFish

HookList Terraria.ModLoader.PlayerHooks.HookCatchFish = AddHook<DelegateCatchFish>(p => p.CatchFish)
staticprivate

Definition at line 910 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CatchFish().

◆ HookClientClone

HookList Terraria.ModLoader.PlayerHooks.HookClientClone = AddHook<Action<ModPlayer>>(p => p.clientClone)
staticprivate

Definition at line 270 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.clientClone().

◆ HookConsumeAmmo

HookList Terraria.ModLoader.PlayerHooks.HookConsumeAmmo = AddHook<Func<Item, Item, bool>>(p => p.ConsumeAmmo)
staticprivate

Definition at line 669 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ConsumeAmmo().

◆ HookCopyCustomBiomesTo

HookList Terraria.ModLoader.PlayerHooks.HookCopyCustomBiomesTo = AddHook<Action<Player>>(p => p.CopyCustomBiomesTo)
staticprivate

Definition at line 193 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CopyCustomBiomesTo().

◆ HookCustomBiomesMatch

HookList Terraria.ModLoader.PlayerHooks.HookCustomBiomesMatch = AddHook<Func<Player, bool>>(p => p.CustomBiomesMatch)
staticprivate

Definition at line 182 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.CustomBiomesMatch().

◆ HookDrawEffects

HookList Terraria.ModLoader.PlayerHooks.HookDrawEffects = AddHook<DelegateDrawEffects>(p => p.DrawEffects)
staticprivate

Definition at line 951 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.DrawEffects().

◆ HookFrameEffects

HookList Terraria.ModLoader.PlayerHooks.HookFrameEffects = AddHook<Action>(p => p.FrameEffects)
staticprivate

Definition at line 429 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.FrameEffects().

◆ HookGetDyeTraderReward

HookList Terraria.ModLoader.PlayerHooks.HookGetDyeTraderReward = AddHook<Action<List<int>>>(p => p.GetDyeTraderReward)
staticprivate

Definition at line 942 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDyeTraderReward().

◆ HookGetFishingLevel

HookList Terraria.ModLoader.PlayerHooks.HookGetFishingLevel = AddHook<DelegateGetFishingLevel>(p => p.GetFishingLevel)
staticprivate

Definition at line 926 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetFishingLevel().

◆ HookGetHealLife

HookList Terraria.ModLoader.PlayerHooks.HookGetHealLife = AddHook<DelegateGetHealLife>(p => p.GetHealLife)
staticprivate

Definition at line 550 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetHealLife().

◆ HookGetHealMana

HookList Terraria.ModLoader.PlayerHooks.HookGetHealMana = AddHook<DelegateGetHealMana>(p => p.GetHealMana)
staticprivate

Definition at line 562 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetHealMana().

◆ HookGetMapBackgroundImage

HookList Terraria.ModLoader.PlayerHooks.HookGetMapBackgroundImage = AddHook<Func<Texture2D>>(p => p.GetMapBackgroundImage)
staticprivate

◆ HookGetWeaponCrit

HookList Terraria.ModLoader.PlayerHooks.HookGetWeaponCrit = AddHook<DelegateGetWeaponCrit>(p => p.GetWeaponCrit)
staticprivate

Definition at line 660 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetWeaponCrit().

◆ HookGetWeaponDamage

HookList Terraria.ModLoader.PlayerHooks.HookGetWeaponDamage = AddHook<DelegateGetWeaponDamage>(p => p.GetWeaponDamage)
staticprivate

Definition at line 609 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetWeaponDamage().

◆ HookGetWeaponKnockback

HookList Terraria.ModLoader.PlayerHooks.HookGetWeaponKnockback = AddHook<DelegateGetWeaponKnockback>(p => p.GetWeaponKnockback)
staticprivate

Definition at line 648 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetWeaponKnockback().

◆ HookHurt

HookList Terraria.ModLoader.PlayerHooks.HookHurt = AddHook<Action<bool, bool, double, int, bool>>(p => p.Hurt)
staticprivate

Definition at line 453 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.Hurt().

◆ HookKill

HookList Terraria.ModLoader.PlayerHooks.HookKill = AddHook<Action<double, int, bool, PlayerDeathReason>>(p => p.Kill)
staticprivate

Definition at line 484 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.Kill().

◆ HookMeleeEffects

HookList Terraria.ModLoader.PlayerHooks.HookMeleeEffects = AddHook<Action<Item, Rectangle>>(p => p.MeleeEffects)
staticprivate

Definition at line 699 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.MeleeEffects().

◆ HookMeleeSpeedMultiplier

HookList Terraria.ModLoader.PlayerHooks.HookMeleeSpeedMultiplier = AddHook<Func<Item, float>>(p => p.MeleeSpeedMultiplier)
staticprivate

Definition at line 529 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.MeleeSpeedMultiplier().

◆ HookModifyDrawHeadLayers

HookList Terraria.ModLoader.PlayerHooks.HookModifyDrawHeadLayers = AddHook<Action<List<PlayerHeadLayer>>>(p => p.ModifyDrawHeadLayers)
staticprivate

Definition at line 1023 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers().

◆ HookModifyDrawInfo

HookList Terraria.ModLoader.PlayerHooks.HookModifyDrawInfo = AddHook<DelegateModifyDrawInfo>(p => p.ModifyDrawInfo)
staticprivate

Definition at line 961 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyDrawInfo().

◆ HookModifyDrawLayers

HookList Terraria.ModLoader.PlayerHooks.HookModifyDrawLayers = AddHook<Action<List<PlayerLayer>>>(p => p.ModifyDrawLayers)
staticprivate

Definition at line 970 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawLayers().

◆ HookModifyHitByNPC

HookList Terraria.ModLoader.PlayerHooks.HookModifyHitByNPC = AddHook<DelegateModifyHitByNPC>(p => p.ModifyHitByNPC)
staticprivate

Definition at line 865 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyHitByNPC().

◆ HookModifyHitByProjectile

HookList Terraria.ModLoader.PlayerHooks.HookModifyHitByProjectile = AddHook<DelegateModifyHitByProjectile>(p => p.ModifyHitByProjectile)
staticprivate

◆ HookModifyHitNPC

HookList Terraria.ModLoader.PlayerHooks.HookModifyHitNPC = AddHook<DelegateModifyHitNPC>(p => p.ModifyHitNPC)
staticprivate

Definition at line 732 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyHitNPC().

◆ HookModifyHitNPCWithProj

HookList Terraria.ModLoader.PlayerHooks.HookModifyHitNPCWithProj = AddHook<DelegateModifyHitNPCWithProj>(p => p.ModifyHitNPCWithProj)
staticprivate

Definition at line 769 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyHitNPCWithProj().

◆ HookModifyHitPvp

HookList Terraria.ModLoader.PlayerHooks.HookModifyHitPvp = AddHook<DelegateModifyHitPvp>(p => p.ModifyHitPvp)
staticprivate

Definition at line 805 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyHitPvp().

◆ HookModifyHitPvpWithProj

HookList Terraria.ModLoader.PlayerHooks.HookModifyHitPvpWithProj = AddHook<DelegateModifyHitPvpWithProj>(p => p.ModifyHitPvpWithProj)
staticprivate

Definition at line 834 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyHitPvpWithProj().

◆ HookModifyManaCost

HookList Terraria.ModLoader.PlayerHooks.HookModifyManaCost = AddHook<DelegateModifyManaCost>(p => p.ModifyManaCost)
staticprivate

Definition at line 574 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyManaCost().

◆ HookModifyNurseHeal

HookList Terraria.ModLoader.PlayerHooks.HookModifyNurseHeal = AddHook<DelegateModifyNurseHeal>(p => p.ModifyNurseHeal)
staticprivate

Definition at line 1179 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyNurseHeal().

◆ HookModifyNursePrice

HookList Terraria.ModLoader.PlayerHooks.HookModifyNursePrice = AddHook<DelegateModifyNursePrice>(p => p.ModifyNursePrice)
staticprivate

Definition at line 1190 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyNursePrice().

◆ HookModifyScreenPosition

HookList Terraria.ModLoader.PlayerHooks.HookModifyScreenPosition = AddHook<Action>(p => p.ModifyScreenPosition)
staticprivate

◆ HookModifyWeaponDamage

HookList Terraria.ModLoader.PlayerHooks.HookModifyWeaponDamage = AddHook<DelegateModifyWeaponDamage>(p => p.ModifyWeaponDamage)
staticprivate

Definition at line 623 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyWeaponDamage().

◆ HookModifyWeaponDamageOld

HookList Terraria.ModLoader.PlayerHooks.HookModifyWeaponDamageOld = AddHook<DelegateModifyWeaponDamage>(p => p.ModifyWeaponDamage)
staticprivate

Definition at line 621 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyWeaponDamage().

◆ HookModifyZoom

HookList Terraria.ModLoader.PlayerHooks.HookModifyZoom = AddHook<DelegateModifyZoom>(p => p.ModifyZoom)
staticprivate

Definition at line 1051 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ModifyZoom().

◆ HookNaturalLifeRegen

HookList Terraria.ModLoader.PlayerHooks.HookNaturalLifeRegen = AddHook<DelegateNaturalLifeRegen>(p => p.NaturalLifeRegen)
staticprivate

Definition at line 324 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.NaturalLifeRegen().

◆ HookOnConsumeAmmo

HookList Terraria.ModLoader.PlayerHooks.HookOnConsumeAmmo = AddHook<Action<Item, Item>>(p => p.OnConsumeAmmo)
staticprivate

Definition at line 680 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnConsumeAmmo().

◆ HookOnConsumeMana

HookList Terraria.ModLoader.PlayerHooks.HookOnConsumeMana = AddHook<Action<Item, int>>(p => p.OnConsumeMana)
staticprivate

Definition at line 596 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnConsumeMana().

◆ HookOnEnterWorld

HookList Terraria.ModLoader.PlayerHooks.HookOnEnterWorld = AddHook<Action<Player>>(p => p.OnEnterWorld)
staticprivate

Definition at line 1077 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnEnterWorld().

◆ HookOnHitAnything

HookList Terraria.ModLoader.PlayerHooks.HookOnHitAnything = AddHook<Action<float, float, Entity>>(p => p.OnHitAnything)
staticprivate

Definition at line 707 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitAnything().

◆ HookOnHitByNPC

HookList Terraria.ModLoader.PlayerHooks.HookOnHitByNPC = AddHook<Action<NPC, int, bool>>(p => p.OnHitByNPC)
staticprivate

Definition at line 873 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitByNPC().

◆ HookOnHitByProjectile

HookList Terraria.ModLoader.PlayerHooks.HookOnHitByProjectile = AddHook<Action<Projectile, int, bool>>(p => p.OnHitByProjectile)
staticprivate

Definition at line 901 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitByProjectile().

◆ HookOnHitNPC

HookList Terraria.ModLoader.PlayerHooks.HookOnHitNPC = AddHook<Action<Item, NPC, int, float, bool>>(p => p.OnHitNPC)
staticprivate

Definition at line 740 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitNPC().

◆ HookOnHitNPCWithProj

HookList Terraria.ModLoader.PlayerHooks.HookOnHitNPCWithProj = AddHook<Action<Projectile, NPC, int, float, bool>>(p => p.OnHitNPCWithProj)
staticprivate

Definition at line 781 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitNPCWithProj().

◆ HookOnHitPvp

HookList Terraria.ModLoader.PlayerHooks.HookOnHitPvp = AddHook<Action<Item, Player, int, bool>>(p => p.OnHitPvp)
staticprivate

Definition at line 813 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitPvp().

◆ HookOnHitPvpWithProj

HookList Terraria.ModLoader.PlayerHooks.HookOnHitPvpWithProj = AddHook<Action<Projectile, Player, int, bool>>(p => p.OnHitPvpWithProj)
staticprivate

Definition at line 843 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnHitPvpWithProj().

◆ HookOnMissingMana

HookList Terraria.ModLoader.PlayerHooks.HookOnMissingMana = AddHook<Action<Item, int>>(p => p.OnMissingMana)
staticprivate

Definition at line 585 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnMissingMana().

◆ HookOnRespawn

HookList Terraria.ModLoader.PlayerHooks.HookOnRespawn = AddHook<Action<Player>>(p => p.OnRespawn)
staticprivate

Definition at line 1087 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.OnRespawn().

◆ HookPlayerConnect

HookList Terraria.ModLoader.PlayerHooks.HookPlayerConnect = AddHook<Action<Player>>(p => p.PlayerConnect)
staticprivate

Definition at line 1059 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PlayerConnect().

◆ HookPlayerDisconnect

HookList Terraria.ModLoader.PlayerHooks.HookPlayerDisconnect = AddHook<Action<Player>>(p => p.PlayerDisconnect)
staticprivate

Definition at line 1068 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PlayerDisconnect().

◆ HookPostBuyItem

HookList Terraria.ModLoader.PlayerHooks.HookPostBuyItem = AddHook<Action<NPC, Item[], Item>>(p => p.PostBuyItem)
staticprivate

Definition at line 1160 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostBuyItem().

◆ HookPostHurt

HookList Terraria.ModLoader.PlayerHooks.HookPostHurt = AddHook<Action<bool, bool, double, int, bool>>(p => p.PostHurt)
staticprivate

Definition at line 461 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostHurt().

◆ HookPostItemCheck

HookList Terraria.ModLoader.PlayerHooks.HookPostItemCheck = AddHook<Action>(p => p.PostItemCheck)
staticprivate

Definition at line 502 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostItemCheck().

◆ HookPostNurseHeal

HookList Terraria.ModLoader.PlayerHooks.HookPostNurseHeal = AddHook<Action<NPC, int, bool, int>>(p => p.PostNurseHeal)
staticprivate

Definition at line 1198 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostNurseHeal().

◆ HookPostSavePlayer

HookList Terraria.ModLoader.PlayerHooks.HookPostSavePlayer = AddHook<Action>(p => p.PostSavePlayer)
staticprivate

Definition at line 166 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostSavePlayer().

◆ HookPostSellItem

HookList Terraria.ModLoader.PlayerHooks.HookPostSellItem = AddHook<Action<NPC, Item[], Item>>(p => p.PostSellItem)
staticprivate

Definition at line 1141 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostSellItem().

◆ HookPostUpdate

HookList Terraria.ModLoader.PlayerHooks.HookPostUpdate = AddHook<Action>(p => p.PostUpdate)
staticprivate

Definition at line 421 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostUpdate().

◆ HookPostUpdateBuffs

HookList Terraria.ModLoader.PlayerHooks.HookPostUpdateBuffs = AddHook<Action>(p => p.PostUpdateBuffs)
staticprivate

Definition at line 364 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostUpdateBuffs().

◆ HookPostUpdateEquips

HookList Terraria.ModLoader.PlayerHooks.HookPostUpdateEquips = AddHook<Action>(p => p.PostUpdateEquips)
staticprivate

Definition at line 389 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostUpdateEquips().

◆ HookPostUpdateMiscEffects

HookList Terraria.ModLoader.PlayerHooks.HookPostUpdateMiscEffects = AddHook<Action>(p => p.PostUpdateMiscEffects)
staticprivate

◆ HookPostUpdateRunSpeeds

HookList Terraria.ModLoader.PlayerHooks.HookPostUpdateRunSpeeds = AddHook<Action>(p => p.PostUpdateRunSpeeds)
staticprivate

Definition at line 405 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PostUpdateRunSpeeds().

◆ HookPreHurt

HookList Terraria.ModLoader.PlayerHooks.HookPreHurt = AddHook<DelegatePreHurt>(p => p.PreHurt)
staticprivate

Definition at line 439 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreHurt().

◆ HookPreItemCheck

HookList Terraria.ModLoader.PlayerHooks.HookPreItemCheck = AddHook<Func<bool>>(p => p.PreItemCheck)
staticprivate

Definition at line 492 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreItemCheck().

◆ HookPreKill

HookList Terraria.ModLoader.PlayerHooks.HookPreKill = AddHook<DelegatePreKill>(p => p.PreKill)
staticprivate

Definition at line 471 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreKill().

◆ HookPreSavePlayer

HookList Terraria.ModLoader.PlayerHooks.HookPreSavePlayer = AddHook<Action>(p => p.PreSavePlayer)
staticprivate

Definition at line 158 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreSavePlayer().

◆ HookPreUpdate

HookList Terraria.ModLoader.PlayerHooks.HookPreUpdate = AddHook<Action>(p => p.PreUpdate)
staticprivate

Definition at line 340 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreUpdate().

◆ HookPreUpdateBuffs

HookList Terraria.ModLoader.PlayerHooks.HookPreUpdateBuffs = AddHook<Action>(p => p.PreUpdateBuffs)
staticprivate

Definition at line 356 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreUpdateBuffs().

◆ HookPreUpdateMovement

HookList Terraria.ModLoader.PlayerHooks.HookPreUpdateMovement = AddHook<Action>(p => p.PreUpdateMovement)
staticprivate

Definition at line 413 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.PreUpdateMovement().

◆ HookProcessTriggers

HookList Terraria.ModLoader.PlayerHooks.HookProcessTriggers = AddHook<Action<TriggersSet>>(p => p.ProcessTriggers)
staticprivate

Definition at line 639 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ProcessTriggers().

◆ HookResetEffects

HookList Terraria.ModLoader.PlayerHooks.HookResetEffects = AddHook<Action>(p => p.ResetEffects)
staticprivate

Definition at line 61 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ResetEffects().

◆ hooks

List<HookList> Terraria.ModLoader.PlayerHooks.hooks = new List<HookList>()
staticprivate

Definition at line 34 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.AddHook< F >().

◆ HookSendClientChanges

HookList Terraria.ModLoader.PlayerHooks.HookSendClientChanges = AddHook<Action<ModPlayer>>(p => p.SendClientChanges)
staticprivate

Definition at line 286 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.SendClientChanges().

◆ HookSendCustomBiomes

HookList Terraria.ModLoader.PlayerHooks.HookSendCustomBiomes = AddHook<Action<BinaryWriter>>(p => p.SendCustomBiomes)
staticprivate

Definition at line 201 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.SendCustomBiomes().

◆ HookSetControls

HookList Terraria.ModLoader.PlayerHooks.HookSetControls = AddHook<Action>(p => p.SetControls)
staticprivate

Definition at line 348 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.SetControls().

◆ HookSetupStartInventory

HookList Terraria.ModLoader.PlayerHooks.HookSetupStartInventory = AddHook<Action<List<Item>, bool>>(p => p.SetupStartInventory)
staticprivate

Definition at line 77 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.SetupStartInventory().

◆ HookSetupStartInventoryOld

HookList Terraria.ModLoader.PlayerHooks.HookSetupStartInventoryOld = AddHook<Action<List<Item>>>(p => p.SetupStartInventory)
staticprivate

Definition at line 78 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.SetupStartInventory().

◆ HookShiftClickSlot

HookList Terraria.ModLoader.PlayerHooks.HookShiftClickSlot = AddHook<Func<Item[], int, int, bool>>(p => p.ShiftClickSlot)
staticprivate

Definition at line 1095 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.ShiftClickSlot().

◆ HookShoot

HookList Terraria.ModLoader.PlayerHooks.HookShoot = AddHook<DelegateShoot>(p => p.Shoot)
staticprivate

Definition at line 688 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.Shoot().

◆ HookSyncPlayer

HookList Terraria.ModLoader.PlayerHooks.HookSyncPlayer = AddHook<Action<int, int, bool>>(p => p.SyncPlayer)
staticprivate

Definition at line 278 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.SyncPlayer().

◆ HookUpdateAutopause

HookList Terraria.ModLoader.PlayerHooks.HookUpdateAutopause = AddHook<Action>(p => p.UpdateAutopause)
staticprivate

Definition at line 332 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateAutopause().

◆ HookUpdateBadLifeRegen

HookList Terraria.ModLoader.PlayerHooks.HookUpdateBadLifeRegen = AddHook<Action>(p => p.UpdateBadLifeRegen)
staticprivate

Definition at line 307 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateBadLifeRegen().

◆ HookUpdateBiomes

HookList Terraria.ModLoader.PlayerHooks.HookUpdateBiomes = AddHook<Action>(p => p.UpdateBiomes)
staticprivate

Definition at line 174 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateBiomes().

◆ HookUpdateBiomeVisuals

HookList Terraria.ModLoader.PlayerHooks.HookUpdateBiomeVisuals = AddHook<Action>(p => p.UpdateBiomeVisuals)
staticprivate

Definition at line 262 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateBiomeVisuals().

◆ HookUpdateDead

HookList Terraria.ModLoader.PlayerHooks.HookUpdateDead = AddHook<Action>(p => p.UpdateDead)
staticprivate

Definition at line 69 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateDead().

◆ HookUpdateEquips

HookList Terraria.ModLoader.PlayerHooks.HookUpdateEquips = AddHook<DelegateUpdateEquips>(p => p.UpdateEquips)
staticprivate

Definition at line 373 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateEquips().

◆ HookUpdateLifeRegen

HookList Terraria.ModLoader.PlayerHooks.HookUpdateLifeRegen = AddHook<Action>(p => p.UpdateLifeRegen)
staticprivate

Definition at line 315 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UpdateLifeRegen().

◆ HookUpdateVanityAccessories

HookList Terraria.ModLoader.PlayerHooks.HookUpdateVanityAccessories = AddHook<Action>(p => p.UpdateVanityAccessories)
staticprivate

◆ HookUseTimeMultiplier

HookList Terraria.ModLoader.PlayerHooks.HookUseTimeMultiplier = AddHook<Func<Item, float>>(p => p.UseTimeMultiplier)
staticprivate

Definition at line 510 of file PlayerHooks.cs.

Referenced by Terraria.ModLoader.PlayerHooks.UseTimeMultiplier().

◆ players

readonly IList<ModPlayer> Terraria.ModLoader.PlayerHooks.players = new List<ModPlayer>()
staticprivate

Definition at line 22 of file PlayerHooks.cs.