好友赠送友情点
parent
c70ea68e76
commit
cc1a749227
|
@ -26,6 +26,7 @@ public class SSpecialConfig implements BaseConfig {
|
|||
public static final String EQUIPSIGN_LIMIT = "EquipSign_limit";//仓库中的魂印上限
|
||||
public static final String FRIENDAMOUNT_LIMIT = "FriendAmount_limit";//好友上限
|
||||
public static final String FRIENDAPPLYAMOUNT_LIMIT = "FriendApplyAmount_limit";//好友申请上限
|
||||
public static final String Friend_Gift = "Friend_Gift";//好友赠送友情点
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -511,7 +511,7 @@ public class FriendLogic {
|
|||
MessageUtil.sendErrorResponse(iSession, 0, msgId, "已超过当日领取上限");
|
||||
return;
|
||||
}
|
||||
int itemNum = 0;
|
||||
StringBuilder reward=new StringBuilder();
|
||||
if (type ==1){ //领取一个人
|
||||
if (!friends.contains(friendId)) {
|
||||
MessageUtil.sendErrorResponse(iSession, 0, msgId, "没有该好友");
|
||||
|
@ -522,7 +522,7 @@ public class FriendLogic {
|
|||
return;
|
||||
}
|
||||
|
||||
itemNum= 10;
|
||||
reward.append(SSpecialConfig.getStringValue(SSpecialConfig.Friend_Gift));
|
||||
friendManager.updateHaveRewardMap(friendId,2);
|
||||
playerInfoManager.updateVipPrivilage(SGameSetting.getGameSetting().getMaxEnergyGet(),1);
|
||||
receieveFriends.add(friendId);
|
||||
|
@ -537,16 +537,17 @@ public class FriendLogic {
|
|||
}
|
||||
playerInfoManager.updateVipPrivilage(SGameSetting.getGameSetting().getMaxEnergyGet(),1);
|
||||
friendManager.updateHaveRewardMap(friend,2);
|
||||
itemNum += 10;
|
||||
reward.append(SSpecialConfig.getStringValue(SSpecialConfig.Friend_Gift));
|
||||
receieveFriends.add(friend);
|
||||
}
|
||||
}
|
||||
String reward = GlobalItemType.STAMINA +"#"+itemNum;
|
||||
if (itemNum == 0){
|
||||
|
||||
String rewardStr = reward.toString();
|
||||
if (StringUtil.isEmpty(rewardStr)){
|
||||
MessageUtil.sendErrorResponse(iSession, 0, msgId, "已领取赠礼");
|
||||
return;
|
||||
}
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, StringUtil.parseFiledInt2(reward), BIReason.FRIEND_GIVE);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, StringUtil.parseFiledInt2(rewardStr), BIReason.FRIEND_GIVE);
|
||||
PlayerInfoProto.FriendTakeHeartResponse friendTakeHeartResponse = PlayerInfoProto.FriendTakeHeartResponse
|
||||
.newBuilder().setDrop(drop).addAllFriendId(receieveFriends)
|
||||
.build();
|
||||
|
|
Loading…
Reference in New Issue