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

◆ GetShopName()

static string Terraria.ModLoader.NPCShopDatabase.GetShopName ( int npcType,
string shopName = "Shop" )
inlinestatic

Gets a shop name (identifier) in the format matching P:Terraria.ModLoader.AbstractNPCShop.FullName
Can be used with M:Terraria.ModLoader.NPCShopDatabase.TryGetNPCShop(System.String,Terraria.ModLoader.AbstractNPCShop@) and M:Terraria.ModLoader.GlobalNPC.ModifyActiveShop(Terraria.NPC,System.String,Terraria.Item[])

Parameters
npcType
shopName
Returns

Definition at line 89 of file NPCShopDatabase.cs.

90 {
91 return ((npcType < NPCID.Count) ? ("Terraria/" + NPCID.Search.GetName(npcType)) : NPCLoader.GetNPC(npcType).FullName) + "/" + shopName;
92 }
static readonly short Count
Definition NPCID.cs:12909
static readonly IdDictionary Search
Definition NPCID.cs:12911

References Terraria.ID.NPCID.Count, Terraria.ModLoader.NPCLoader.GetNPC(), and Terraria.ID.NPCID.Search.

Referenced by Terraria.ModLoader.Default.PylonShopNPC.ModifyActiveShop(), Terraria.ModLoader.NPCLoader.OnChatButtonClicked(), and Terraria.ModLoader.NPCShopDatabase.RegisterVanillaNPCShops().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: