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

◆ WouldNPCBeDiscouraged()

bool Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.WouldNPCBeDiscouraged ( Player playerTarget)
inline

Definition at line 226 of file CoinLossRevengeSystem.cs.

227 {
228 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
229 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
231 {
232 case 2:
233 return NPC.DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged(_npcTypeAgainstDiscouragement, playerTarget.position);
234 case 3:
235 return !NPC.DespawnEncouragement_AIStyle3_Fighters_NotDiscouraged(_npcTypeAgainstDiscouragement, playerTarget.position, null);
236 case 6:
237 {
238 bool flag = false;
240 {
241 case 513:
242 flag = !playerTarget.ZoneUndergroundDesert;
243 break;
244 case 10:
245 case 39:
246 case 95:
247 case 117:
248 case 510:
249 flag = true;
250 break;
251 }
252 if (flag)
253 {
254 return (double)playerTarget.position.Y < Main.worldSurface * 16.0;
255 }
256 return false;
257 }
258 default:
259 return _npcNetID switch
260 {
261 253 => !Main.eclipse,
262 490 => Main.dayTime,
263 _ => false,
264 };
265 }
266 }

References Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._npcAIStyleAgainstDiscouragement, Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._npcNetID, Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._npcTypeAgainstDiscouragement, Terraria.Main.dayTime, Terraria.NPC.DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged(), Terraria.NPC.DespawnEncouragement_AIStyle3_Fighters_NotDiscouraged(), and Terraria.Main.eclipse.

+ Here is the call graph for this function: