mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-19 02:15:45 +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:
@@ -106,15 +106,15 @@ public class EntityAvatar extends GameEntity {
|
||||
|
||||
@Override
|
||||
public void onDeath(int killerId) {
|
||||
this.killedType = PlayerDieType.PLAYER_DIE_KILL_BY_MONSTER;
|
||||
this.killedType = PlayerDieType.PLAYER_DIE_TYPE_KILL_BY_MONSTER;
|
||||
this.killedBy = killerId;
|
||||
clearEnergy(PropChangeReason.PROP_CHANGE_STATUE_RECOVER);
|
||||
clearEnergy(PropChangeReason.PROP_CHANGE_REASON_STATUE_RECOVER);
|
||||
}
|
||||
|
||||
public void onDeath(PlayerDieType dieType, int killerId) {
|
||||
this.killedType = dieType;
|
||||
this.killedBy = killerId;
|
||||
clearEnergy(PropChangeReason.PROP_CHANGE_STATUE_RECOVER);
|
||||
clearEnergy(PropChangeReason.PROP_CHANGE_REASON_STATUE_RECOVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,7 +123,7 @@ public class EntityAvatar extends GameEntity {
|
||||
|
||||
if (healed > 0f) {
|
||||
getScene().broadcastPacket(
|
||||
new PacketEntityFightPropChangeReasonNotify(this, FightProperty.FIGHT_PROP_CUR_HP, healed, PropChangeReason.PROP_CHANGE_ABILITY, ChangeHpReason.ChangeHpAddAbility)
|
||||
new PacketEntityFightPropChangeReasonNotify(this, FightProperty.FIGHT_PROP_CUR_HP, healed, PropChangeReason.PROP_CHANGE_REASON_ABILITY, ChangeHpReason.CHANGE_HP_REASON_CHANGE_HP_ADD_ABILITY)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public class EntityAvatar extends GameEntity {
|
||||
|
||||
SceneEntityInfo.Builder entityInfo = SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_AVATAR)
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_TYPE_AVATAR)
|
||||
.addAnimatorParaList(AnimatorParameterValueInfoPair.newBuilder())
|
||||
.setEntityClientData(EntityClientData.newBuilder())
|
||||
.setEntityAuthorityInfo(authority)
|
||||
|
||||
@@ -127,7 +127,7 @@ public class EntityClientGadget extends EntityBaseGadget {
|
||||
|
||||
SceneEntityInfo.Builder entityInfo = SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_GADGET)
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_TYPE_GADGET)
|
||||
.setMotionInfo(MotionInfo.newBuilder().setPos(getPosition().toProto()).setRot(getRotation().toProto()).setSpeed(Vector.newBuilder()))
|
||||
.addAnimatorParaList(AnimatorParameterValueInfoPair.newBuilder())
|
||||
.setEntityClientData(EntityClientData.newBuilder())
|
||||
|
||||
@@ -122,7 +122,7 @@ public class EntityGadget extends EntityBaseGadget {
|
||||
|
||||
SceneEntityInfo.Builder entityInfo = SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_GADGET)
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_TYPE_GADGET)
|
||||
.setMotionInfo(MotionInfo.newBuilder().setPos(getPosition().toProto()).setRot(getRotation().toProto()).setSpeed(Vector.newBuilder()))
|
||||
.addAnimatorParaList(AnimatorParameterValueInfoPair.newBuilder())
|
||||
.setEntityClientData(EntityClientData.newBuilder())
|
||||
|
||||
@@ -111,7 +111,7 @@ public class EntityItem extends EntityBaseGadget {
|
||||
|
||||
SceneEntityInfo.Builder entityInfo = SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_GADGET)
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_TYPE_GADGET)
|
||||
.setMotionInfo(MotionInfo.newBuilder().setPos(getPosition().toProto()).setRot(getRotation().toProto()).setSpeed(Vector.newBuilder()))
|
||||
.addAnimatorParaList(AnimatorParameterValueInfoPair.newBuilder())
|
||||
.setEntityClientData(EntityClientData.newBuilder())
|
||||
@@ -127,7 +127,7 @@ public class EntityItem extends EntityBaseGadget {
|
||||
SceneGadgetInfo.Builder gadgetInfo = SceneGadgetInfo.newBuilder()
|
||||
.setGadgetId(this.getItemData().getGadgetId())
|
||||
.setTrifleItem(this.getItem().toProto())
|
||||
.setBornType(GadgetBornType.GADGET_BORN_IN_AIR)
|
||||
.setBornType(GadgetBornType.GADGET_BORN_TYPE_IN_AIR)
|
||||
.setAuthorityPeerId(this.getWorld().getHostPeerId())
|
||||
.setIsEnableInteract(true);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ public class EntityMonster extends GameEntity {
|
||||
|
||||
SceneEntityInfo.Builder entityInfo = SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_MONSTER)
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_TYPE_MONSTER)
|
||||
.setMotionInfo(this.getMotionInfo())
|
||||
.addAnimatorParaList(AnimatorParameterValueInfoPair.newBuilder())
|
||||
.setEntityClientData(EntityClientData.newBuilder())
|
||||
@@ -240,7 +240,7 @@ public class EntityMonster extends GameEntity {
|
||||
.setAuthorityPeerId(getWorld().getHostPeerId())
|
||||
.setPoseId(this.getPoseId())
|
||||
.setBlockId(3001)
|
||||
.setBornType(MonsterBornType.MONSTER_BORN_DEFAULT)
|
||||
.setBornType(MonsterBornType.MONSTER_BORN_TYPE_DEFAULT)
|
||||
.setSpecialNameId(40);
|
||||
|
||||
if (getMonsterData().getDescribeData() != null) {
|
||||
|
||||
@@ -106,7 +106,7 @@ public class EntityVehicle extends EntityBaseGadget {
|
||||
|
||||
SceneEntityInfo.Builder entityInfo = SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_GADGET)
|
||||
.setEntityType(ProtEntityType.PROT_ENTITY_TYPE_GADGET)
|
||||
.setMotionInfo(MotionInfo.newBuilder().setPos(getPosition().toProto()).setRot(getRotation().toProto()).setSpeed(Vector.newBuilder()))
|
||||
.addAnimatorParaList(AnimatorParameterValueInfoPair.newBuilder())
|
||||
.setGadget(gadgetInfo)
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class GameEntity {
|
||||
|
||||
public GameEntity(Scene scene) {
|
||||
this.scene = scene;
|
||||
this.moveState = MotionState.MOTION_NONE;
|
||||
this.moveState = MotionState.MOTION_STATE_NONE;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
||||
Reference in New Issue
Block a user