Terraria ModLoader  0.11.5
A framework for 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, IList< Item > items)
 
static void SetStartInventory (Player player)
 
static IList< ItemSetupStartInventory (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

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
static void Terraria.ModLoader.PlayerHooks.AnglerQuestReward ( Player  player,
float  rareMultiplier,
List< Item rewardItems 
)
static

Definition at line 936 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

936  {
937  foreach (int index in HookAnglerQuestReward.arr) {
938  player.modPlayers[index].AnglerQuestReward(rareMultiplier, rewardItems);
939  }
940  }
static HookList HookAnglerQuestReward
Definition: PlayerHooks.cs:934
static bool Terraria.ModLoader.PlayerHooks.CanBeHitByNPC ( Player  player,
NPC  npc,
ref int  cooldownSlot 
)
static

Definition at line 855 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static bool Terraria.ModLoader.PlayerHooks.CanBeHitByProjectile ( Player  player,
Projectile  proj 
)
static

Definition at line 883 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static bool Terraria.ModLoader.PlayerHooks.CanBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1170 of file PlayerHooks.cs.

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

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  }

+ Here is the call graph for this function:

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

Definition at line 717 of file PlayerHooks.cs.

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

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  }
static bool Terraria.ModLoader.PlayerHooks.CanHitNPCWithProj ( Projectile  proj,
NPC  target 
)
static

Definition at line 750 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static bool Terraria.ModLoader.PlayerHooks.CanHitPvp ( Player  player,
Item  item,
Player  target 
)
static

Definition at line 795 of file PlayerHooks.cs.

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

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  }
static bool Terraria.ModLoader.PlayerHooks.CanHitPvpWithProj ( Projectile  proj,
Player  target 
)
static

Definition at line 823 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static bool Terraria.ModLoader.PlayerHooks.CanSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1152 of file PlayerHooks.cs.

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

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  }

+ Here is the call graph for this function:

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.

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

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  }
static void Terraria.ModLoader.PlayerHooks.clientClone ( Player  player,
Player  clientClone 
)
static

Definition at line 272 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static bool Terraria.ModLoader.PlayerHooks.ConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 671 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.CopyCustomBiomesTo ( Player  player,
Player  other 
)
static

