|
@@ -88,12 +88,10 @@ namespace GFGGame
|
|
{
|
|
{
|
|
GObject obj = context.data as GObject;
|
|
GObject obj = context.data as GObject;
|
|
long selectPictureId = (long)obj.data;
|
|
long selectPictureId = (long)obj.data;
|
|
- UpdatePhotoData();
|
|
|
|
|
|
+
|
|
if (selectPictureId == _showPictureId)//删除:点击相同id照片
|
|
if (selectPictureId == _showPictureId)//删除:点击相同id照片
|
|
{
|
|
{
|
|
RoleDataManager.photoDatas[_showIndex] = 0;
|
|
RoleDataManager.photoDatas[_showIndex] = 0;
|
|
-
|
|
|
|
- UpdatePhotoData();
|
|
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -127,41 +125,13 @@ namespace GFGGame
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ RoleDataManager.UpdatePhotoData();
|
|
bool result = await RoleInfoSProxy.ReqModifyShowPhoto(RoleDataManager.photoDatas);
|
|
bool result = await RoleInfoSProxy.ReqModifyShowPhoto(RoleDataManager.photoDatas);
|
|
if (result)
|
|
if (result)
|
|
{
|
|
{
|
|
Hide();
|
|
Hide();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- private void UpdatePhotoData()
|
|
|
|
- {
|
|
|
|
- List<long> numArr = new List<long>();
|
|
|
|
- // 提取有数据的位置
|
|
|
|
- for(int i=0;i< RoleDataManager.photoDatas.Count; i++)
|
|
|
|
- {
|
|
|
|
- if (RoleDataManager.photoDatas[i] != 0)
|
|
|
|
- {
|
|
|
|
- numArr.Add(RoleDataManager.photoDatas[i]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 找到可用空位赋值
|
|
|
|
- int index = 0;
|
|
|
|
- for (int i = 0; i < RoleDataManager.photoDatas.Count; i++)
|
|
|
|
- {
|
|
|
|
- if (RoleInfoManager.GetPosType(i) == MonthCardType.Gold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold)
|
|
|
|
-|| RoleInfoManager.GetPosType(i) == MonthCardType.BlackGold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
|
|
|
|
- {
|
|
|
|
- RoleDataManager.photoDatas[i] = -1;
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (index < numArr.Count)
|
|
|
|
- {
|
|
|
|
- RoleDataManager.photoDatas[i] = numArr[index++];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|