mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 18:12:53 +08:00
Remove obsolete code
This commit is contained in:
parent
3e6b38c407
commit
52ac9cd75e
@ -438,11 +438,6 @@ public final class TeamManager extends BasePlayerDataManager {
|
|||||||
this.usingTrialTeam = true;
|
this.usingTrialTeam = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Displays the trial avatars. Picks the last avatar in the team. */
|
|
||||||
public void trialAvatarTeamPostUpdate() {
|
|
||||||
this.trialAvatarTeamPostUpdate(this.getActiveTeam().size() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the trial avatars.
|
* Displays the trial avatars.
|
||||||
*
|
*
|
||||||
@ -1035,7 +1030,7 @@ public final class TeamManager extends BasePlayerDataManager {
|
|||||||
this.addTrialAvatar(
|
this.addTrialAvatar(
|
||||||
trialAvatarId,
|
trialAvatarId,
|
||||||
questId,
|
questId,
|
||||||
questId == 0
|
questId != 0
|
||||||
? GrantReason.GRANT_REASON_BY_QUEST
|
? GrantReason.GRANT_REASON_BY_QUEST
|
||||||
: GrantReason.GRANT_REASON_BY_TRIAL_AVATAR_ACTIVITY);
|
: GrantReason.GRANT_REASON_BY_TRIAL_AVATAR_ACTIVITY);
|
||||||
|
|
||||||
@ -1073,11 +1068,11 @@ public final class TeamManager extends BasePlayerDataManager {
|
|||||||
public void removeTrialAvatar(List<Integer> trialAvatarIds) {
|
public void removeTrialAvatar(List<Integer> trialAvatarIds) {
|
||||||
if (!this.isUsingTrialTeam()) throw new RuntimeException("Player is not using a trial team.");
|
if (!this.isUsingTrialTeam()) throw new RuntimeException("Player is not using a trial team.");
|
||||||
|
|
||||||
|
this.removeTrialAvatarTeam(trialAvatarIds);
|
||||||
this.getPlayer()
|
this.getPlayer()
|
||||||
.sendPacket(
|
.sendPacket(
|
||||||
new PacketAvatarDelNotify(
|
new PacketAvatarDelNotify(
|
||||||
trialAvatarIds.stream().map(this::getTrialAvatarGuid).toList()));
|
trialAvatarIds.stream().map(this::getTrialAvatarGuid).toList()));
|
||||||
this.removeTrialAvatarTeam(trialAvatarIds);
|
|
||||||
|
|
||||||
// Update the team.
|
// Update the team.
|
||||||
if (trialAvatarIds.size() == 1) this.getPlayer().sendPacket(new PacketAvatarTeamUpdateNotify());
|
if (trialAvatarIds.size() == 1) this.getPlayer().sendPacket(new PacketAvatarTeamUpdateNotify());
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package emu.grasscutter.server.packet.send;
|
package emu.grasscutter.server.packet.send;
|
||||||
|
|
||||||
import emu.grasscutter.game.entity.EntityAvatar;
|
|
||||||
import emu.grasscutter.game.player.Player;
|
import emu.grasscutter.game.player.Player;
|
||||||
import emu.grasscutter.net.packet.BasePacket;
|
import emu.grasscutter.net.packet.BasePacket;
|
||||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||||
@ -13,12 +12,12 @@ public class PacketSceneTeamUpdateNotify extends BasePacket {
|
|||||||
public PacketSceneTeamUpdateNotify(Player player) {
|
public PacketSceneTeamUpdateNotify(Player player) {
|
||||||
super(PacketOpcodes.SceneTeamUpdateNotify);
|
super(PacketOpcodes.SceneTeamUpdateNotify);
|
||||||
|
|
||||||
SceneTeamUpdateNotify.Builder proto =
|
var proto = SceneTeamUpdateNotify.newBuilder()
|
||||||
SceneTeamUpdateNotify.newBuilder().setIsInMp(player.getWorld().isMultiplayer());
|
.setIsInMp(player.getWorld().isMultiplayer());
|
||||||
|
|
||||||
for (Player p : player.getWorld().getPlayers()) {
|
for (var p : player.getWorld().getPlayers()) {
|
||||||
for (EntityAvatar entityAvatar : p.getTeamManager().getActiveTeam()) {
|
for (var entityAvatar : p.getTeamManager().getActiveTeam()) {
|
||||||
SceneTeamAvatar.Builder avatarProto =
|
var avatarProto =
|
||||||
SceneTeamAvatar.newBuilder()
|
SceneTeamAvatar.newBuilder()
|
||||||
.setPlayerUid(p.getUid())
|
.setPlayerUid(p.getUid())
|
||||||
.setAvatarGuid(entityAvatar.getAvatar().getGuid())
|
.setAvatarGuid(entityAvatar.getAvatar().getGuid())
|
||||||
|
Loading…
Reference in New Issue
Block a user