Definition at line 195 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 184 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
delegate bool Terraria.ModLoader.PlayerHooks.DelegateCanBeHitByNPC ( NPC  npc,
ref int  cooldownSlot 
)
private
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
delegate void Terraria.ModLoader.PlayerHooks.DelegateDrawEffects ( PlayerDrawInfo  drawInfo,
ref float  r,
ref float  g,
ref float  b,
ref float  a,
ref bool  fullBright 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateGetFishingLevel ( Item  fishingRod,
Item  bait,
ref int  fishingLevel 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateGetHealLife ( Item  item,
bool  quickHeal,
ref int  healValue 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateGetHealMana ( Item  item,
bool  quickHeal,
ref int  healValue 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateGetWeaponCrit ( Item  item,
ref int  crit 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateGetWeaponDamage ( Item  item,
ref int  damage 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateGetWeaponKnockback ( Item  item,
ref float  knockback 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyDrawInfo ( ref PlayerDrawInfo  drawInfo)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitByNPC ( NPC  npc,
ref int  damage,
ref bool  crit 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitByProjectile ( Projectile  proj,
ref int  damage,
ref bool  crit 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitNPC ( Item  item,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitNPCWithProj ( Projectile  proj,
NPC  target,
ref int  damage,
ref float  knockback,
ref bool  crit,
ref int  hitDirection 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitPvp ( Item  item,
Player  target,
ref int  damage,
ref bool  crit 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyHitPvpWithProj ( Projectile  proj,
Player  target,
ref int  damage,
ref bool  crit 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyManaCost ( Item  item,
ref float  reduce,
ref float  mult 
)
private
delegate bool Terraria.ModLoader.PlayerHooks.DelegateModifyNurseHeal ( NPC  npc,
ref int  health,
ref bool  removeDebuffs,
ref string  chatText 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyNursePrice ( NPC  npc,
int  health,
bool  removeDebuffs,
ref int  price 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyWeaponDamage ( Item  item,
ref float  add,
ref float  mult,
ref float  flat 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyWeaponDamageOld ( Item  item,
ref float  add,
ref float  mult 
)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateModifyZoom ( ref float  zoom)
private
delegate void Terraria.ModLoader.PlayerHooks.DelegateNaturalLifeRegen ( ref float  regen)
private
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
delegate bool Terraria.ModLoader.PlayerHooks.DelegatePreKill ( double  damage,
int  hitDirection,
bool  pvp,
ref bool  playSound,
ref bool  genGore,
ref PlayerDeathReason  damageSource 
)
private
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
delegate void Terraria.ModLoader.PlayerHooks.DelegateUpdateEquips ( ref bool  wallSpeedBuff,
ref bool  tileSpeedBuff,
ref bool  tileRangeBuff 
)
private
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.

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

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
static void Terraria.ModLoader.PlayerHooks.FrameEffects ( Player  player)
static

Definition at line 431 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

431  {
432  foreach (int index in HookFrameEffects.arr) {
433  player.modPlayers[index].FrameEffects();
434  }
435  }
static HookList HookFrameEffects
Definition: PlayerHooks.cs:429
static List<PlayerHeadLayer> Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers ( Player  drawPlayer)
static

Definition at line 1025 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHeadLayer.AltHair, Terraria.ModLoader.PlayerHeadLayer.Armor, Terraria.ModLoader.PlayerHooks.HookList.arr, Terraria.ModLoader.PlayerHeadLayer.FaceAcc, Terraria.ModLoader.PlayerHeadLayer.Hair, Terraria.ModLoader.PlayerHeadLayer.Head, and Terraria.ModLoader.DrawLayer< InfoType >.visible.

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
static List<PlayerLayer> Terraria.ModLoader.PlayerHooks.GetDrawLayers ( Player  drawPlayer)
static

Definition at line 972 of file PlayerHooks.cs.

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.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.Skin, Terraria.ModLoader.PlayerLayer.SolarShield, Terraria.ModLoader.DrawLayer< InfoType >.visible, Terraria.ModLoader.PlayerLayer.WaistAcc, and Terraria.ModLoader.PlayerLayer.Wings.

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
static void Terraria.ModLoader.PlayerHooks.GetDyeTraderReward ( Player  player,
List< int >  rewardPool 
)
static

Definition at line 944 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

944  {
945  foreach (int index in HookGetDyeTraderReward.arr) {
946  player.modPlayers[index].GetDyeTraderReward(rewardPool);
947  }
948  }
static HookList HookGetDyeTraderReward
Definition: PlayerHooks.cs:942
static void Terraria.ModLoader.PlayerHooks.GetFishingLevel ( Player  player,
Item  fishingRod,
Item  bait,
ref int  fishingLevel 
)
static

Definition at line 928 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.GetHealLife ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 552 of file PlayerHooks.cs.

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

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
static void Terraria.ModLoader.PlayerHooks.GetHealMana ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 564 of file PlayerHooks.cs.

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

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
static Texture2D Terraria.ModLoader.PlayerHooks.GetMapBackgroundImage ( Player  player)
static

Definition at line 296 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.GetWeaponCrit ( Player  player,
Item  item,
ref int  crit 
)
static

Definition at line 662 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.GetWeaponDamage ( Player  player,
Item  item,
ref int  damage 
)
static

Definition at line 611 of file PlayerHooks.cs.

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

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

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

+ Here is the caller graph for this function:

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

Definition at line 650 of file PlayerHooks.cs.

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

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
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  }
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

455  {
456  foreach (int index in HookHurt.arr) {
457  player.modPlayers[index].Hurt(pvp, quiet, damage, hitDirection, crit);
458  }
459  }
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

486  {
487  foreach (int index in HookKill.arr) {
488  player.modPlayers[index].Kill(damage, hitDirection, pvp, damageSource);
489  }
490  }
static void Terraria.ModLoader.PlayerHooks.MeleeEffects ( Player  player,
Item  item,
Rectangle  hitbox 
)
static

Definition at line 701 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 531 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.ModifyDrawInfo ( ref PlayerDrawInfo  drawInfo)
static

Definition at line 963 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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

+ Here is the caller graph for this function:

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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 1044 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1044  {
1045  foreach (int index in HookModifyScreenPosition.arr) {
1046  player.modPlayers[index].ModifyScreenPosition();
1047  }
1048  }
static HookList HookModifyScreenPosition
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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 HookModifyWeaponDamage
Definition: PlayerHooks.cs:623
static HookList HookModifyWeaponDamageOld
Definition: PlayerHooks.cs:621

+ Here is the caller graph for this function:

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

Definition at line 1053 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1053  {
1054  foreach (int index in HookModifyZoom.arr) {
1055  player.modPlayers[index].ModifyZoom(ref zoom);
1056  }
1057  }
static void Terraria.ModLoader.PlayerHooks.NaturalLifeRegen ( Player  player,
ref float  regen 
)
static

Definition at line 326 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

326  {
327  foreach (int index in HookNaturalLifeRegen.arr) {
328  player.modPlayers[index].NaturalLifeRegen(ref regen);
329  }
330  }
static HookList HookNaturalLifeRegen
Definition: PlayerHooks.cs:324
static void Terraria.ModLoader.PlayerHooks.OnConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 682 of file PlayerHooks.cs.

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

682  {
683  foreach (int index in HookOnConsumeAmmo.arr)
684  player.modPlayers[index].OnConsumeAmmo(weapon, ammo);
685  }
static HookList HookOnConsumeAmmo
Definition: PlayerHooks.cs:680
static void Terraria.ModLoader.PlayerHooks.OnConsumeMana ( Player  player,
Item  item,
int  manaConsumed 
)
static

Definition at line 598 of file PlayerHooks.cs.

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

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

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

+ Here is the caller graph for this function:

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

Definition at line 1080 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.OnHitAnything ( Player  player,
float  x,
float  y,
Entity  victim 
)
static

Definition at line 709 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.OnHitByNPC ( Player  player,
NPC  npc,
int  damage,
bool  crit 
)
static

Definition at line 875 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.OnHitByProjectile ( Player  player,
Projectile  proj,
int  damage,
bool  crit 
)
static

Definition at line 903 of file PlayerHooks.cs.

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

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

742  {
743  foreach (int index in HookOnHitNPC.arr) {
744  player.modPlayers[index].OnHitNPC(item, target, damage, knockback, crit);
745  }
746  }
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

815  {
816  foreach (int index in HookOnHitPvp.arr) {
817  player.modPlayers[index].OnHitPvp(item, target, damage, crit);
818  }
819  }
static void Terraria.ModLoader.PlayerHooks.OnHitPvpWithProj ( Projectile  proj,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 845 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.OnMissingMana ( Player  player,
Item  item,
int  manaNeeded 
)
static

Definition at line 587 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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

+ Here is the caller graph for this function:

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

Definition at line 1089 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1089  {
1090  foreach (int index in HookOnRespawn.arr) {
1091  player.modPlayers[index].OnRespawn(player);
1092  }
1093  }
static void Terraria.ModLoader.PlayerHooks.PlayerConnect ( int  playerIndex)
static

Definition at line 1061 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.PlayerDisconnect ( int  playerIndex)
static

Definition at line 1070 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.PostBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1162 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 504 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

504  {
505  foreach (int index in HookPostItemCheck.arr) {
506  player.modPlayers[index].PostItemCheck();
507  }
508  }
static HookList HookPostItemCheck
Definition: PlayerHooks.cs:502
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.

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

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

+ Here is the call graph for this function:

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

Definition at line 168 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

168  {
169  foreach (int index in HookPostSavePlayer.arr) {
170  player.modPlayers[index].PostSavePlayer();
171  }
172  }
static HookList HookPostSavePlayer
Definition: PlayerHooks.cs:166
static void Terraria.ModLoader.PlayerHooks.PostSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1143 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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

Definition at line 423 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 366 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 391 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 399 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 407 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

407  {
408  foreach (int index in HookPostUpdateRunSpeeds.arr) {
409  player.modPlayers[index].PostUpdateRunSpeeds();
410  }
411  }
static HookList HookPostUpdateRunSpeeds
Definition: PlayerHooks.cs:405
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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  }
static bool Terraria.ModLoader.PlayerHooks.PreItemCheck ( Player  player)
static

Definition at line 494 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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  }
static void Terraria.ModLoader.PlayerHooks.PreSavePlayer ( Player  player)
static

Definition at line 160 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 342 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

342  {
343  foreach (int index in HookPreUpdate.arr) {
344  player.modPlayers[index].PreUpdate();
345  }
346  }
static void Terraria.ModLoader.PlayerHooks.PreUpdateBuffs ( Player  player)
static

Definition at line 358 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 415 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

415  {
416  foreach (int index in HookPreUpdateMovement.arr) {
417  player.modPlayers[index].PreUpdateMovement();
418  }
419  }
static HookList HookPreUpdateMovement
Definition: PlayerHooks.cs:413
static void Terraria.ModLoader.PlayerHooks.ProcessTriggers ( Player  player,
TriggersSet  triggersSet 
)
static

Definition at line 641 of file PlayerHooks.cs.

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

641  {
642  foreach (int index in HookProcessTriggers.arr) {
643  player.modPlayers[index].ProcessTriggers(triggersSet);
644  }
645  }
static HookList HookProcessTriggers
Definition: PlayerHooks.cs:639
static void Terraria.ModLoader.PlayerHooks.ReceiveCustomBiomes ( Player  player,
BinaryReader  reader 
)
static

Definition at line 240 of file PlayerHooks.cs.

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

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  }

+ Here is the call graph for this function:

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

Definition at line 63 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 288 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( Player  player,
BinaryWriter  writer 
)
static

Definition at line 203 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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 void SendCustomBiomes(Player player, BinaryWriter writer)
Definition: PlayerHooks.cs:203
static HookList HookSendCustomBiomes
Definition: PlayerHooks.cs:201
static bool Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( ModPlayer  modPlayer,
BinaryWriter  writer 
)
staticprivate

Definition at line 221 of file PlayerHooks.cs.

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

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  }

+ Here is the call graph for this function:

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

Definition at line 350 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

350  {
351  foreach (int index in HookSetControls.arr) {
352  player.modPlayers[index].SetControls();
353  }
354  }
static HookList HookSetControls
Definition: PlayerHooks.cs:348
static void Terraria.ModLoader.PlayerHooks.SetStartInventory ( Player  player,
IList< Item items 
)
static

Definition at line 136 of file PlayerHooks.cs.

References Terraria.ModLoader.Item.

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  }
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
static IList<Item> Terraria.ModLoader.PlayerHooks.SetupStartInventory ( Player  player,
bool  mediumcoreDeath = false 
)
static

Definition at line 80 of file PlayerHooks.cs.

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

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 HookSetupStartInventory
Definition: PlayerHooks.cs:77
static HookList HookSetupStartInventoryOld
Definition: PlayerHooks.cs:78
static bool Terraria.ModLoader.PlayerHooks.ShiftClickSlot ( Player  player,
Item[]  inventory,
int  context,
int  slot 
)
static

Definition at line 1097 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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  }
static void Terraria.ModLoader.PlayerHooks.SyncPlayer ( Player  player,
int  toWho,
int  fromWho,
bool  newPlayer 
)
static

Definition at line 280 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static float Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier ( Player  player,
Item  item 
)
static

Definition at line 540 of file PlayerHooks.cs.

References Terraria.ModLoader.ItemLoader.MeleeSpeedMultiplier().

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

+ Here is the call graph for this function:

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

Definition at line 545 of file PlayerHooks.cs.

References Terraria.ModLoader.Item.

545  {
546  return Math.Max(2, (int)(useAnimation / TotalMeleeSpeedMultiplier(player, item)));
547  }
static float TotalMeleeSpeedMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:540
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  }
static float TotalUseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:521
static float Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 521 of file PlayerHooks.cs.

References Terraria.ModLoader.ItemLoader.UseTimeMultiplier().

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

+ Here is the call graph for this function:

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

Definition at line 334 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 309 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 176 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 264 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 71 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

71  {
72  foreach (int index in HookUpdateDead.arr) {
73  player.modPlayers[index].UpdateDead();
74  }
75  }
static HookList HookUpdateDead
Definition: PlayerHooks.cs:69
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.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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
static void Terraria.ModLoader.PlayerHooks.UpdateLifeRegen ( Player  player)
static

Definition at line 317 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 383 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

383  {
384  foreach (int index in HookUpdateVanityAccessories.arr) {
385  player.modPlayers[index].UpdateVanityAccessories();
386  }
387  }
static HookList HookUpdateVanityAccessories
Definition: PlayerHooks.cs:381
static float Terraria.ModLoader.PlayerHooks.UseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 512 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Member Data Documentation

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

Definition at line 934 of file PlayerHooks.cs.

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

Definition at line 853 of file PlayerHooks.cs.

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

Definition at line 881 of file PlayerHooks.cs.

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

Definition at line 1168 of file PlayerHooks.cs.

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

Definition at line 715 of file PlayerHooks.cs.

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

Definition at line 748 of file PlayerHooks.cs.

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

Definition at line 793 of file PlayerHooks.cs.

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

Definition at line 821 of file PlayerHooks.cs.

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

Definition at line 1149 of file PlayerHooks.cs.

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

Definition at line 910 of file PlayerHooks.cs.

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

Definition at line 270 of file PlayerHooks.cs.

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

Definition at line 669 of file PlayerHooks.cs.

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

Definition at line 193 of file PlayerHooks.cs.

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

Definition at line 182 of file PlayerHooks.cs.

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

Definition at line 951 of file PlayerHooks.cs.

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

Definition at line 429 of file PlayerHooks.cs.

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

Definition at line 942 of file PlayerHooks.cs.

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

Definition at line 926 of file PlayerHooks.cs.

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

Definition at line 550 of file PlayerHooks.cs.

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

Definition at line 562 of file PlayerHooks.cs.

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

Definition at line 294 of file PlayerHooks.cs.

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

Definition at line 660 of file PlayerHooks.cs.

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

Definition at line 609 of file PlayerHooks.cs.

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

Definition at line 648 of file PlayerHooks.cs.

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

Definition at line 453 of file PlayerHooks.cs.

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

Definition at line 484 of file PlayerHooks.cs.

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

Definition at line 699 of file PlayerHooks.cs.

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

Definition at line 529 of file PlayerHooks.cs.

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

Definition at line 1023 of file PlayerHooks.cs.

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

Definition at line 961 of file PlayerHooks.cs.

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

Definition at line 970 of file PlayerHooks.cs.

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

Definition at line 865 of file PlayerHooks.cs.

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

Definition at line 893 of file PlayerHooks.cs.

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

Definition at line 732 of file PlayerHooks.cs.

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

Definition at line 769 of file PlayerHooks.cs.

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

Definition at line 805 of file PlayerHooks.cs.

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

Definition at line 834 of file PlayerHooks.cs.

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

Definition at line 574 of file PlayerHooks.cs.

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

Definition at line 1179 of file PlayerHooks.cs.

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

Definition at line 1190 of file PlayerHooks.cs.

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

Definition at line 1042 of file PlayerHooks.cs.

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

Definition at line 623 of file PlayerHooks.cs.

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

Definition at line 621 of file PlayerHooks.cs.

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

Definition at line 1051 of file PlayerHooks.cs.

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

Definition at line 324 of file PlayerHooks.cs.

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

Definition at line 680 of file PlayerHooks.cs.

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

Definition at line 596 of file PlayerHooks.cs.

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

Definition at line 1077 of file PlayerHooks.cs.

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

Definition at line 707 of file PlayerHooks.cs.

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

Definition at line 873 of file PlayerHooks.cs.

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

Definition at line 901 of file PlayerHooks.cs.

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

Definition at line 740 of file PlayerHooks.cs.

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

Definition at line 781 of file PlayerHooks.cs.

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

Definition at line 813 of file PlayerHooks.cs.

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

Definition at line 843 of file PlayerHooks.cs.

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

Definition at line 585 of file PlayerHooks.cs.

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

Definition at line 1087 of file PlayerHooks.cs.

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

Definition at line 1059 of file PlayerHooks.cs.

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

Definition at line 1068 of file PlayerHooks.cs.

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

Definition at line 1160 of file PlayerHooks.cs.

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

Definition at line 461 of file PlayerHooks.cs.

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

Definition at line 502 of file PlayerHooks.cs.

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

Definition at line 1198 of file PlayerHooks.cs.

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

Definition at line 166 of file PlayerHooks.cs.

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

Definition at line 1141 of file PlayerHooks.cs.

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

Definition at line 421 of file PlayerHooks.cs.

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

Definition at line 364 of file PlayerHooks.cs.

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

Definition at line 389 of file PlayerHooks.cs.

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

Definition at line 397 of file PlayerHooks.cs.

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

Definition at line 405 of file PlayerHooks.cs.

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

Definition at line 439 of file PlayerHooks.cs.

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

Definition at line 492 of file PlayerHooks.cs.

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

Definition at line 471 of file PlayerHooks.cs.

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

Definition at line 158 of file PlayerHooks.cs.

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

Definition at line 340 of file PlayerHooks.cs.

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

Definition at line 356 of file PlayerHooks.cs.

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

Definition at line 413 of file PlayerHooks.cs.

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

Definition at line 639 of file PlayerHooks.cs.

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

Definition at line 61 of file PlayerHooks.cs.

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

Definition at line 34 of file PlayerHooks.cs.

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

Definition at line 286 of file PlayerHooks.cs.

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

Definition at line 201 of file PlayerHooks.cs.

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

Definition at line 348 of file PlayerHooks.cs.

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

Definition at line 77 of file PlayerHooks.cs.

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

Definition at line 78 of file PlayerHooks.cs.

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

Definition at line 1095 of file PlayerHooks.cs.

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

Definition at line 688 of file PlayerHooks.cs.

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

Definition at line 278 of file PlayerHooks.cs.

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

Definition at line 332 of file PlayerHooks.cs.

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

Definition at line 307 of file PlayerHooks.cs.

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

Definition at line 174 of file PlayerHooks.cs.

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

Definition at line 262 of file PlayerHooks.cs.

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

Definition at line 69 of file PlayerHooks.cs.

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

Definition at line 373 of file PlayerHooks.cs.

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

Definition at line 315 of file PlayerHooks.cs.

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

Definition at line 381 of file PlayerHooks.cs.

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

Definition at line 510 of file PlayerHooks.cs.

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

Definition at line 22 of file PlayerHooks.cs.