Add embryos for all skill depots for the main characters

This commit is contained in:
Melledy
2022-06-16 07:54:53 -07:00
parent fa4b768d0d
commit ac49114c45
9 changed files with 214 additions and 44 deletions

View File

@@ -0,0 +1,24 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.AvatarChangeElementTypeRspOuterClass.AvatarChangeElementTypeRsp;
public class PacketAvatarChangeElementTypeRsp extends BasePacket {
public PacketAvatarChangeElementTypeRsp() {
super(PacketOpcodes.AvatarChangeElementTypeRsp);
}
public PacketAvatarChangeElementTypeRsp(int retcode) {
super(PacketOpcodes.AvatarChangeElementTypeRsp);
if (retcode > 0) {
AvatarChangeElementTypeRsp proto = AvatarChangeElementTypeRsp.newBuilder()
.setRetcode(retcode)
.build();
this.setData(proto);
}
}
}

View File

@@ -0,0 +1,26 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.AvatarSkillDepotChangeNotifyOuterClass.AvatarSkillDepotChangeNotify;
public class PacketAvatarSkillDepotChangeNotify extends BasePacket {
public PacketAvatarSkillDepotChangeNotify(Avatar avatar) {
super(PacketOpcodes.AvatarSkillDepotChangeNotify);
AvatarSkillDepotChangeNotify proto = AvatarSkillDepotChangeNotify.newBuilder()
.setAvatarGuid(avatar.getGuid())
.setEntityId(avatar.getEntityId())
.setSkillDepotId(avatar.getSkillDepotId())
.setCoreProudSkillLevel(avatar.getCoreProudSkillLevel())
.addAllTalentIdList(avatar.getTalentIdList())
.addAllProudSkillList(avatar.getProudSkillList())
.putAllSkillLevelMap(avatar.getSkillLevelMap())
.putAllProudSkillExtraLevelMap(avatar.getProudSkillBonusMap())
.build();
this.setData(proto);
}
}