|
@@ -52,7 +52,6 @@ namespace GFGGame
|
|
if (_friendDic.ContainsKey(roleInfo.roleId))
|
|
if (_friendDic.ContainsKey(roleInfo.roleId))
|
|
{
|
|
{
|
|
_friendDic[roleInfo.roleId].roleInfo = roleInfo;
|
|
_friendDic[roleInfo.roleId].roleInfo = roleInfo;
|
|
- UpdateFriendList(false);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void ChangeGiveGiftStates(long roleId, int state)
|
|
public void ChangeGiveGiftStates(long roleId, int state)
|
|
@@ -60,7 +59,6 @@ namespace GFGGame
|
|
if (_friendDic.ContainsKey(roleId))
|
|
if (_friendDic.ContainsKey(roleId))
|
|
{
|
|
{
|
|
_friendDic[roleId].giveGiftState = state;
|
|
_friendDic[roleId].giveGiftState = state;
|
|
- UpdateFriendList(false);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void ChangeTakeGiftStates(long roleId, int state)
|
|
public void ChangeTakeGiftStates(long roleId, int state)
|
|
@@ -68,7 +66,6 @@ namespace GFGGame
|
|
if (_friendDic.ContainsKey(roleId))
|
|
if (_friendDic.ContainsKey(roleId))
|
|
{
|
|
{
|
|
_friendDic[roleId].takeGiftState = state;
|
|
_friendDic[roleId].takeGiftState = state;
|
|
- UpdateFriendList(false);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void ChangeGiveTakeGiftStates(long roleId, int state, int takeState)
|
|
public void ChangeGiveTakeGiftStates(long roleId, int state, int takeState)
|
|
@@ -77,10 +74,9 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_friendDic[roleId].giveGiftState = state;
|
|
_friendDic[roleId].giveGiftState = state;
|
|
_friendDic[roleId].takeGiftState = takeState;
|
|
_friendDic[roleId].takeGiftState = takeState;
|
|
- UpdateFriendList(false);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- private void UpdateFriendList(bool sort)
|
|
|
|
|
|
+ public void UpdateFriendList(bool sort)
|
|
{
|
|
{
|
|
_list = _friendDic.Values.ToList<FriendInfoData>();
|
|
_list = _friendDic.Values.ToList<FriendInfoData>();
|
|
if (!sort) return;
|
|
if (!sort) return;
|
|
@@ -172,7 +168,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- if (friendInfo.giveGiftState == (int)ConstGiveGiftStatus.Gave)
|
|
|
|
|
|
+ if (friendInfo.giveGiftState == (int)ConstGiveGiftStatus.Gave && friendInfo.takeGiftState != ConstBonusStatus.GOT)
|
|
{
|
|
{
|
|
return 2;
|
|
return 2;
|
|
}
|
|
}
|