You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
715 B
25 lines
715 B
namespace ET |
|
{ |
|
[FriendClass(typeof(Item))] |
|
public static class ItemSystem |
|
{ |
|
public static void FromMessage(this Item self, ItemProto itemProto) |
|
{ |
|
self.Id = itemProto.Id; |
|
self.ConfigId = itemProto.ConfigId; |
|
self.CreateTime = itemProto.CreateTime; |
|
self.Amount = itemProto.Amount; |
|
|
|
} |
|
|
|
public static ItemProto ToMessage(this Item self) |
|
{ |
|
ItemProto itemProto = new ItemProto(); |
|
itemProto.Id = self.Id; |
|
itemProto.ConfigId = self.ConfigId; |
|
itemProto.CreateTime = self.CreateTime; |
|
itemProto.Amount = self.Amount; |
|
return itemProto; |
|
} |
|
} |
|
} |