Terraria ModLoader  0.11.4
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 IDictionary< string, int > indexes = new Dictionary<string, int>()
 
static readonly IDictionary< Type, int > indexesByType = new Dictionary<Type, int>()
 
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 38 of file PlayerHooks.cs.

References Terraria.ModLoader.ModPlayer.mod, Terraria.ModLoader.ModPlayer.Name, and Terraria.ModLoader.Mod.Name.

38  {
39  var hook = new HookList(ModLoader.Method(func));
40  hooks.Add(hook);
41  return hook;
42  }
static List< HookList > hooks
Definition: PlayerHooks.cs:36
static void Terraria.ModLoader.PlayerHooks.AnglerQuestReward ( Player  player,
float  rareMultiplier,
List< Item rewardItems 
)
static

Definition at line 959 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

959  {
960  foreach (int index in HookAnglerQuestReward.arr) {
961  player.modPlayers[index].AnglerQuestReward(rareMultiplier, rewardItems);
962  }
963  }
static HookList HookAnglerQuestReward
Definition: PlayerHooks.cs:957
static bool Terraria.ModLoader.PlayerHooks.CanBeHitByNPC ( Player  player,
NPC  npc,
ref int  cooldownSlot 
)
static

Definition at line 878 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

878  {
879  foreach (int index in HookCanBeHitByNPC.arr) {
880  if (!player.modPlayers[index].CanBeHitByNPC(npc, ref cooldownSlot)) {
881  return false;
882  }
883  }
884  return true;
885  }
static HookList HookCanBeHitByNPC
Definition: PlayerHooks.cs:876
static bool Terraria.ModLoader.PlayerHooks.CanBeHitByProjectile ( Player  player,
Projectile  proj 
)
static

Definition at line 906 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

906  {
907  foreach (int index in HookCanBeHitByProjectile.arr) {
908  if (!player.modPlayers[index].CanBeHitByProjectile(proj)) {
909  return false;
910  }
911  }
912  return true;
913  }
static HookList HookCanBeHitByProjectile
Definition: PlayerHooks.cs:904
static bool Terraria.ModLoader.PlayerHooks.CanBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1193 of file PlayerHooks.cs.

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

1193  {
1194  foreach (int index in HookCanBuyItem.arr) {
1195  if (!player.modPlayers[index].CanBuyItem(npc, shopInventory, item))
1196  return false;
1197  }
1198  return true;
1199  }

+ Here is the call graph for this function:

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

Definition at line 740 of file PlayerHooks.cs.

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

740  {
741  bool? flag = null;
742  foreach (int index in HookCanHitNPC.arr) {
743  bool? canHit = player.modPlayers[index].CanHitNPC(item, target);
744  if (canHit.HasValue && !canHit.Value) {
745  return false;
746  }
747  if (canHit.HasValue) {
748  flag = canHit.Value;
749  }
750  }
751  return flag;
752  }
static bool Terraria.ModLoader.PlayerHooks.CanHitNPCWithProj ( Projectile  proj,
NPC  target 
)
static

Definition at line 773 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

773  {
774  if (proj.npcProj || proj.trap) {
775  return null;
776  }
777  Player player = Main.player[proj.owner];
778  bool? flag = null;
779  foreach (int index in HookCanHitNPCWithProj.arr) {
780  bool? canHit = player.modPlayers[index].CanHitNPCWithProj(proj, target);
781  if (canHit.HasValue && !canHit.Value) {
782  return false;
783  }
784  if (canHit.HasValue) {
785  flag = canHit.Value;
786  }
787  }
788  return flag;
789  }
static HookList HookCanHitNPCWithProj
Definition: PlayerHooks.cs:771
static bool Terraria.ModLoader.PlayerHooks.CanHitPvp ( Player  player,
Item  item,
Player  target 
)
static

Definition at line 818 of file PlayerHooks.cs.

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

818  {
819  foreach (int index in HookCanHitPvp.arr) {
820  if (!player.modPlayers[index].CanHitPvp(item, target)) {
821  return false;
822  }
823  }
824  return true;
825  }
static bool Terraria.ModLoader.PlayerHooks.CanHitPvpWithProj ( Projectile  proj,
Player  target 
)
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 HookCanHitPvpWithProj.arr) {
849  if (!player.modPlayers[index].CanHitPvpWithProj(proj, target)) {
850  return false;
851  }
852  }
853  return true;
854  }
static HookList HookCanHitPvpWithProj
Definition: PlayerHooks.cs:844
static bool Terraria.ModLoader.PlayerHooks.CanSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1175 of file PlayerHooks.cs.

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

1175  {
1176  foreach (int index in HookCanSellItem.arr) {
1177  if (!player.modPlayers[index].CanSellItem(npc, shopInventory, item))
1178  return false;
1179  }
1180  return true;
1181  }

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

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

935  {
936  int i = 0;
937  while (i < 58) {
938  if (player.inventory[i].stack > 0 && player.inventory[i].bait > 0) {
939  break;
940  }
941  i++;
942  }
943  foreach (int index in HookCatchFish.arr) {
944  player.modPlayers[index].CatchFish(fishingRod, player.inventory[i], power, liquidType, poolSize, worldLayer, questFish, ref caughtType, ref junk);
945  }
946  }
static void Terraria.ModLoader.PlayerHooks.clientClone ( Player  player,
Player  clientClone 
)
static

Definition at line 294 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

294  {
295  foreach (int index in HookClientClone.arr) {
296  player.modPlayers[index].clientClone(clientClone.modPlayers[index]);
297  }
298  }
static HookList HookClientClone
Definition: PlayerHooks.cs:292
static void clientClone(Player player, Player clientClone)
Definition: PlayerHooks.cs:294
static bool Terraria.ModLoader.PlayerHooks.ConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 694 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

694  {
695  foreach (int index in HookConsumeAmmo.arr) {
696  if (!player.modPlayers[index].ConsumeAmmo(weapon, ammo)) {
697  return false;
698  }
699  }
700  return true;
701  }
static HookList HookConsumeAmmo
Definition: PlayerHooks.cs:692
static void Terraria.ModLoader.PlayerHooks.CopyCustomBiomesTo ( Player  player,
Player  other 
)
static

Definition at line 217 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

217  {
218  foreach (int index in HookCopyCustomBiomesTo.arr) {
219  player.modPlayers[index].CopyCustomBiomesTo(other);
220  }
221  }
static HookList HookCopyCustomBiomesTo
Definition: PlayerHooks.cs:215
static bool Terraria.ModLoader.PlayerHooks.CustomBiomesMatch ( Player  player,
Player  other 
)
static

Definition at line 206 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

