mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-30 12:10:40 +08: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:
committed by
Melledy
Unverified
parent
a95002fd40
commit
f139818224
+5
-5
@@ -28,12 +28,12 @@ public class HandlerCombatInvocationsNotify extends PacketHandler {
|
||||
CombatInvocationsNotify notif = CombatInvocationsNotify.parseFrom(payload);
|
||||
for (CombatInvokeEntry entry : notif.getInvokeListList()) {
|
||||
switch (entry.getArgumentType()) {
|
||||
case COMBAT_EVT_BEING_HIT:
|
||||
case COMBAT_TYPE_ARGUMENT_EVT_BEING_HIT:
|
||||
// Handle damage
|
||||
EvtBeingHitInfo hitInfo = EvtBeingHitInfo.parseFrom(entry.getCombatData());
|
||||
session.getPlayer().getAttackResults().add(hitInfo.getAttackResult());
|
||||
break;
|
||||
case ENTITY_MOVE:
|
||||
case COMBAT_TYPE_ARGUMENT_ENTITY_MOVE:
|
||||
// Handle movement
|
||||
EntityMoveInfo moveInfo = EntityMoveInfo.parseFrom(entry.getCombatData());
|
||||
GameEntity entity = session.getPlayer().getScene().getEntityById(moveInfo.getEntityId());
|
||||
@@ -55,13 +55,13 @@ public class HandlerCombatInvocationsNotify extends PacketHandler {
|
||||
|
||||
// MOTION_LAND_SPEED and MOTION_FALL_ON_GROUND arrive in different packets.
|
||||
// Cache land speed for later use.
|
||||
if (motionState == MotionState.MOTION_LAND_SPEED) {
|
||||
if (motionState == MotionState.MOTION_STATE_LAND_SPEED) {
|
||||
cachedLandingSpeed = motionInfo.getSpeed().getY();
|
||||
cachedLandingTimeMillisecond = System.currentTimeMillis();
|
||||
monitorLandingEvent = true;
|
||||
}
|
||||
if (monitorLandingEvent) {
|
||||
if (motionState == MotionState.MOTION_FALL_ON_GROUND) {
|
||||
if (motionState == MotionState.MOTION_STATE_FALL_ON_GROUND) {
|
||||
monitorLandingEvent = false;
|
||||
handleFallOnGround(session, entity, motionState);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class HandlerCombatInvocationsNotify extends PacketHandler {
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_CUR_HP, newHP);
|
||||
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_CUR_HP));
|
||||
if (newHP == 0) {
|
||||
session.getPlayer().getStaminaManager().killAvatar(session, entity, PlayerDieTypeOuterClass.PlayerDieType.PLAYER_DIE_FALL);
|
||||
session.getPlayer().getStaminaManager().killAvatar(session, entity, PlayerDieTypeOuterClass.PlayerDieType.PLAYER_DIE_TYPE_FALL);
|
||||
}
|
||||
cachedLandingSpeed = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user