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 937 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 856 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

856  {
857  foreach (int index in HookCanBeHitByNPC.arr) {
858  if (!player.modPlayers[index].CanBeHitByNPC(npc, ref cooldownSlot)) {
859  return false;
860  }
861  }
862  return true;
863  }
static HookList HookCanBeHitByNPC
Definition: PlayerHooks.cs:854
static bool Terraria.ModLoader.PlayerHooks.CanBeHitByProjectile ( Player  player,
Projectile  proj 
)
static

Definition at line 884 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

884  {
885  foreach (int index in HookCanBeHitByProjectile.arr) {
886  if (!player.modPlayers[index].CanBeHitByProjectile(proj)) {
887  return false;
888  }
889  }
890  return true;
891  }
static HookList HookCanBeHitByProjectile
Definition: PlayerHooks.cs:882
static bool Terraria.ModLoader.PlayerHooks.CanBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1171 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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

Definition at line 718 of file PlayerHooks.cs.

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

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

Definition at line 751 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 796 of file PlayerHooks.cs.

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

796  {
797  foreach (int index in HookCanHitPvp.arr) {
798  if (!player.modPlayers[index].CanHitPvp(item, target)) {
799  return false;
800  }
801  }
802  return true;
803  }
static bool Terraria.ModLoader.PlayerHooks.CanHitPvpWithProj ( Projectile  proj,
Player  target 
)
static

Definition at line 824 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

824  {
825  Player player = Main.player[proj.owner];
826  foreach (int index in HookCanHitPvpWithProj.arr) {
827  if (!player.modPlayers[index].CanHitPvpWithProj(proj, target)) {
828  return false;
829  }
830  }
831  return true;
832  }
static HookList HookCanHitPvpWithProj
Definition: PlayerHooks.cs:822
static bool Terraria.ModLoader.PlayerHooks.CanSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1153 of file PlayerHooks.cs.

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

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

+ 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 913 of file PlayerHooks.cs.

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

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

Definition at line 273 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

273  {
274  foreach (int index in HookClientClone.arr) {
275  player.modPlayers[index].clientClone(clientClone.modPlayers[index]);
276  }
277  }
static HookList HookClientClone
Definition: PlayerHooks.cs:271
static void clientClone(Player player, Player clientClone)
Definition: PlayerHooks.cs:273
static bool Terraria.ModLoader.PlayerHooks.ConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 672 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

672  {
673  foreach (int index in HookConsumeAmmo.arr) {
674  if (!player.modPlayers[index].ConsumeAmmo(weapon, ammo)) {
675  return false;
676  }
677  }
678  return true;
679  }
static HookList HookConsumeAmmo
Definition: PlayerHooks.cs:670
static void Terraria.ModLoader.PlayerHooks.CopyCustomBiomesTo ( Player  player,
Player  other 
)
static

Definition at line 196 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 185 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

185  {
186  foreach (int index in HookCustomBiomesMatch.arr) {
187  if (!player.modPlayers[index].CustomBiomesMatch(other)) {
188  return false;
189  }
190  }
191  return true;
192  }
static HookList HookCustomBiomesMatch
Definition: PlayerHooks.cs:183
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 954 of file PlayerHooks.cs.

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

954  {
955  ModPlayer[] modPlayers = drawInfo.drawPlayer.modPlayers;
956  foreach (int index in HookDrawEffects.arr) {
957  modPlayers[index].DrawEffects(drawInfo, ref r, ref g, ref b, ref a, ref fullBright);
958  }
959  }
static HookList HookDrawEffects
Definition: PlayerHooks.cs:952
static void Terraria.ModLoader.PlayerHooks.FrameEffects ( Player  player)
static

Definition at line 432 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 1026 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.

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

Definition at line 973 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.

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

Definition at line 945 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 929 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

929  {
930  foreach (int index in HookGetFishingLevel.arr) {
931  player.modPlayers[index].GetFishingLevel(fishingRod, bait, ref fishingLevel);
932  }
933  }
static HookList HookGetFishingLevel
Definition: PlayerHooks.cs:927
static void Terraria.ModLoader.PlayerHooks.GetHealLife ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 553 of file PlayerHooks.cs.

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

553  {
554  if (item.IsAir)
555  return;
556 
557  foreach (int index in HookGetHealLife.arr) {
558  player.modPlayers[index].GetHealLife(item, quickHeal, ref healValue);
559  }
560  }
static HookList HookGetHealLife
Definition: PlayerHooks.cs:551
static void Terraria.ModLoader.PlayerHooks.GetHealMana ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 565 of file PlayerHooks.cs.

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

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

Definition at line 297 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

297  {
298  Texture2D texture = null;
299  foreach (int index in HookGetMapBackgroundImage.arr) {
300  texture = player.modPlayers[index].GetMapBackgroundImage();
301  if (texture != null) {
302  return texture;
303  }
304  }
305  return texture;
306  }
static HookList HookGetMapBackgroundImage
Definition: PlayerHooks.cs:295
static void Terraria.ModLoader.PlayerHooks.GetWeaponCrit ( Player  player,
Item  item,
ref int  crit 
)
static

Definition at line 663 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

663  {
664  if (item.IsAir) return;
665  foreach (int index in HookGetWeaponCrit.arr) {
666  player.modPlayers[index].GetWeaponCrit(item, ref crit);
667  }
668  }
static HookList HookGetWeaponCrit
Definition: PlayerHooks.cs:661
static void Terraria.ModLoader.PlayerHooks.GetWeaponDamage ( Player  player,
Item  item,
ref int  damage 
)
static

Definition at line 612 of file PlayerHooks.cs.

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

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

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

+ 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 651 of file PlayerHooks.cs.

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

651  {
652  if (item.IsAir)
653  return;
654 
655  foreach (int index in HookGetWeaponKnockback.arr) {
656  player.modPlayers[index].GetWeaponKnockback(item, ref knockback);
657  }
658  }
static HookList HookGetWeaponKnockback
Definition: PlayerHooks.cs:649
static bool Terraria.ModLoader.PlayerHooks.HasMethod ( Type  t,
string  method,
params Type[]  args 
)
staticprivate

Definition at line 1107 of file PlayerHooks.cs.

1107  {
1108  return t.GetMethod(method, args).DeclaringType != typeof(ModPlayer);
1109  }
static void Terraria.ModLoader.PlayerHooks.Hurt ( Player  player,
bool  pvp,
bool  quiet,
double  damage,
int  hitDirection,
bool  crit 
)
static

Definition at line 456 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

456  {
457  foreach (int index in HookHurt.arr) {
458  player.modPlayers[index].Hurt(pvp, quiet, damage, hitDirection, crit);
459  }
460  }
static void Terraria.ModLoader.PlayerHooks.Kill ( Player  player,
double  damage,
int  hitDirection,
bool  pvp,
PlayerDeathReason  damageSource 
)
static

Definition at line 487 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 702 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 532 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

532  {
533  float multiplier = 1f;
534  if (item.IsAir) return multiplier;
535  foreach (int index in HookMeleeSpeedMultiplier.arr) {
536  multiplier *= player.modPlayers[index].MeleeSpeedMultiplier(item);
537  }
538  return multiplier;
539  }
static HookList HookMeleeSpeedMultiplier
Definition: PlayerHooks.cs:530
static void Terraria.ModLoader.PlayerHooks.ModifyDrawInfo ( ref PlayerDrawInfo  drawInfo)
static

Definition at line 964 of file PlayerHooks.cs.

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

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

+ 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 868 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

868  {
869  foreach (int index in HookModifyHitByNPC.arr) {
870  player.modPlayers[index].ModifyHitByNPC(npc, ref damage, ref crit);
871  }
872  }
static HookList HookModifyHitByNPC
Definition: PlayerHooks.cs:866
static void Terraria.ModLoader.PlayerHooks.ModifyHitByProjectile ( Player  player,
Projectile  proj,
ref int  damage,
ref bool  crit 
)
static