206  {
207  foreach (int index in HookCustomBiomesMatch.arr) {
208  if (!player.modPlayers[index].CustomBiomesMatch(other)) {
209  return false;
210  }
211  }
212  return true;
213  }
static HookList HookCustomBiomesMatch
Definition: PlayerHooks.cs:204
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 976 of file PlayerHooks.cs.

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

976  {
977  ModPlayer[] modPlayers = drawInfo.drawPlayer.modPlayers;
978  foreach (int index in HookDrawEffects.arr) {
979  modPlayers[index].DrawEffects(drawInfo, ref r, ref g, ref b, ref a, ref fullBright);
980  }
981  }
static HookList HookDrawEffects
Definition: PlayerHooks.cs:974
static void Terraria.ModLoader.PlayerHooks.FrameEffects ( Player  player)
static

Definition at line 453 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

453  {
454  foreach (int index in HookFrameEffects.arr) {
455  player.modPlayers[index].FrameEffects();
456  }
457  }
static HookList HookFrameEffects
Definition: PlayerHooks.cs:451
static List<PlayerHeadLayer> Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers ( Player  drawPlayer)
static

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

1048  {
1049  List<PlayerHeadLayer> layers = new List<PlayerHeadLayer> {
1050  PlayerHeadLayer.Head,
1051  PlayerHeadLayer.Hair,
1052  PlayerHeadLayer.AltHair,
1053  PlayerHeadLayer.Armor,
1054  PlayerHeadLayer.FaceAcc
1055  };
1056  foreach (PlayerHeadLayer layer in layers) {
1057  layer.visible = true;
1058  }
1059  foreach (int index in HookModifyDrawHeadLayers.arr) {
1060  drawPlayer.modPlayers[index].ModifyDrawHeadLayers(layers);
1061  }
1062  return layers;
1063  }
static HookList HookModifyDrawHeadLayers
static List<PlayerLayer> Terraria.ModLoader.PlayerHooks.GetDrawLayers ( Player  drawPlayer)
static

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

995  {
996  List<PlayerLayer> layers = new List<PlayerLayer> {
997  PlayerLayer.HairBack,
998  PlayerLayer.MountBack,
999  PlayerLayer.MiscEffectsBack,
1000  PlayerLayer.BackAcc,
1001  PlayerLayer.Wings,
1002  PlayerLayer.BalloonAcc,
1003  PlayerLayer.Skin
1004  };
1005  if (drawPlayer.wearsRobe) {
1006  layers.Add(PlayerLayer.ShoeAcc);
1007  layers.Add(PlayerLayer.Legs);
1008  }
1009  else {
1010  layers.Add(PlayerLayer.Legs);
1011  layers.Add(PlayerLayer.ShoeAcc);
1012  }
1013  layers.Add(PlayerLayer.Body);
1014  layers.Add(PlayerLayer.HandOffAcc);
1015  layers.Add(PlayerLayer.WaistAcc);
1016  layers.Add(PlayerLayer.NeckAcc);
1017  layers.Add(PlayerLayer.Face);
1018  layers.Add(PlayerLayer.Hair);
1019  layers.Add(PlayerLayer.Head);
1020  layers.Add(PlayerLayer.FaceAcc);
1021  if (drawPlayer.mount.Cart) {
1022  layers.Add(PlayerLayer.ShieldAcc);
1023  layers.Add(PlayerLayer.MountFront);
1024  }
1025  else {
1026  layers.Add(PlayerLayer.MountFront);
1027  layers.Add(PlayerLayer.ShieldAcc);
1028  }
1029  layers.Add(PlayerLayer.SolarShield);
1030  layers.Add(PlayerLayer.HeldProjBack);
1031  layers.Add(PlayerLayer.HeldItem);
1032  layers.Add(PlayerLayer.Arms);
1033  layers.Add(PlayerLayer.HandOnAcc);
1034  layers.Add(PlayerLayer.HeldProjFront);
1035  layers.Add(PlayerLayer.FrontAcc);
1036  layers.Add(PlayerLayer.MiscEffectsFront);
1037  foreach (PlayerLayer layer in layers) {
1038  layer.visible = true;
1039  }
1040  foreach (int index in HookModifyDrawLayers.arr) {
1041  drawPlayer.modPlayers[index].ModifyDrawLayers(layers);
1042  }
1043  return layers;
1044  }
static HookList HookModifyDrawLayers
Definition: PlayerHooks.cs:993
static void Terraria.ModLoader.PlayerHooks.GetDyeTraderReward ( Player  player,
List< int >  rewardPool 
)
static

Definition at line 967 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

967  {
968  foreach (int index in HookGetDyeTraderReward.arr) {
969  player.modPlayers[index].GetDyeTraderReward(rewardPool);
970  }
971  }
static HookList HookGetDyeTraderReward
Definition: PlayerHooks.cs:965
static void Terraria.ModLoader.PlayerHooks.GetFishingLevel ( Player  player,
Item  fishingRod,
Item  bait,
ref int  fishingLevel 
)
static

Definition at line 951 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

951  {
952  foreach (int index in HookGetFishingLevel.arr) {
953  player.modPlayers[index].GetFishingLevel(fishingRod, bait, ref fishingLevel);
954  }
955  }
static HookList HookGetFishingLevel
Definition: PlayerHooks.cs:949
static void Terraria.ModLoader.PlayerHooks.GetHealLife ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 575 of file PlayerHooks.cs.

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

575  {
576  if (item.IsAir)
577  return;
578 
579  foreach (int index in HookGetHealLife.arr) {
580  player.modPlayers[index].GetHealLife(item, quickHeal, ref healValue);
581  }
582  }
static HookList HookGetHealLife
Definition: PlayerHooks.cs:573
static void Terraria.ModLoader.PlayerHooks.GetHealMana ( Player  player,
Item  item,
bool  quickHeal,
ref int  healValue 
)
static

Definition at line 587 of file PlayerHooks.cs.

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

587  {
588  if (item.IsAir)
589  return;
590 
591  foreach (int index in HookGetHealMana.arr) {
592  player.modPlayers[index].GetHealMana(item, quickHeal, ref healValue);
593  }
594  }
static HookList HookGetHealMana
Definition: PlayerHooks.cs:585
static Texture2D Terraria.ModLoader.PlayerHooks.GetMapBackgroundImage ( Player  player)
static

Definition at line 318 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

318  {
319  Texture2D texture = null;
320  foreach (int index in HookGetMapBackgroundImage.arr) {
321  texture = player.modPlayers[index].GetMapBackgroundImage();
322  if (texture != null) {
323  return texture;
324  }
325  }
326  return texture;
327  }
static HookList HookGetMapBackgroundImage
Definition: PlayerHooks.cs:316
static void Terraria.ModLoader.PlayerHooks.GetWeaponCrit ( Player  player,
Item  item,
ref int  crit 
)
static

