|
@@ -1,4 +1,5 @@
|
|
|
-using System.Collections.Generic;
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
using ET;
|
|
|
|
|
|
namespace GFGGame
|
|
@@ -54,6 +55,27 @@ namespace GFGGame
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
+ public static async ETTask<int> GetItemAttributeInfos()
|
|
|
+ {
|
|
|
+ M2C_GetItemAttributeInfos m2C_GetItemAttributeInfos = null;
|
|
|
+ Session session = null;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
|
|
|
+ m2C_GetItemAttributeInfos = (M2C_GetItemAttributeInfos)await session.Call(new C2M_GetItemAttributeInfos());
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.Debug(e.ToString());
|
|
|
+ return ErrorCode.ERR_NetWorkError;
|
|
|
+ }
|
|
|
+ if (m2C_GetItemAttributeInfos.Error != ErrorCode.ERR_Success)
|
|
|
+ {
|
|
|
+ return m2C_GetItemAttributeInfos.Error;
|
|
|
+ }
|
|
|
+ ItemDataManager.InitServerDataItemAttribute(m2C_GetItemAttributeInfos.ItemAtrributes);
|
|
|
+ return ErrorCode.ERR_Success;
|
|
|
+ }
|
|
|
|
|
|
//设置物品已读
|
|
|
public static async ETTask<bool> ReqSetItemRead(int itemID)
|
|
@@ -79,6 +101,7 @@ namespace GFGGame
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
//使用背包物品
|
|
|
public static async ETTask<bool> ReqUseItem(int itemID, long count)
|
|
|
{
|