Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ QuickBuff_ShouldBotherUsingThisBuff()

bool Terraria.Player.QuickBuff_ShouldBotherUsingThisBuff ( int attemptedType)
inlineprivate

Definition at line 4970 of file Player.cs.

4971 {
4972 bool result = true;
4973 for (int i = 0; i < maxBuffs; i++)
4974 {
4975 if (attemptedType == 27 && (buffType[i] == 27 || buffType[i] == 101 || buffType[i] == 102))
4976 {
4977 result = false;
4978 break;
4979 }
4981 {
4982 result = false;
4983 break;
4984 }
4985 if (buffType[i] == attemptedType)
4986 {
4987 result = false;
4988 break;
4989 }
4990 if (Main.meleeBuff[attemptedType] && Main.meleeBuff[buffType[i]])
4991 {
4992 result = false;
4993 break;
4994 }
4995 }
4996 if (Main.lightPet[attemptedType] || Main.vanityPet[attemptedType])
4997 {
4998 for (int j = 0; j < maxBuffs; j++)
4999 {
5000 if (Main.lightPet[buffType[j]] && Main.lightPet[attemptedType])
5001 {
5002 result = false;
5003 }
5004 if (Main.vanityPet[buffType[j]] && Main.vanityPet[attemptedType])
5005 {
5006 result = false;
5007 }
5008 }
5009 }
5010 return result;
5011 }
static bool[] IsWellFed
Definition BuffID.cs:18
static readonly int maxBuffs
Definition Player.cs:1191

References Terraria.Player.buffType, Terraria.ID.BuffID.Sets.IsWellFed, Terraria.Main.lightPet, Terraria.Player.maxBuffs, Terraria.Main.meleeBuff, and Terraria.Main.vanityPet.

Referenced by Terraria.Player.QuickBuff().