mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-07 02:26:43 +01:00
Add support for v3.5.0 (#2090)
* Fix Dvalin battle See https://github.com/Anime-Game-Servers/Grasscutter-Quests/pull/25. This is entirely untested and there's a 99% chance it's broken, I'm just submitting it as a draft PR so that I don't forget about its existence. Co-Authored-By: mjolsic <21289772+mjolsic@users.noreply.github.com> * Update protos * 3.4 protos * Fix Now builds successfully, don't have the time to check if I should have specified true instead of false for withChildQuests, or if this functions as intended. * Change from false to true Per what smileoflove has been told on Discord * 3.5 * Remove the Dvalin crap from this PR Git is so confusing * Update version * Apply README changes from `origin/development` * Remove unnecessary debugging information --------- Co-authored-by: mjolsic <21289772+mjolsic@users.noreply.github.com> Co-authored-by: KingRainbow44 <kobedo11@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
|
||||
public final class GameConstants {
|
||||
public static String VERSION = "3.4.0";
|
||||
public static String VERSION = "3.5.0";
|
||||
|
||||
public static final int DEFAULT_TEAMS = 4;
|
||||
public static final int MAX_TEAMS = 10;
|
||||
|
||||
@@ -128,7 +128,7 @@ public class DataLoader {
|
||||
if (root.toFile().mkdirs())
|
||||
Grasscutter.getLogger().info("Created data folder '" + root + "'");
|
||||
|
||||
Grasscutter.getLogger().info("Creating default '" + name + "' data");
|
||||
Grasscutter.getLogger().debug("Creating default '" + name + "' data");
|
||||
FileUtils.copyResource("/defaults/data/" + name, filePath.toString());
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public class DataLoader {
|
||||
var path = GachaHandler.getGachaMappingsPath();
|
||||
if (!Files.exists(path)) {
|
||||
try {
|
||||
Grasscutter.getLogger().info("Creating default '" + path.toString() + "' data");
|
||||
Grasscutter.getLogger().debug("Creating default '" + path + "' data");
|
||||
Tools.createGachaMappings(path);
|
||||
} catch (Exception exception) {
|
||||
Grasscutter.getLogger().warn("Failed to create gacha mappings. \n" + exception);
|
||||
|
||||
@@ -2,9 +2,12 @@ package emu.grasscutter.game.player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
|
||||
import emu.grasscutter.data.excels.BuffData;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
@@ -97,27 +100,24 @@ public class PlayerBuffManager extends BasePlayerManager {
|
||||
.map(data -> data.modifiers.get(buffData.getModifierName()))
|
||||
.map(modifier -> modifier.onAdded)
|
||||
.map(onAdded -> {
|
||||
System.out.println("onAdded exists");
|
||||
boolean s = false;
|
||||
|
||||
var s = false;
|
||||
for (var a: onAdded) {
|
||||
switch (a.type) {
|
||||
case HealHP:
|
||||
System.out.println("Attempting heal");
|
||||
if (target == null) break;
|
||||
float maxHp = target.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP);
|
||||
float amount = a.amount.get() + a.amountByTargetMaxHPRatio.get() * maxHp;
|
||||
target.getAsEntity().heal(amount);
|
||||
s = true;
|
||||
System.out.printf("Healed {}", amount);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
Grasscutter.getLogger().debug("onAdded exists");
|
||||
if (Objects.requireNonNull(a.type) == AbilityModifierAction.Type.HealHP) {
|
||||
Grasscutter.getLogger().debug("Attempting heal");
|
||||
if (target == null) continue;
|
||||
var maxHp = target.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP);
|
||||
var amount = a.amount.get() + a.amountByTargetMaxHPRatio.get() * maxHp;
|
||||
target.getAsEntity().heal(amount);
|
||||
s = true;
|
||||
Grasscutter.getLogger().debug("Healed {}", amount);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
})
|
||||
.orElse(false);
|
||||
System.out.println("Oh no");
|
||||
Grasscutter.getLogger().debug("Oh no");
|
||||
|
||||
// Set duration
|
||||
if (duration < 0f) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -176,7 +176,7 @@ public class LuaSerializer implements Serializer {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().info(ScriptUtils.toMap(table).toString());
|
||||
Grasscutter.getLogger().debug(ScriptUtils.toMap(table).toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// removed due to proto not existing
|
||||
|
||||
/*
|
||||
package emu.grasscutter.server.packet.recv;
|
||||
|
||||
import emu.grasscutter.net.packet.Opcodes;
|
||||
@@ -21,3 +24,4 @@ public class HandlerLaunchFireworksReq extends PacketHandler {
|
||||
session.send(new PacketLaunchFireworksRsp());
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -1,3 +1,5 @@
|
||||
// removed due to proto not existing
|
||||
/*
|
||||
package emu.grasscutter.server.packet.recv;
|
||||
|
||||
import emu.grasscutter.net.packet.Opcodes;
|
||||
@@ -19,3 +21,4 @@ public class HandlerReformFireworksReq extends PacketHandler {
|
||||
session.send(new PacketReformFireworksRsp());
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -1,3 +1,6 @@
|
||||
// removed due to proto not existing
|
||||
|
||||
/*
|
||||
package emu.grasscutter.server.packet.send;
|
||||
|
||||
import emu.grasscutter.net.packet.BasePacket;
|
||||
@@ -19,3 +22,4 @@ public class PacketFireworksLaunchDataNotify extends BasePacket {
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
@@ -1,3 +1,6 @@
|
||||
// removed due to proto not existing
|
||||
|
||||
/*
|
||||
package emu.grasscutter.server.packet.send;
|
||||
|
||||
import emu.grasscutter.net.packet.BasePacket;
|
||||
@@ -19,3 +22,4 @@ public class PacketFireworksReformDataNotify extends BasePacket {
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
@@ -4,6 +4,8 @@ import emu.grasscutter.net.packet.BasePacket;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.QueryPathReqOuterClass;
|
||||
import emu.grasscutter.net.proto.QueryPathRspOuterClass;
|
||||
import emu.grasscutter.net.proto.PathStatusTypeOuterClass;
|
||||
|
||||
|
||||
public class PacketQueryPathRsp extends BasePacket {
|
||||
|
||||
@@ -15,7 +17,8 @@ public class PacketQueryPathRsp extends BasePacket {
|
||||
proto.addCorners(req.getSourcePos())
|
||||
.addCorners(req.getDestinationPos(0))
|
||||
.setQueryId(req.getQueryId())
|
||||
.setQueryStatus(QueryPathRspOuterClass.QueryPathRsp.PathStatusType.PATH_STATUS_TYPE_SUCC);
|
||||
.setQueryStatus(PathStatusTypeOuterClass.PathStatusType.PATH_STATUS_TYPE_SUCC);
|
||||
//.setQueryStatus(QueryPathRspOuterClass.QueryPathRsp.PathStatusType.PATH_STATUS_TYPE_SUCC);
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// removed due to proto not existing
|
||||
|
||||
/*
|
||||
package emu.grasscutter.server.packet.send;
|
||||
|
||||
import emu.grasscutter.net.packet.BasePacket;
|
||||
@@ -12,3 +15,4 @@ public class PacketReformFireworksRsp extends BasePacket {
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -14,15 +14,15 @@ public class PacketTowerLevelStarCondNotify extends BasePacket {
|
||||
.setFloorId(floorId)
|
||||
.setLevelIndex(levelIndex)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(1)
|
||||
//.setCondValue(1)
|
||||
.build()
|
||||
)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(2)
|
||||
//.setCondValue(2)
|
||||
.build()
|
||||
)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(3)
|
||||
//.setCondValue(3)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
|
||||
@@ -269,7 +269,7 @@ public final class Tools {
|
||||
|
||||
Files.createDirectories(location.getParent());
|
||||
Files.writeString(location, sb);
|
||||
Grasscutter.getLogger().info("Mappings generated to " + location);
|
||||
Grasscutter.getLogger().debug("Mappings generated to " + location);
|
||||
}
|
||||
|
||||
public static List<String> getAvailableLanguage() {
|
||||
|
||||
@@ -427,7 +427,7 @@ public final class Language {
|
||||
};
|
||||
|
||||
// Regenerate cache
|
||||
Grasscutter.getLogger().info("Generating TextMaps cache");
|
||||
Grasscutter.getLogger().debug("Generating TextMaps cache");
|
||||
ResourceLoader.loadAll();
|
||||
IntSet usedHashes = new IntOpenHashSet();
|
||||
GameData.getAchievementDataMap().values().stream()
|
||||
|
||||
Reference in New Issue
Block a user