本文整理汇总了C#中DOL.Database.ItemTemplate.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# ItemTemplate.GetName方法的具体用法?C# ItemTemplate.GetName怎么用?C# ItemTemplate.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOL.Database.ItemTemplate
的用法示例。
在下文中一共展示了ItemTemplate.GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GiveItem
protected static void GiveItem(GameLiving source, GamePlayer player, ItemTemplate itemTemplate)
{
itemTemplate.AllowAdd = true;
if (GameServer.Database.SelectObject<ItemTemplate>("Id_nb = '" + itemTemplate.Id_nb + "'") == null)
{
GameServer.Database.AddObject(itemTemplate);
}
//ameInventoryItem.Create<ItemTemplate>(itemTemplate);
InventoryItem item = GameInventoryItem.Create<ItemTemplate>(itemTemplate);
if (player.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, item))
{
if (source == null) { player.Out.SendMessage("You receive the " + itemTemplate.Name + ".", eChatType.CT_System, eChatLoc.CL_SystemWindow); }
else { player.Out.SendMessage("You receive " + itemTemplate.GetName(0, false) + " from " + source.GetName(0, false) + ".", eChatType.CT_System, eChatLoc.CL_SystemWindow); }
}
else { player.CreateItemOnTheGround(item); player.Out.SendMessage("Your Inventory is full. You couldn't recieve the " + itemTemplate.Name + ",so it's been placed on the ground. Pick it up as soon as possible or it will vanish in a few minutes.", eChatType.CT_Important, eChatLoc.CL_PopupWindow); }
}