Definition at line 896 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

896  {
897  foreach (int index in HookModifyHitByProjectile.arr) {
898  player.modPlayers[index].ModifyHitByProjectile(proj, ref damage, ref crit);
899  }
900  }
static HookList HookModifyHitByProjectile
Definition: PlayerHooks.cs:894
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 735 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

735  {
736  foreach (int index in HookModifyHitNPC.arr) {
737  player.modPlayers[index].ModifyHitNPC(item, target, ref damage, ref knockback, ref crit);
738  }
739  }
static HookList HookModifyHitNPC
Definition: PlayerHooks.cs:733
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 772 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 808 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

808  {
809  foreach (int index in HookModifyHitPvp.arr) {
810  player.modPlayers[index].ModifyHitPvp(item, target, ref damage, ref crit);
811  }
812  }
static HookList HookModifyHitPvp
Definition: PlayerHooks.cs:806
static void Terraria.ModLoader.PlayerHooks.ModifyHitPvpWithProj ( Projectile  proj,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 837 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

837  {
838  Player player = Main.player[proj.owner];
839  foreach (int index in HookModifyHitPvpWithProj.arr) {
840  player.modPlayers[index].ModifyHitPvpWithProj(proj, target, ref damage, ref crit);
841  }
842  }
static HookList HookModifyHitPvpWithProj
Definition: PlayerHooks.cs:835
static void Terraria.ModLoader.PlayerHooks.ModifyManaCost ( Player  player,
Item  item,
ref float  reduce,
ref float  mult 
)
static

Definition at line 577 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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

+ 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 1182 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1182  {
1183  foreach (int index in HookModifyNurseHeal.arr) {
1184  if (!p.modPlayers[index].ModifyNurseHeal(npc, ref health, ref removeDebuffs, ref chat))
1185  return false;
1186  }
1187  return true;
1188  }
static HookList HookModifyNurseHeal
static void Terraria.ModLoader.PlayerHooks.ModifyNursePrice ( Player  p,
NPC  npc,
int  health,
bool  removeDebuffs,
ref int  price 
)
static

Definition at line 1193 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 1045 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1045  {
1046  foreach (int index in HookModifyScreenPosition.arr) {
1047  player.modPlayers[index].ModifyScreenPosition();
1048  }
1049  }
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 628 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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

+ Here is the caller graph for this function:

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

Definition at line 1054 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 327 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 683 of file PlayerHooks.cs.

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

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

Definition at line 599 of file PlayerHooks.cs.

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

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

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

+ Here is the caller graph for this function:

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

Definition at line 1081 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1081  {
1082  var player = Main.player[playerIndex];
1083  foreach (int index in HookOnEnterWorld.arr) {
1084  player.modPlayers[index].OnEnterWorld(player);
1085  }
1086  }
static HookList HookOnEnterWorld
static void Terraria.ModLoader.PlayerHooks.OnHitAnything ( Player  player,
float  x,
float  y,
Entity  victim 
)
static

Definition at line 710 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

710  {
711  foreach (int index in HookOnHitAnything.arr) {
712  player.modPlayers[index].OnHitAnything(x, y, victim);
713  }
714  }
static HookList HookOnHitAnything
Definition: PlayerHooks.cs:708
static void Terraria.ModLoader.PlayerHooks.OnHitByNPC ( Player  player,
NPC  npc,
int  damage,
bool  crit 
)
static

Definition at line 876 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

876  {
877  foreach (int index in HookOnHitByNPC.arr) {
878  player.modPlayers[index].OnHitByNPC(npc, damage, crit);
879  }
880  }
static HookList HookOnHitByNPC
Definition: PlayerHooks.cs:874
static void Terraria.ModLoader.PlayerHooks.OnHitByProjectile ( Player  player,
Projectile  proj,
int  damage,
bool  crit 
)
static

Definition at line 904 of file PlayerHooks.cs.

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

904  {
905  foreach (int index in HookOnHitByProjectile.arr) {
906  player.modPlayers[index].OnHitByProjectile(proj, damage, crit);
907  }
908  }
static HookList HookOnHitByProjectile
Definition: PlayerHooks.cs:902
static void Terraria.ModLoader.PlayerHooks.OnHitNPC ( Player  player,
Item  item,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 743 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

743  {
744  foreach (int index in HookOnHitNPC.arr) {
745  player.modPlayers[index].OnHitNPC(item, target, damage, knockback, crit);
746  }
747  }
static void Terraria.ModLoader.PlayerHooks.OnHitNPCWithProj ( Projectile  proj,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 784 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 816 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 846 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

846  {
847  Player player = Main.player[proj.owner];
848  foreach (int index in HookOnHitPvpWithProj.arr) {
849  player.modPlayers[index].OnHitPvpWithProj(proj, target, damage, crit);
850  }
851  }
static HookList HookOnHitPvpWithProj
Definition: PlayerHooks.cs:844
static void Terraria.ModLoader.PlayerHooks.OnMissingMana ( Player  player,
Item  item,
int  manaNeeded 
)
static

Definition at line 588 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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

+ Here is the caller graph for this function:

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

Definition at line 1090 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 1062 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 1071 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1071  {
1072  var player = Main.player[playerIndex];
1073  foreach (int index in HookPlayerDisconnect.arr) {
1074  player.modPlayers[index].PlayerDisconnect(player);
1075  }
1076  }
static HookList HookPlayerDisconnect
static void Terraria.ModLoader.PlayerHooks.PostBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1163 of file PlayerHooks.cs.

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

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

+ 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 464 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 505 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

505  {
506  foreach (int index in HookPostItemCheck.arr) {
507  player.modPlayers[index].PostItemCheck();
508  }
509  }
static HookList HookPostItemCheck
Definition: PlayerHooks.cs:503
static void Terraria.ModLoader.PlayerHooks.PostNurseHeal ( Player  player,
NPC  npc,
int  health,
bool  removeDebuffs,
int  price 
)
static

Definition at line 1201 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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

Definition at line 169 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 1144 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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

Definition at line 424 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 367 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 392 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 400 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 408 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 495 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

495  {
496  bool result = true;
497  foreach (int index in HookPreItemCheck.arr) {
498  result &= player.modPlayers[index].PreItemCheck();
499  }
500  return result;
501  }
static HookList HookPreItemCheck
Definition: PlayerHooks.cs:493
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 474 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 161 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 343 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 359 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 416 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 642 of file PlayerHooks.cs.

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

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

Definition at line 241 of file PlayerHooks.cs.

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

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

+ 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 289 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

289  {
290  foreach (int index in HookSendClientChanges.arr) {
291  player.modPlayers[index].SendClientChanges(clientPlayer.modPlayers[index]);
292  }
293  }
static HookList HookSendClientChanges
Definition: PlayerHooks.cs:287
static void Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( Player  player,
BinaryWriter  writer 
)
static

Definition at line 204 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 222 of file PlayerHooks.cs.

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

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

+ Here is the call graph for this function:

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

Definition at line 351 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 136 of file PlayerHooks.cs.

References Terraria.ModLoader.ModLoader.GetMod(), Terraria.ModLoader.Item, and Terraria.ModLoader.Mod.ItemType().

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

+ Here is the call graph for this function:

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

Definition at line 155 of file PlayerHooks.cs.

155  {
156  SetStartInventory(player, SetupStartInventory(player));
157  }
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 1098 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1098  {
1099  foreach (int index in HookShiftClickSlot.arr) {
1100  if (player.modPlayers[index].ShiftClickSlot(inventory, context, slot)) {
1101  return true;
1102  }
1103  }
1104  return false;
1105  }
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 691 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

691  {
692  foreach (int index in HookShoot.arr) {
693  if (!player.modPlayers[index].Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack)) {
694  return false;
695  }
696  }
697  return true;
698  }
static void Terraria.ModLoader.PlayerHooks.SyncPlayer ( Player  player,
int  toWho,
int  fromWho,
bool  newPlayer 
)
static

Definition at line 281 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

281  {
282  foreach (int index in HookSyncPlayer.arr) {
283  player.modPlayers[index].SyncPlayer(toWho, fromWho, newPlayer);
284  }
285  }
static HookList HookSyncPlayer
Definition: PlayerHooks.cs:279
static float Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier ( Player  player,
Item  item 
)
static

Definition at line 541 of file PlayerHooks.cs.

References Terraria.ModLoader.ItemLoader.MeleeSpeedMultiplier().

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

+ Here is the call graph for this function:

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

Definition at line 546 of file PlayerHooks.cs.

References Terraria.ModLoader.Item.

546  {
547  return Math.Max(2, (int)(useAnimation / TotalMeleeSpeedMultiplier(player, item)));
548  }
static float TotalMeleeSpeedMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:541
static int Terraria.ModLoader.PlayerHooks.TotalUseTime ( float  useTime,
Player  player,
Item  item 
)
static

Definition at line 526 of file PlayerHooks.cs.

526  {
527  return Math.Max(2, (int)(useTime / TotalUseTimeMultiplier(player, item)));
528  }
static float TotalUseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:522
static float Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 522 of file PlayerHooks.cs.

References Terraria.ModLoader.ItemLoader.UseTimeMultiplier().

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

+ Here is the call graph for this function:

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

Definition at line 335 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 310 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 177 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 265 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

265  {
266  foreach (int index in HookUpdateBiomeVisuals.arr) {
267  player.modPlayers[index].UpdateBiomeVisuals();
268  }
269  }
static HookList HookUpdateBiomeVisuals
Definition: PlayerHooks.cs:263
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 376 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

376  {
377  foreach (int index in HookUpdateEquips.arr) {
378  player.modPlayers[index].UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff);
379  }
380  }
static HookList HookUpdateEquips
Definition: PlayerHooks.cs:374
static void Terraria.ModLoader.PlayerHooks.UpdateLifeRegen ( Player  player)
static

Definition at line 318 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 384 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Definition at line 513 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

Member Data Documentation

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

Definition at line 935 of file PlayerHooks.cs.

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

Definition at line 854 of file PlayerHooks.cs.

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

Definition at line 882 of file PlayerHooks.cs.

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

Definition at line 1169 of file PlayerHooks.cs.

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

Definition at line 716 of file PlayerHooks.cs.

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

Definition at line 749 of file PlayerHooks.cs.

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

Definition at line 794 of file PlayerHooks.cs.

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

Definition at line 822 of file PlayerHooks.cs.

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

Definition at line 1150 of file PlayerHooks.cs.

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

Definition at line 911 of file PlayerHooks.cs.

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

Definition at line 271 of file PlayerHooks.cs.

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

Definition at line 670 of file PlayerHooks.cs.

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

Definition at line 194 of file PlayerHooks.cs.

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

Definition at line 183 of file PlayerHooks.cs.

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

Definition at line 952 of file PlayerHooks.cs.

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

Definition at line 430 of file PlayerHooks.cs.

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

Definition at line 943 of file PlayerHooks.cs.

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

Definition at line 927 of file PlayerHooks.cs.

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

Definition at line 551 of file PlayerHooks.cs.

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

Definition at line 563 of file PlayerHooks.cs.

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

Definition at line 295 of file PlayerHooks.cs.

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

Definition at line 661 of file PlayerHooks.cs.

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

Definition at line 610 of file PlayerHooks.cs.

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

Definition at line 649 of file PlayerHooks.cs.

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

Definition at line 454 of file PlayerHooks.cs.

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

Definition at line 485 of file PlayerHooks.cs.

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

Definition at line 700 of file PlayerHooks.cs.

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

Definition at line 530 of file PlayerHooks.cs.

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

Definition at line 1024 of file PlayerHooks.cs.

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

Definition at line 962 of file PlayerHooks.cs.

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

Definition at line 971 of file PlayerHooks.cs.

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

Definition at line 866 of file PlayerHooks.cs.

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

Definition at line 894 of file PlayerHooks.cs.

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

Definition at line 733 of file PlayerHooks.cs.

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

Definition at line 770 of file PlayerHooks.cs.

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

Definition at line 806 of file PlayerHooks.cs.

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

Definition at line 835 of file PlayerHooks.cs.

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

Definition at line 575 of file PlayerHooks.cs.

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

Definition at line 1180 of file PlayerHooks.cs.

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

Definition at line 1191 of file PlayerHooks.cs.

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

Definition at line 1043 of file PlayerHooks.cs.

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

Definition at line 624 of file PlayerHooks.cs.

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

Definition at line 622 of file PlayerHooks.cs.

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

Definition at line 1052 of file PlayerHooks.cs.

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

Definition at line 325 of file PlayerHooks.cs.

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

Definition at line 681 of file PlayerHooks.cs.

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

Definition at line 597 of file PlayerHooks.cs.

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

Definition at line 1078 of file PlayerHooks.cs.

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

Definition at line 708 of file PlayerHooks.cs.

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

Definition at line 874 of file PlayerHooks.cs.

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

Definition at line 902 of file PlayerHooks.cs.

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

Definition at line 741 of file PlayerHooks.cs.

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

Definition at line 782 of file PlayerHooks.cs.

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

Definition at line 814 of file PlayerHooks.cs.

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

Definition at line 844 of file PlayerHooks.cs.

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

Definition at line 586 of file PlayerHooks.cs.

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

Definition at line 1088 of file PlayerHooks.cs.

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

Definition at line 1060 of file PlayerHooks.cs.

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

Definition at line 1069 of file PlayerHooks.cs.

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

Definition at line 1161 of file PlayerHooks.cs.

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

Definition at line 462 of file PlayerHooks.cs.

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

Definition at line 503 of file PlayerHooks.cs.

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

Definition at line 1199 of file PlayerHooks.cs.

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

Definition at line 167 of file PlayerHooks.cs.

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

Definition at line 1142 of file PlayerHooks.cs.

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

Definition at line 422 of file PlayerHooks.cs.

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

Definition at line 365 of file PlayerHooks.cs.

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

Definition at line 390 of file PlayerHooks.cs.

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

Definition at line 398 of file PlayerHooks.cs.

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

Definition at line 406 of file PlayerHooks.cs.

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

Definition at line 440 of file PlayerHooks.cs.

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

Definition at line 493 of file PlayerHooks.cs.

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

Definition at line 472 of file PlayerHooks.cs.

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

Definition at line 159 of file PlayerHooks.cs.

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

Definition at line 341 of file PlayerHooks.cs.

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

Definition at line 357 of file PlayerHooks.cs.

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

Definition at line 414 of file PlayerHooks.cs.

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

Definition at line 640 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 287 of file PlayerHooks.cs.

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

Definition at line 202 of file PlayerHooks.cs.

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

Definition at line 349 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 1096 of file PlayerHooks.cs.

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

Definition at line 689 of file PlayerHooks.cs.

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

Definition at line 279 of file PlayerHooks.cs.

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

Definition at line 333 of file PlayerHooks.cs.

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

Definition at line 308 of file PlayerHooks.cs.

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

Definition at line 175 of file PlayerHooks.cs.

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

Definition at line 263 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 374 of file PlayerHooks.cs.

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

Definition at line 316 of file PlayerHooks.cs.

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

Definition at line 382 of file PlayerHooks.cs.

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

Definition at line 511 of file PlayerHooks.cs.

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

Definition at line 22 of file PlayerHooks.cs.