mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-22 11:54:39 +01:00
[Anime Game Version update] Support 2.7 (#1072)
* feature(2.7 version): support 2.7 version & upload new protos 1. Support GC in GI 2.7.0; 2. Upload new protos; 3. Fix some bugs cuz by new protos. BREAKING CHANGE: all * fix(database helper): fix player uid issues * fix(ability embryo): uint32 to fixed32 * fix(proto): map mark rename MAP_MARK_FROM_TYPE_NOE to MAP_MARK_FROM_TYPE_NONE * fix(game version): change game version to 2.7.0 * perf(proto): remove unused protos 1. Remove unused protos; 2. Temporarily commented out some of the proto fields. * fix(proto): uint32 to fixed32
This commit is contained in:
@@ -21,9 +21,9 @@ public class InvokeHandler<T> {
|
||||
|
||||
public synchronized void addEntry(ForwardType forward, T entry) {
|
||||
switch (forward) {
|
||||
case FORWARD_TO_ALL -> entryListForwardAll.add(entry);
|
||||
case FORWARD_TO_ALL_EXCEPT_CUR, FORWARD_TO_ALL_EXIST_EXCEPT_CUR -> entryListForwardAllExceptCur.add(entry);
|
||||
case FORWARD_TO_HOST -> entryListForwardHost.add(entry);
|
||||
case FORWARD_TYPE_TO_ALL -> entryListForwardAll.add(entry);
|
||||
case FORWARD_TYPE_TO_ALL_EXCEPT_CUR, FORWARD_TYPE_TO_ALL_EXIST_EXCEPT_CUR -> entryListForwardAllExceptCur.add(entry);
|
||||
case FORWARD_TYPE_TO_HOST -> entryListForwardHost.add(entry);
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ public class Player {
|
||||
}
|
||||
|
||||
public MpSettingType getMpSetting() {
|
||||
return MpSettingType.MP_SETTING_ENTER_AFTER_APPLY; // TEMP
|
||||
return MpSettingType.MP_SETTING_TYPE_ENTER_AFTER_APPLY; // TEMP
|
||||
}
|
||||
|
||||
public Queue<AttackResult> getAttackResults() {
|
||||
@@ -928,9 +928,9 @@ public class Player {
|
||||
boolean success = getInventory().addItem(item, ActionReason.SubfieldDrop);
|
||||
if (success) {
|
||||
if (!drop.isShare()) // not shared drop
|
||||
this.sendPacket(new PacketGadgetInteractRsp(drop, InteractType.INTERACT_PICK_ITEM));
|
||||
this.sendPacket(new PacketGadgetInteractRsp(drop, InteractType.INTERACT_TYPE_PICK_ITEM));
|
||||
else
|
||||
this.getScene().broadcastPacket(new PacketGadgetInteractRsp(drop, InteractType.INTERACT_PICK_ITEM));
|
||||
this.getScene().broadcastPacket(new PacketGadgetInteractRsp(drop, InteractType.INTERACT_TYPE_PICK_ITEM));
|
||||
}
|
||||
} else if (entity instanceof EntityGadget) {
|
||||
EntityGadget gadget = (EntityGadget) entity;
|
||||
@@ -940,7 +940,7 @@ public class Player {
|
||||
scene.getChallenge().getStatueDrops(this);
|
||||
}
|
||||
|
||||
this.sendPacket(new PacketGadgetInteractRsp(gadget, InteractType.INTERACT_OPEN_STATUE));
|
||||
this.sendPacket(new PacketGadgetInteractRsp(gadget, InteractType.INTERACT_TYPE_OPEN_STATUE));
|
||||
}
|
||||
} else {
|
||||
// Delete directly
|
||||
@@ -1131,7 +1131,10 @@ public class Player {
|
||||
while (it.hasNext()) {
|
||||
CoopRequest req = it.next();
|
||||
if (req.isExpired()) {
|
||||
req.getRequester().sendPacket(new PacketPlayerApplyEnterMpResultNotify(this, false, PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify.Reason.SYSTEM_JUDGE));
|
||||
req.getRequester().sendPacket(new PacketPlayerApplyEnterMpResultNotify(
|
||||
this,
|
||||
false,
|
||||
PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify.Reason.REASON_SYSTEM_JUDGE));
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ public class TeamManager {
|
||||
this.setCurrentCharacterIndex(index);
|
||||
|
||||
// Old entity motion state
|
||||
oldEntity.setMotionState(MotionState.MOTION_STANDBY);
|
||||
oldEntity.setMotionState(MotionState.MOTION_STATE_STANDBY);
|
||||
|
||||
// Remove and Add
|
||||
getPlayer().getScene().replaceEntity(oldEntity, newEntity);
|
||||
@@ -571,7 +571,7 @@ public class TeamManager {
|
||||
PlayerDieType dieType = deadAvatar.getKilledType();
|
||||
int killedBy = deadAvatar.getKilledBy();
|
||||
|
||||
if (dieType == PlayerDieType.PLAYER_DIE_DRAWN) {
|
||||
if (dieType == PlayerDieType.PLAYER_DIE_TYPE_DRAWN) {
|
||||
// Died in water. Do not replace
|
||||
// The official server has skipped this notify and will just respawn the team immediately after the animation.
|
||||
// TODO: Perhaps find a way to get vanilla experience?
|
||||
@@ -669,7 +669,7 @@ public class TeamManager {
|
||||
}
|
||||
|
||||
// Teleport player
|
||||
getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(getPlayer(), EnterType.ENTER_SELF, EnterReason.Revival, 3, GameConstants.START_POSITION));
|
||||
getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, 3, GameConstants.START_POSITION));
|
||||
|
||||
// Set player position
|
||||
player.setSceneId(3);
|
||||
|
||||
Reference in New Issue
Block a user