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

◆ ModifyShopPrice()

void Terraria.GameContent.Personalities.NPCPreferenceTrait.ModifyShopPrice ( HelperInfo info,
ShopHelper shopHelperInstance )
inline

Implements Terraria.GameContent.Personalities.IShopPersonalityTrait.

Definition at line 9 of file NPCPreferenceTrait.cs.

10 {
11 if (info.nearbyNPCsByType[NpcId])
12 {
13 switch (Level)
14 {
15 case AffectionLevel.Love:
16 shopHelperInstance.LoveNPC(NpcId);
17 break;
18 case AffectionLevel.Like:
19 shopHelperInstance.LikeNPC(NpcId);
20 break;
21 case AffectionLevel.Dislike:
22 shopHelperInstance.DislikeNPC(NpcId);
23 break;
24 case AffectionLevel.Hate:
25 shopHelperInstance.HateNPC(NpcId);
26 break;
27 }
28 }
29 }

References Terraria.GameContent.ShopHelper.DislikeNPC(), Terraria.GameContent.ShopHelper.HateNPC(), Terraria.GameContent.Personalities.NPCPreferenceTrait.Level, Terraria.GameContent.ShopHelper.LikeNPC(), Terraria.GameContent.ShopHelper.LoveNPC(), and Terraria.GameContent.Personalities.NPCPreferenceTrait.NpcId.