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.
27 lines
722 B
27 lines
722 B
using System; |
|
|
|
namespace ET |
|
{ |
|
public class C2M_DropItemHandler: AMActorLocationRpcHandler<Unit, C2M_DropItem, M2C_DropItem> |
|
{ |
|
protected override async ETTask Run(Unit unit, C2M_DropItem request, M2C_DropItem response, Action reply) |
|
{ |
|
try |
|
{ |
|
var res = StoreOperate.DropItem(unit, request.ConfigId, request.Amount); |
|
response.Error = res; |
|
reply(); |
|
} |
|
catch (Exception e) |
|
{ |
|
response.Message = e.ToString(); |
|
response.Error = ErrorCode.ERR_DropError; |
|
reply(); |
|
} |
|
|
|
await ETTask.CompletedTask; |
|
} |
|
} |
|
} |
|
|
|
|
|
|