This commit is contained in:
Yazawazi 2022-04-23 22:16:59 +08:00 committed by GitHub
parent aa4489497e
commit ad1c3f9a3b

View File

@ -36,13 +36,14 @@ public class HandlerAvatarFetterLevelRewardReq extends PacketHandler {
if (session.getPlayer().getNameCardList().contains(cardId)) { if (session.getPlayer().getNameCardList().contains(cardId)) {
// Already got divorce certificate. // Already got divorce certificate.
session.send(new PacketAvatarFetterLevelRewardRsp(req.getAvatarGuid(), req.getFetterLevel())); session.getPlayer().sendPacket(new PacketAvatarFetterLevelRewardRsp(req.getAvatarGuid(), req.getFetterLevel()));
return; return;
} }
GenshinItem item = new GenshinItem(cardId); GenshinItem item = new GenshinItem(cardId);
session.getPlayer().getInventory().addItem(item);
session.getPlayer().sendPacket(new PacketItemAddHintNotify(item, ActionReason.FetterLevelReward)); session.getPlayer().sendPacket(new PacketItemAddHintNotify(item, ActionReason.FetterLevelReward));
session.send(new PacketUnlockNameCardNotify(cardId)); session.getPlayer().sendPacket(new PacketUnlockNameCardNotify(cardId));
session.send(new PacketAvatarFetterLevelRewardRsp(avatarGuid, req.getFetterLevel(), rewardId)); session.send(new PacketAvatarFetterLevelRewardRsp(avatarGuid, req.getFetterLevel(), rewardId));
} }
} }