mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 13:24:36 +01:00
Fix relics/lightcones not applying after switching paths
This commit is contained in:
@@ -243,20 +243,18 @@ public class GameAvatar implements GameEntity, IAvatar {
|
|||||||
.setIsMarked(this.isMarked())
|
.setIsMarked(this.isMarked())
|
||||||
.setFirstMetTimestamp(this.getTimestamp());
|
.setFirstMetTimestamp(this.getTimestamp());
|
||||||
|
|
||||||
if (!this.hasMultiPath()) {
|
for (var equip : this.getEquips().values()) {
|
||||||
for (var equip : this.getEquips().values()) {
|
if (equip.getItemMainType() == ItemMainType.Relic) {
|
||||||
if (equip.getItemMainType() == ItemMainType.Relic) {
|
proto.addEquipRelicList(EquipRelic.newInstance().setSlot(equip.getEquipSlot()).setRelicUniqueId(equip.getInternalUid()));
|
||||||
proto.addEquipRelicList(EquipRelic.newInstance().setSlot(equip.getEquipSlot()).setRelicUniqueId(equip.getInternalUid()));
|
} else if (equip.getItemMainType() == ItemMainType.Equipment) {
|
||||||
} else if (equip.getItemMainType() == ItemMainType.Equipment) {
|
proto.setEquipmentUniqueId(equip.getInternalUid());
|
||||||
proto.setEquipmentUniqueId(equip.getInternalUid());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var skill : getSkills().entrySet()) {
|
|
||||||
proto.addSkilltreeList(AvatarSkillTree.newInstance().setPointId(skill.getKey()).setLevel(skill.getValue()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var skill : getSkills().entrySet()) {
|
||||||
|
proto.addSkilltreeList(AvatarSkillTree.newInstance().setPointId(skill.getKey()).setLevel(skill.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < this.getPromotion(); i++) {
|
for (int i = 0; i < this.getPromotion(); i++) {
|
||||||
if (this.hasTakenReward(i)) {
|
if (this.hasTakenReward(i)) {
|
||||||
proto.addTakenRewards(i);
|
proto.addTakenRewards(i);
|
||||||
|
|||||||
@@ -483,12 +483,8 @@ public class Player implements Tickable {
|
|||||||
this.getCurAvatarPaths().put(excel.getBaseAvatarID(), pathId);
|
this.getCurAvatarPaths().put(excel.getBaseAvatarID(), pathId);
|
||||||
|
|
||||||
// Sync with client
|
// Sync with client
|
||||||
this.sendPacket(new PacketPlayerSyncScNotify(path));
|
|
||||||
for (var item : avatar.getEquips().values()) {
|
|
||||||
this.sendPacket(new PacketPlayerSyncScNotify(item));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sendPacket(new PacketAvatarPathChangedNotify(avatar, path));
|
this.sendPacket(new PacketAvatarPathChangedNotify(avatar, path));
|
||||||
|
this.sendPacket(new PacketPlayerSyncScNotify(avatar));
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
return pathId;
|
return pathId;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ public class PacketGetMultiPathAvatarInfoScRsp extends BasePacket {
|
|||||||
|
|
||||||
for (AvatarMultiPath path : player.getAvatars().getMultiPaths().values()) {
|
for (AvatarMultiPath path : player.getAvatars().getMultiPaths().values()) {
|
||||||
data.addMultiPathAvatarInfoList(path.toProto());
|
data.addMultiPathAvatarInfoList(path.toProto());
|
||||||
data.addBasicTypeIdList(path.getExcelId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var entry : player.getCurAvatarPaths().entrySet()) {
|
for (var entry : player.getCurAvatarPaths().entrySet()) {
|
||||||
@@ -25,6 +24,7 @@ public class PacketGetMultiPathAvatarInfoScRsp extends BasePacket {
|
|||||||
.setValueValue(entry.getValue());
|
.setValueValue(entry.getValue());
|
||||||
|
|
||||||
data.addCurAvatarPath(info);
|
data.addCurAvatarPath(info);
|
||||||
|
data.addBasicTypeIdList(entry.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setData(data);
|
this.setData(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user