21 lines
464 B
C#
21 lines
464 B
C#
namespace ET.Server
|
|
{
|
|
public static class BagMapper
|
|
{
|
|
public static ItemInfo ToProto(ItemUnit unit)
|
|
{
|
|
if (unit == null)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
ItemInfo info = ItemInfo.Create();
|
|
info.itemIndex = unit.ItemIndex;
|
|
info.itemId = unit.ItemId;
|
|
info.count = unit.Count;
|
|
info.heroId = unit.HeroId;
|
|
return info;
|
|
}
|
|
}
|
|
}
|