Definition at line 685 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

685  {
686  if (item.IsAir) return;
687  foreach (int index in HookGetWeaponCrit.arr) {
688  player.modPlayers[index].GetWeaponCrit(item, ref crit);
689  }
690  }
static HookList HookGetWeaponCrit
Definition: PlayerHooks.cs:683
static void Terraria.ModLoader.PlayerHooks.GetWeaponDamage ( Player  player,
Item  item,
ref int  damage 
)
static

Definition at line 634 of file PlayerHooks.cs.

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

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

634  {
635  if (item.IsAir)
636  return;
637 
638  foreach (int index in HookGetWeaponDamage.arr) {
639  player.modPlayers[index].GetWeaponDamage(item, ref damage);
640  }
641  }
static HookList HookGetWeaponDamage
Definition: PlayerHooks.cs:632

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

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

673  {
674  if (item.IsAir)
675  return;
676 
677  foreach (int index in HookGetWeaponKnockback.arr) {
678  player.modPlayers[index].GetWeaponKnockback(item, ref knockback);
679  }
680  }
static HookList HookGetWeaponKnockback
Definition: PlayerHooks.cs:671
static bool Terraria.ModLoader.PlayerHooks.HasMethod ( Type  t,
string  method,
params Type[]  args 
)
staticprivate

Definition at line 1129 of file PlayerHooks.cs.

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

Definition at line 477 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

477  {
478  foreach (int index in HookHurt.arr) {
479  player.modPlayers[index].Hurt(pvp, quiet, damage, hitDirection, crit);
480  }
481  }
static void Terraria.ModLoader.PlayerHooks.Kill ( Player  player,
double  damage,
int  hitDirection,
bool  pvp,
PlayerDeathReason  damageSource 
)
static

Definition at line 508 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

508  {
509  foreach (int index in HookKill.arr) {
510  player.modPlayers[index].Kill(damage, hitDirection, pvp, damageSource);
511  }
512  }
static void Terraria.ModLoader.PlayerHooks.MeleeEffects ( Player  player,
Item  item,
Rectangle  hitbox 
)
static

Definition at line 724 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

724  {
725  foreach (int index in HookMeleeEffects.arr) {
726  player.modPlayers[index].MeleeEffects(item, hitbox);
727  }
728  }
static HookList HookMeleeEffects
Definition: PlayerHooks.cs:722
static float Terraria.ModLoader.PlayerHooks.MeleeSpeedMultiplier ( Player  player,
Item  item 
)
static

Definition at line 554 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

554  {
555  float multiplier = 1f;
556  if (item.IsAir) return multiplier;
557  foreach (int index in HookMeleeSpeedMultiplier.arr) {
558  multiplier *= player.modPlayers[index].MeleeSpeedMultiplier(item);
559  }
560  return multiplier;
561  }
static HookList HookMeleeSpeedMultiplier
Definition: PlayerHooks.cs:552
static void Terraria.ModLoader.PlayerHooks.ModifyDrawInfo ( ref PlayerDrawInfo  drawInfo)
static

Definition at line 986 of file PlayerHooks.cs.

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

986  {
987  ModPlayer[] modPlayers = drawInfo.drawPlayer.modPlayers;
988  foreach (int index in HookModifyDrawInfo.arr) {
989  modPlayers[index].ModifyDrawInfo(ref drawInfo);
990  }
991  }
static HookList HookModifyDrawInfo
Definition: PlayerHooks.cs:984

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

References Terraria.ModLoader.PlayerHooks.HookList.arr.

890  {
891  foreach (int index in HookModifyHitByNPC.arr) {
892  player.modPlayers[index].ModifyHitByNPC(npc, ref damage, ref crit);
893  }
894  }
static HookList HookModifyHitByNPC
Definition: PlayerHooks.cs:888
static void Terraria.ModLoader.PlayerHooks.ModifyHitByProjectile ( Player  player,
Projectile  proj,
ref int  damage,
ref bool  crit 
)
static

Definition at line 918 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

918  {
919  foreach (int index in HookModifyHitByProjectile.arr) {
920  player.modPlayers[index].ModifyHitByProjectile(proj, ref damage, ref crit);
921  }
922  }
static HookList HookModifyHitByProjectile
Definition: PlayerHooks.cs:916
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 757 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

757  {
758  foreach (int index in HookModifyHitNPC.arr) {
759  player.modPlayers[index].ModifyHitNPC(item, target, ref damage, ref knockback, ref crit);
760  }
761  }
static HookList HookModifyHitNPC
Definition: PlayerHooks.cs:755
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 794 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

