|
@@ -1,13 +1,14 @@
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using System.Collections;
|
|
using System.Collections;
|
|
|
|
+using ET;
|
|
|
|
+
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
public class CustomSuitDataManager
|
|
public class CustomSuitDataManager
|
|
{
|
|
{
|
|
- private static int _currentIndex = 0;
|
|
|
|
public static int currentIndex
|
|
public static int currentIndex
|
|
{
|
|
{
|
|
- get {return _currentIndex;}
|
|
|
|
|
|
+ get { return StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_CUSTOME_SUIT_INDEX); }
|
|
}
|
|
}
|
|
|
|
|
|
private static Dictionary<int, CustomSuitData> _dataDic = new Dictionary<int, CustomSuitData>();
|
|
private static Dictionary<int, CustomSuitData> _dataDic = new Dictionary<int, CustomSuitData>();
|
|
@@ -64,19 +65,16 @@ namespace GFGGame
|
|
{
|
|
{
|
|
if(currentIndex != index)
|
|
if(currentIndex != index)
|
|
{
|
|
{
|
|
- _currentIndex = index;
|
|
|
|
- GameProxy.ReqUpdateRoleSuitIndex(index);
|
|
|
|
|
|
+ StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_CUSTOME_SUIT_INDEX ,index).Coroutine();
|
|
}
|
|
}
|
|
SaveSuit(currentIndex, EquipDataCache.cacher.equipDatas, EquipDataCache.cacher.bgId, EquipDataCache.cacher.suitId, EquipDataCache.cacher.picStatus);
|
|
SaveSuit(currentIndex, EquipDataCache.cacher.equipDatas, EquipDataCache.cacher.bgId, EquipDataCache.cacher.suitId, EquipDataCache.cacher.picStatus);
|
|
}
|
|
}
|
|
|
|
|
|
public static void InitServerData(int suitIndex, List<RoleSuit> list)
|
|
public static void InitServerData(int suitIndex, List<RoleSuit> list)
|
|
{
|
|
{
|
|
- _currentIndex = 0;
|
|
|
|
_dataDic.Clear();
|
|
_dataDic.Clear();
|
|
if(list != null)
|
|
if(list != null)
|
|
{
|
|
{
|
|
- _currentIndex = suitIndex;
|
|
|
|
foreach(RoleSuit roleSuit in list)
|
|
foreach(RoleSuit roleSuit in list)
|
|
{
|
|
{
|
|
CustomSuitData suitSavedData = new CustomSuitData(roleSuit.pos);
|
|
CustomSuitData suitSavedData = new CustomSuitData(roleSuit.pos);
|