794  {
795  if (proj.npcProj || proj.trap) {
796  return;
797  }
798  Player player = Main.player[proj.owner];
799  foreach (int index in HookModifyHitNPCWithProj.arr) {
800  player.modPlayers[index].ModifyHitNPCWithProj(proj, target, ref damage, ref knockback, ref crit, ref hitDirection);
801  }
802  }
static HookList HookModifyHitNPCWithProj
Definition: PlayerHooks.cs:792
static void Terraria.ModLoader.PlayerHooks.ModifyHitPvp ( Player  player,
Item  item,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 830 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

830  {
831  foreach (int index in HookModifyHitPvp.arr) {
832  player.modPlayers[index].ModifyHitPvp(item, target, ref damage, ref crit);
833  }
834  }
static HookList HookModifyHitPvp
Definition: PlayerHooks.cs:828
static void Terraria.ModLoader.PlayerHooks.ModifyHitPvpWithProj ( Projectile  proj,
Player  target,
ref int  damage,
ref bool  crit 
)
static

Definition at line 859 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

859  {
860  Player player = Main.player[proj.owner];
861  foreach (int index in HookModifyHitPvpWithProj.arr) {
862  player.modPlayers[index].ModifyHitPvpWithProj(proj, target, ref damage, ref crit);
863  }
864  }
static HookList HookModifyHitPvpWithProj
Definition: PlayerHooks.cs:857
static void Terraria.ModLoader.PlayerHooks.ModifyManaCost ( Player  player,
Item  item,
ref float  reduce,
ref float  mult 
)
static

Definition at line 599 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

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

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

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1204  {
1205  foreach (int index in HookModifyNurseHeal.arr) {
1206  if (!p.modPlayers[index].ModifyNurseHeal(npc, ref health, ref removeDebuffs, ref chat))
1207  return false;
1208  }
1209  return true;
1210  }
static HookList HookModifyNurseHeal
static void Terraria.ModLoader.PlayerHooks.ModifyNursePrice ( Player  p,
NPC  npc,
int  health,
bool  removeDebuffs,
ref int  price 
)
static

Definition at line 1215 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1215  {
1216  foreach (int index in HookModifyNursePrice.arr) {
1217  p.modPlayers[index].ModifyNursePrice(npc, health, removeDebuffs, ref price);
1218  }
1219  }
static HookList HookModifyNursePrice
static void Terraria.ModLoader.PlayerHooks.ModifyScreenPosition ( Player  player)
static

Definition at line 1067 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1067  {
1068  foreach (int index in HookModifyScreenPosition.arr) {
1069  player.modPlayers[index].ModifyScreenPosition();
1070  }
1071  }
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 650 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

650  {
651  if (item.IsAir)
652  return;
653 
654  foreach (int index in HookModifyWeaponDamageOld.arr) {
655  player.modPlayers[index].ModifyWeaponDamage(item, ref add, ref mult);
656  }
657  foreach (int index in HookModifyWeaponDamage.arr) {
658  player.modPlayers[index].ModifyWeaponDamage(item, ref add, ref mult, ref flat);
659  }
660  }
static HookList HookModifyWeaponDamage
Definition: PlayerHooks.cs:646
static HookList HookModifyWeaponDamageOld
Definition: PlayerHooks.cs:644

+ Here is the caller graph for this function:

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

Definition at line 1076 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1076  {
1077  foreach (int index in HookModifyZoom.arr) {
1078  player.modPlayers[index].ModifyZoom(ref zoom);
1079  }
1080  }
static void Terraria.ModLoader.PlayerHooks.NaturalLifeRegen ( Player  player,
ref float  regen 
)
static

Definition at line 348 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

348  {
349  foreach (int index in HookNaturalLifeRegen.arr) {
350  player.modPlayers[index].NaturalLifeRegen(ref regen);
351  }
352  }
static HookList HookNaturalLifeRegen
Definition: PlayerHooks.cs:346
static void Terraria.ModLoader.PlayerHooks.OnConsumeAmmo ( Player  player,
Item  weapon,
Item  ammo 
)
static

Definition at line 705 of file PlayerHooks.cs.

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

705  {
706  foreach (int index in HookOnConsumeAmmo.arr)
707  player.modPlayers[index].OnConsumeAmmo(weapon, ammo);
708  }
static HookList HookOnConsumeAmmo
Definition: PlayerHooks.cs:703
static void Terraria.ModLoader.PlayerHooks.OnConsumeMana ( Player  player,
Item  item,
int  manaConsumed 
)
static

Definition at line 621 of file PlayerHooks.cs.

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

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

621  {
622  if (item.IsAir)
623  return;
624 
625  foreach (int index in HookOnConsumeMana.arr) {
626  player.modPlayers[index].OnConsumeMana(item, manaConsumed);
627  }
628  }
static HookList HookOnConsumeMana
Definition: PlayerHooks.cs:619

+ Here is the caller graph for this function:

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

Definition at line 1103 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1103  {
1104  var player = Main.player[playerIndex];
1105  foreach (int index in HookOnEnterWorld.arr) {
1106  player.modPlayers[index].OnEnterWorld(player);
1107  }
1108  }
static HookList HookOnEnterWorld
static void Terraria.ModLoader.PlayerHooks.OnHitAnything ( Player  player,
float  x,
float  y,
Entity  victim 
)
static

Definition at line 732 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

732  {
733  foreach (int index in HookOnHitAnything.arr) {
734  player.modPlayers[index].OnHitAnything(x, y, victim);
735  }
736  }
static HookList HookOnHitAnything
Definition: PlayerHooks.cs:730
static void Terraria.ModLoader.PlayerHooks.OnHitByNPC ( Player  player,
NPC  npc,
int  damage,
bool  crit 
)
static

Definition at line 898 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

898  {
899  foreach (int index in HookOnHitByNPC.arr) {
900  player.modPlayers[index].OnHitByNPC(npc, damage, crit);
901  }
902  }
static HookList HookOnHitByNPC
Definition: PlayerHooks.cs:896
static void Terraria.ModLoader.PlayerHooks.OnHitByProjectile ( Player  player,
Projectile  proj,
int  damage,
bool  crit 
)
static

Definition at line 926 of file PlayerHooks.cs.

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

926  {
927  foreach (int index in HookOnHitByProjectile.arr) {
928  player.modPlayers[index].OnHitByProjectile(proj, damage, crit);
929  }
930  }
static HookList HookOnHitByProjectile
Definition: PlayerHooks.cs:924
static void Terraria.ModLoader.PlayerHooks.OnHitNPC ( Player  player,
Item  item,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 765 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

765  {
766  foreach (int index in HookOnHitNPC.arr) {
767  player.modPlayers[index].OnHitNPC(item, target, damage, knockback, crit);
768  }
769  }
static void Terraria.ModLoader.PlayerHooks.OnHitNPCWithProj ( Projectile  proj,
NPC  target,
int  damage,
float  knockback,
bool  crit 
)
static

Definition at line 806 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

806  {
807  if (proj.npcProj || proj.trap) {
808  return;
809  }
810  Player player = Main.player[proj.owner];
811  foreach (int index in HookOnHitNPCWithProj.arr) {
812  player.modPlayers[index].OnHitNPCWithProj(proj, target, damage, knockback, crit);
813  }
814  }
static HookList HookOnHitNPCWithProj
Definition: PlayerHooks.cs:804
static void Terraria.ModLoader.PlayerHooks.OnHitPvp ( Player  player,
Item  item,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 838 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

838  {
839  foreach (int index in HookOnHitPvp.arr) {
840  player.modPlayers[index].OnHitPvp(item, target, damage, crit);
841  }
842  }
static void Terraria.ModLoader.PlayerHooks.OnHitPvpWithProj ( Projectile  proj,
Player  target,
int  damage,
bool  crit 
)
static

Definition at line 868 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

868  {
869  Player player = Main.player[proj.owner];
870  foreach (int index in HookOnHitPvpWithProj.arr) {
871  player.modPlayers[index].OnHitPvpWithProj(proj, target, damage, crit);
872  }
873  }
static HookList HookOnHitPvpWithProj
Definition: PlayerHooks.cs:866
static void Terraria.ModLoader.PlayerHooks.OnMissingMana ( Player  player,
Item  item,
int  manaNeeded 
)
static

Definition at line 610 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

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

610  {
611  if (item.IsAir)
612  return;
613 
614  foreach (int index in HookOnMissingMana.arr) {
615  player.modPlayers[index].OnMissingMana(item, manaNeeded);
616  }
617  }
static HookList HookOnMissingMana
Definition: PlayerHooks.cs:608

+ Here is the caller graph for this function:

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

Definition at line 1112 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1112  {
1113  foreach (int index in HookOnRespawn.arr) {
1114  player.modPlayers[index].OnRespawn(player);
1115  }
1116  }
static void Terraria.ModLoader.PlayerHooks.PlayerConnect ( int  playerIndex)
static

Definition at line 1084 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1084  {
1085  var player = Main.player[playerIndex];
1086  foreach (int index in HookPlayerConnect.arr) {
1087  player.modPlayers[index].PlayerConnect(player);
1088  }
1089  }
static HookList HookPlayerConnect
static void Terraria.ModLoader.PlayerHooks.PlayerDisconnect ( int  playerIndex)
static

Definition at line 1093 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1093  {
1094  var player = Main.player[playerIndex];
1095  foreach (int index in HookPlayerDisconnect.arr) {
1096  player.modPlayers[index].PlayerDisconnect(player);
1097  }
1098  }
static HookList HookPlayerDisconnect
static void Terraria.ModLoader.PlayerHooks.PostBuyItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1185 of file PlayerHooks.cs.

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

1185  {
1186  foreach (int index in HookPostBuyItem.arr) {
1187  player.modPlayers[index].PostBuyItem(npc, shopInventory, item);
1188  }
1189  }

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

References Terraria.ModLoader.PlayerHooks.HookList.arr.

485  {
486  foreach (int index in HookPostHurt.arr) {
487  player.modPlayers[index].PostHurt(pvp, quiet, damage, hitDirection, crit);
488  }
489  }
static void Terraria.ModLoader.PlayerHooks.PostItemCheck ( Player  player)
static

Definition at line 527 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

527  {
528  foreach (int index in HookPostItemCheck.arr) {
529  player.modPlayers[index].PostItemCheck();
530  }
531  }
static HookList HookPostItemCheck
Definition: PlayerHooks.cs:525
static void Terraria.ModLoader.PlayerHooks.PostNurseHeal ( Player  player,
NPC  npc,
int  health,
bool  removeDebuffs,
int  price 
)
static

Definition at line 1223 of file PlayerHooks.cs.

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

1223  {
1224  foreach (int index in HookPostNurseHeal.arr) {
1225  player.modPlayers[index].PostNurseHeal(npc, health, removeDebuffs, price);
1226  }
1227  }
static HookList HookPostNurseHeal

+ Here is the call graph for this function:

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

Definition at line 190 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

190  {
191  foreach (int index in HookPostSavePlayer.arr) {
192  player.modPlayers[index].PostSavePlayer();
193  }
194  }
static HookList HookPostSavePlayer
Definition: PlayerHooks.cs:188
static void Terraria.ModLoader.PlayerHooks.PostSellItem ( Player  player,
NPC  npc,
Item[]  shopInventory,
Item  item 
)
static

Definition at line 1166 of file PlayerHooks.cs.

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

1166  {
1167  foreach (int index in HookPostSellItem.arr) {
1168  player.modPlayers[index].PostSellItem(npc, shopInventory, item);
1169  }
1170  }
static HookList HookPostSellItem

+ Here is the call graph for this function:

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

Definition at line 445 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

445  {
446  foreach (int index in HookPostUpdate.arr) {
447  player.modPlayers[index].PostUpdate();
448  }
449  }
static HookList HookPostUpdate
Definition: PlayerHooks.cs:443
static void Terraria.ModLoader.PlayerHooks.PostUpdateBuffs ( Player  player)
static

Definition at line 388 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

388  {
389  foreach (int index in HookPostUpdateBuffs.arr) {
390  player.modPlayers[index].PostUpdateBuffs();
391  }
392  }
static HookList HookPostUpdateBuffs
Definition: PlayerHooks.cs:386
static void Terraria.ModLoader.PlayerHooks.PostUpdateEquips ( Player  player)
static

Definition at line 413 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

413  {
414  foreach (int index in HookPostUpdateEquips.arr) {
415  player.modPlayers[index].PostUpdateEquips();
416  }
417  }
static HookList HookPostUpdateEquips
Definition: PlayerHooks.cs:411
static void Terraria.ModLoader.PlayerHooks.PostUpdateMiscEffects ( Player  player)
static

Definition at line 421 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

421  {
422  foreach (int index in HookPostUpdateMiscEffects.arr) {
423  player.modPlayers[index].PostUpdateMiscEffects();
424  }
425  }
static HookList HookPostUpdateMiscEffects
Definition: PlayerHooks.cs:419
static void Terraria.ModLoader.PlayerHooks.PostUpdateRunSpeeds ( Player  player)
static

Definition at line 429 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

429  {
430  foreach (int index in HookPostUpdateRunSpeeds.arr) {
431  player.modPlayers[index].PostUpdateRunSpeeds();
432  }
433  }
static HookList HookPostUpdateRunSpeeds
Definition: PlayerHooks.cs:427
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 463 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

464  {
465  bool flag = true;
466  foreach (int index in HookPreHurt.arr) {
467  if (!player.modPlayers[index].PreHurt(pvp, quiet, ref damage, ref hitDirection, ref crit, ref customDamage,
468  ref playSound, ref genGore, ref damageSource)) {
469  flag = false;
470  }
471  }
472  return flag;
473  }
static bool Terraria.ModLoader.PlayerHooks.PreItemCheck ( Player  player)
static

Definition at line 516 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

516  {
517  foreach (int index in HookPreItemCheck.arr) {
518  if (!player.modPlayers[index].PreItemCheck()) {
519  return false;
520  }
521  }
522  return true;
523  }
static HookList HookPreItemCheck
Definition: PlayerHooks.cs:514
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 495 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

496  {
497  bool flag = true;
498  foreach (int index in HookPreKill.arr) {
499  if (!player.modPlayers[index].PreKill(damage, hitDirection, pvp, ref playSound, ref genGore, ref damageSource)) {
500  flag = false;
501  }
502  }
503  return flag;
504  }
static void Terraria.ModLoader.PlayerHooks.PreSavePlayer ( Player  player)
static

Definition at line 182 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

182  {
183  foreach (int index in HookPreSavePlayer.arr) {
184  player.modPlayers[index].PreSavePlayer();
185  }
186  }
static HookList HookPreSavePlayer
Definition: PlayerHooks.cs:180
static void Terraria.ModLoader.PlayerHooks.PreUpdate ( Player  player)
static

Definition at line 364 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

364  {
365  foreach (int index in HookPreUpdate.arr) {
366  player.modPlayers[index].PreUpdate();
367  }
368  }
static void Terraria.ModLoader.PlayerHooks.PreUpdateBuffs ( Player  player)
static

Definition at line 380 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

380  {
381  foreach (int index in HookPreUpdateBuffs.arr) {
382  player.modPlayers[index].PreUpdateBuffs();
383  }
384  }
static HookList HookPreUpdateBuffs
Definition: PlayerHooks.cs:378
static void Terraria.ModLoader.PlayerHooks.PreUpdateMovement ( Player  player)
static

Definition at line 437 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

437  {
438  foreach (int index in HookPreUpdateMovement.arr) {
439  player.modPlayers[index].PreUpdateMovement();
440  }
441  }
static HookList HookPreUpdateMovement
Definition: PlayerHooks.cs:435
static void Terraria.ModLoader.PlayerHooks.ProcessTriggers ( Player  player,
TriggersSet  triggersSet 
)
static

Definition at line 664 of file PlayerHooks.cs.

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

664  {
665  foreach (int index in HookProcessTriggers.arr) {
666  player.modPlayers[index].ProcessTriggers(triggersSet);
667  }
668  }
static HookList HookProcessTriggers
Definition: PlayerHooks.cs:662
static void Terraria.ModLoader.PlayerHooks.ReceiveCustomBiomes ( Player  player,
BinaryReader  reader 
)
static

Definition at line 262 of file PlayerHooks.cs.

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

262  {
263  int count = reader.ReadUInt16();
264  for (int k = 0; k < count; k++) {
265  string modName = reader.ReadString();
266  string name = reader.ReadString();
267  byte[] data = reader.ReadBytes(reader.ReadByte());
268  Mod mod = ModLoader.GetMod(modName);
269  ModPlayer modPlayer = mod == null ? null : player.GetModPlayer(mod, name);
270  if (modPlayer != null) {
271  using (MemoryStream stream = new MemoryStream(data)) {
272  using (BinaryReader customReader = new BinaryReader(stream)) {
273  try {
274  modPlayer.ReceiveCustomBiomes(customReader);
275  }
276  catch {
277  }
278  }
279  }
280  }
281  }
282  }

+ Here is the call graph for this function:

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

Definition at line 84 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

84  {
85  foreach (int index in HookResetEffects.arr) {
86  player.modPlayers[index].ResetEffects();
87  }
88  }
static HookList HookResetEffects
Definition: PlayerHooks.cs:82
static void Terraria.ModLoader.PlayerHooks.SendClientChanges ( Player  player,
Player  clientPlayer 
)
static

Definition at line 310 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

310  {
311  foreach (int index in HookSendClientChanges.arr) {
312  player.modPlayers[index].SendClientChanges(clientPlayer.modPlayers[index]);
313  }
314  }
static HookList HookSendClientChanges
Definition: PlayerHooks.cs:308
static void Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( Player  player,
BinaryWriter  writer 
)
static

Definition at line 225 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

225  {
226  ushort count = 0;
227  byte[] data;
228  using (MemoryStream stream = new MemoryStream()) {
229  using (BinaryWriter customWriter = new BinaryWriter(stream)) {
230  foreach (int index in HookSendCustomBiomes.arr) {
231  if (SendCustomBiomes(player.modPlayers[index], customWriter)) {
232  count++;
233  }
234  }
235  customWriter.Flush();
236  data = stream.ToArray();
237  }
238  }
239  writer.Write(count);
240  writer.Write(data);
241  }
static void SendCustomBiomes(Player player, BinaryWriter writer)
Definition: PlayerHooks.cs:225
static HookList HookSendCustomBiomes
Definition: PlayerHooks.cs:223
static bool Terraria.ModLoader.PlayerHooks.SendCustomBiomes ( ModPlayer  modPlayer,
BinaryWriter  writer 
)
staticprivate

Definition at line 243 of file PlayerHooks.cs.

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

243  {
244  byte[] data;
245  using (MemoryStream stream = new MemoryStream()) {
246  using (BinaryWriter customWriter = new BinaryWriter(stream)) {
247  modPlayer.SendCustomBiomes(customWriter);
248  customWriter.Flush();
249  data = stream.ToArray();
250  }
251  }
252  if (data.Length > 0) {
253  writer.Write(modPlayer.mod.Name);
254  writer.Write(modPlayer.Name);
255  writer.Write((byte)data.Length);
256  writer.Write(data);
257  return true;
258  }
259  return false;
260  }

+ Here is the call graph for this function:

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

Definition at line 372 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

372  {
373  foreach (int index in HookSetControls.arr) {
374  player.modPlayers[index].SetControls();
375  }
376  }
static HookList HookSetControls
Definition: PlayerHooks.cs:370
static void Terraria.ModLoader.PlayerHooks.SetStartInventory ( Player  player,
IList< Item items 
)
static

Definition at line 157 of file PlayerHooks.cs.

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

157  {
158  if (items.Count <= 50) {
159  for (int k = 0; k < items.Count; k++) {
160  player.inventory[k] = items[k];
161  }
162  }
163  else {
164  for (int k = 0; k < 49; k++) {
165  player.inventory[k] = items[k];
166  }
167  Item bag = new Item();
168  bag.SetDefaults(ModLoader.GetMod("ModLoader").ItemType("StartBag"));
169  for (int k = 49; k < items.Count; k++) {
170  ((StartBag)bag.modItem).AddItem(items[k]);
171  }
172  player.inventory[49] = bag;
173  }
174  }

+ Here is the call graph for this function:

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

Definition at line 176 of file PlayerHooks.cs.

176  {
177  SetStartInventory(player, SetupStartInventory(player));
178  }
static void SetStartInventory(Player player, IList< Item > items)
Definition: PlayerHooks.cs:157
static IList< Item > SetupStartInventory(Player player, bool mediumcoreDeath=false)
Definition: PlayerHooks.cs:101
static IList<Item> Terraria.ModLoader.PlayerHooks.SetupStartInventory ( Player  player,
bool  mediumcoreDeath = false 
)
static

Definition at line 101 of file PlayerHooks.cs.

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

101  {
102  IList<Item> items = new List<Item>();
103  Item item = new Item();
104  item.SetDefaults(3507);
105  item.Prefix(-1);
106  items.Add(item);
107  item = new Item();
108  item.SetDefaults(3509);
109  item.Prefix(-1);
110  items.Add(item);
111  item = new Item();
112  item.SetDefaults(3506);
113  item.Prefix(-1);
114  items.Add(item);
115  if (Main.cEd && !mediumcoreDeath) {
116  item = new Item();
117  item.SetDefaults(603);
118  items.Add(item);
119  }
120  foreach (int index in HookSetupStartInventory.arr) {
121  player.modPlayers[index].SetupStartInventory(items, mediumcoreDeath);
122  }
123  foreach (int index in HookSetupStartInventoryOld.arr) {
124  player.modPlayers[index].SetupStartInventory(items);
125  }
126  IDictionary<int, int> counts = new Dictionary<int, int>();
127  foreach (Item item0 in items) {
128  if (item0.maxStack > 1) {
129  if (!counts.ContainsKey(item0.netID)) {
130  counts[item0.netID] = 0;
131  }
132  counts[item0.netID] += item0.stack;
133  }
134  }
135  int k = 0;
136  while (k < items.Count) {
137  bool flag = true;
138  int id = items[k].netID;
139  if (counts.ContainsKey(id)) {
140  items[k].stack = counts[id];
141  if (items[k].stack > items[k].maxStack) {
142  items[k].stack = items[k].maxStack;
143  }
144  counts[id] -= items[k].stack;
145  if (items[k].stack <= 0) {
146  items.RemoveAt(k);
147  flag = false;
148  }
149  }
150  if (flag) {
151  k++;
152  }
153  }
154  return items;
155  }
static HookList HookSetupStartInventory
Definition: PlayerHooks.cs:98
static HookList HookSetupStartInventoryOld
Definition: PlayerHooks.cs:99
static bool Terraria.ModLoader.PlayerHooks.ShiftClickSlot ( Player  player,
Item[]  inventory,
int  context,
int  slot 
)
static

Definition at line 1120 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

1120  {
1121  foreach (int index in HookShiftClickSlot.arr) {
1122  if (player.modPlayers[index].ShiftClickSlot(inventory, context, slot)) {
1123  return true;
1124  }
1125  }
1126  return false;
1127  }
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 713 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

713  {
714  foreach (int index in HookShoot.arr) {
715  if (!player.modPlayers[index].Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack)) {
716  return false;
717  }
718  }
719  return true;
720  }
static void Terraria.ModLoader.PlayerHooks.SyncPlayer ( Player  player,
int  toWho,
int  fromWho,
bool  newPlayer 
)
static

Definition at line 302 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

302  {
303  foreach (int index in HookSyncPlayer.arr) {
304  player.modPlayers[index].SyncPlayer(toWho, fromWho, newPlayer);
305  }
306  }
static HookList HookSyncPlayer
Definition: PlayerHooks.cs:300
static float Terraria.ModLoader.PlayerHooks.TotalMeleeSpeedMultiplier ( Player  player,
Item  item 
)
static

Definition at line 563 of file PlayerHooks.cs.

References Terraria.ModLoader.ItemLoader.MeleeSpeedMultiplier().

563  {
564  return TotalUseTimeMultiplier(player, item) * MeleeSpeedMultiplier(player, item)
565  * ItemLoader.MeleeSpeedMultiplier(item, player);
566  }
static float MeleeSpeedMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:554
static float TotalUseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:544

+ Here is the call graph for this function:

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

Definition at line 568 of file PlayerHooks.cs.

References Terraria.ModLoader.Item.

568  {
569  return Math.Max(2, (int)(useAnimation / TotalMeleeSpeedMultiplier(player, item)));
570  }
static float TotalMeleeSpeedMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:563
static int Terraria.ModLoader.PlayerHooks.TotalUseTime ( float  useTime,
Player  player,
Item  item 
)
static

Definition at line 548 of file PlayerHooks.cs.

548  {
549  return Math.Max(2, (int)(useTime / TotalUseTimeMultiplier(player, item)));
550  }
static float TotalUseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:544
static float Terraria.ModLoader.PlayerHooks.TotalUseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 544 of file PlayerHooks.cs.

References Terraria.ModLoader.ItemLoader.UseTimeMultiplier().

544  {
545  return UseTimeMultiplier(player, item) * ItemLoader.UseTimeMultiplier(item, player);
546  }
static float UseTimeMultiplier(Player player, Item item)
Definition: PlayerHooks.cs:535

+ Here is the call graph for this function:

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

Definition at line 356 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

356  {
357  foreach (int index in HookUpdateAutopause.arr) {
358  player.modPlayers[index].UpdateAutopause();
359  }
360  }
static HookList HookUpdateAutopause
Definition: PlayerHooks.cs:354
static void Terraria.ModLoader.PlayerHooks.UpdateBadLifeRegen ( Player  player)
static

Definition at line 331 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

331  {
332  foreach (int index in HookUpdateBadLifeRegen.arr) {
333  player.modPlayers[index].UpdateBadLifeRegen();
334  }
335  }
static HookList HookUpdateBadLifeRegen
Definition: PlayerHooks.cs:329
static void Terraria.ModLoader.PlayerHooks.UpdateBiomes ( Player  player)
static

Definition at line 198 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

198  {
199  foreach (int index in HookUpdateBiomes.arr) {
200  player.modPlayers[index].UpdateBiomes();
201  }
202  }
static HookList HookUpdateBiomes
Definition: PlayerHooks.cs:196
static void Terraria.ModLoader.PlayerHooks.UpdateBiomeVisuals ( Player  player)
static

Definition at line 286 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

286  {
287  foreach (int index in HookUpdateBiomeVisuals.arr) {
288  player.modPlayers[index].UpdateBiomeVisuals();
289  }
290  }
static HookList HookUpdateBiomeVisuals
Definition: PlayerHooks.cs:284
static void Terraria.ModLoader.PlayerHooks.UpdateDead ( Player  player)
static

Definition at line 92 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

92  {
93  foreach (int index in HookUpdateDead.arr) {
94  player.modPlayers[index].UpdateDead();
95  }
96  }
static HookList HookUpdateDead
Definition: PlayerHooks.cs:90
static void Terraria.ModLoader.PlayerHooks.UpdateEquips ( Player  player,
ref bool  wallSpeedBuff,
ref bool  tileSpeedBuff,
ref bool  tileRangeBuff 
)
static

Definition at line 397 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

397  {
398  foreach (int index in HookUpdateEquips.arr) {
399  player.modPlayers[index].UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff);
400  }
401  }
static HookList HookUpdateEquips
Definition: PlayerHooks.cs:395
static void Terraria.ModLoader.PlayerHooks.UpdateLifeRegen ( Player  player)
static

Definition at line 339 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

339  {
340  foreach (int index in HookUpdateLifeRegen.arr) {
341  player.modPlayers[index].UpdateLifeRegen();
342  }
343  }
static HookList HookUpdateLifeRegen
Definition: PlayerHooks.cs:337
static void Terraria.ModLoader.PlayerHooks.UpdateVanityAccessories ( Player  player)
static

Definition at line 405 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

405  {
406  foreach (int index in HookUpdateVanityAccessories.arr) {
407  player.modPlayers[index].UpdateVanityAccessories();
408  }
409  }
static HookList HookUpdateVanityAccessories
Definition: PlayerHooks.cs:403
static float Terraria.ModLoader.PlayerHooks.UseTimeMultiplier ( Player  player,
Item  item 
)
static

Definition at line 535 of file PlayerHooks.cs.

References Terraria.ModLoader.PlayerHooks.HookList.arr.

535  {
536  float multiplier = 1f;
537  if (item.IsAir) return multiplier;
538  foreach (int index in HookUseTimeMultiplier.arr) {
539  multiplier *= player.modPlayers[index].UseTimeMultiplier(item);
540  }
541  return multiplier;
542  }
static HookList HookUseTimeMultiplier
Definition: PlayerHooks.cs:533

Member Data Documentation

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

Definition at line 957 of file PlayerHooks.cs.

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

Definition at line 876 of file PlayerHooks.cs.

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

Definition at line 904 of file PlayerHooks.cs.

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

Definition at line 1191 of file PlayerHooks.cs.

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

Definition at line 738 of file PlayerHooks.cs.

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

Definition at line 771 of file PlayerHooks.cs.

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

Definition at line 816 of file PlayerHooks.cs.

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

Definition at line 844 of file PlayerHooks.cs.

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

Definition at line 1172 of file PlayerHooks.cs.

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

Definition at line 933 of file PlayerHooks.cs.

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

Definition at line 292 of file PlayerHooks.cs.

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

Definition at line 692 of file PlayerHooks.cs.

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

Definition at line 215 of file PlayerHooks.cs.

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

Definition at line 204 of file PlayerHooks.cs.

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

Definition at line 974 of file PlayerHooks.cs.

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

Definition at line 451 of file PlayerHooks.cs.

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

Definition at line 965 of file PlayerHooks.cs.

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

Definition at line 949 of file PlayerHooks.cs.

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

Definition at line 573 of file PlayerHooks.cs.

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

Definition at line 585 of file PlayerHooks.cs.

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

Definition at line 316 of file PlayerHooks.cs.

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

Definition at line 683 of file PlayerHooks.cs.

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

Definition at line 632 of file PlayerHooks.cs.

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

Definition at line 671 of file PlayerHooks.cs.

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

Definition at line 475 of file PlayerHooks.cs.

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

Definition at line 506 of file PlayerHooks.cs.

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

Definition at line 722 of file PlayerHooks.cs.

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

Definition at line 552 of file PlayerHooks.cs.

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

Definition at line 1046 of file PlayerHooks.cs.

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

Definition at line 984 of file PlayerHooks.cs.

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

Definition at line 993 of file PlayerHooks.cs.

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

Definition at line 888 of file PlayerHooks.cs.

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

Definition at line 916 of file PlayerHooks.cs.

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

Definition at line 755 of file PlayerHooks.cs.

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

Definition at line 792 of file PlayerHooks.cs.

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

Definition at line 828 of file PlayerHooks.cs.

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

Definition at line 857 of file PlayerHooks.cs.

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

Definition at line 597 of file PlayerHooks.cs.

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

Definition at line 1202 of file PlayerHooks.cs.

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

Definition at line 1213 of file PlayerHooks.cs.

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

Definition at line 1065 of file PlayerHooks.cs.

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

Definition at line 646 of file PlayerHooks.cs.

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

Definition at line 644 of file PlayerHooks.cs.

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

Definition at line 1074 of file PlayerHooks.cs.

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

Definition at line 346 of file PlayerHooks.cs.

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

Definition at line 703 of file PlayerHooks.cs.

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

Definition at line 619 of file PlayerHooks.cs.

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

Definition at line 1100 of file PlayerHooks.cs.

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

Definition at line 730 of file PlayerHooks.cs.

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

Definition at line 896 of file PlayerHooks.cs.

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

Definition at line 924 of file PlayerHooks.cs.

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

Definition at line 763 of file PlayerHooks.cs.

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

Definition at line 804 of file PlayerHooks.cs.

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

Definition at line 836 of file PlayerHooks.cs.

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

Definition at line 866 of file PlayerHooks.cs.

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

Definition at line 608 of file PlayerHooks.cs.

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

Definition at line 1110 of file PlayerHooks.cs.

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

Definition at line 1082 of file PlayerHooks.cs.

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

Definition at line 1091 of file PlayerHooks.cs.

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

Definition at line 1183 of file PlayerHooks.cs.

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

Definition at line 483 of file PlayerHooks.cs.

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

Definition at line 525 of file PlayerHooks.cs.

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

Definition at line 1221 of file PlayerHooks.cs.

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

Definition at line 188 of file PlayerHooks.cs.

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

Definition at line 1164 of file PlayerHooks.cs.

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

Definition at line 443 of file PlayerHooks.cs.

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

Definition at line 386 of file PlayerHooks.cs.

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

Definition at line 411 of file PlayerHooks.cs.

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

Definition at line 419 of file PlayerHooks.cs.

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

Definition at line 427 of file PlayerHooks.cs.

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

Definition at line 461 of file PlayerHooks.cs.

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

Definition at line 514 of file PlayerHooks.cs.

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

Definition at line 493 of file PlayerHooks.cs.

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

Definition at line 180 of file PlayerHooks.cs.

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

Definition at line 362 of file PlayerHooks.cs.

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

Definition at line 378 of file PlayerHooks.cs.

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

Definition at line 435 of file PlayerHooks.cs.

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

Definition at line 662 of file PlayerHooks.cs.

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

Definition at line 82 of file PlayerHooks.cs.

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

Definition at line 36 of file PlayerHooks.cs.

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

Definition at line 308 of file PlayerHooks.cs.

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

Definition at line 223 of file PlayerHooks.cs.

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

Definition at line 370 of file PlayerHooks.cs.

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

Definition at line 98 of file PlayerHooks.cs.

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

Definition at line 99 of file PlayerHooks.cs.

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

Definition at line 1118 of file PlayerHooks.cs.

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

Definition at line 711 of file PlayerHooks.cs.

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

Definition at line 300 of file PlayerHooks.cs.

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

Definition at line 354 of file PlayerHooks.cs.

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

Definition at line 329 of file PlayerHooks.cs.

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

Definition at line 196 of file PlayerHooks.cs.

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

Definition at line 284 of file PlayerHooks.cs.

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

Definition at line 90 of file PlayerHooks.cs.

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

Definition at line 395 of file PlayerHooks.cs.

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

Definition at line 337 of file PlayerHooks.cs.

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

Definition at line 403 of file PlayerHooks.cs.

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

Definition at line 533 of file PlayerHooks.cs.

readonly IDictionary<string, int> Terraria.ModLoader.PlayerHooks.indexes = new Dictionary<string, int>()
staticprivate

Definition at line 23 of file PlayerHooks.cs.

readonly IDictionary<Type, int> Terraria.ModLoader.PlayerHooks.indexesByType = new Dictionary<Type, int>()
staticprivate

Definition at line 24 of file PlayerHooks.cs.

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

Definition at line 22 of file PlayerHooks.cs.