mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-25 19:35:36 +08:00
Remove default Anemo skill depot from a Traveler when questing is enabled
This commit is contained in:
parent
ecd0ea7a8c
commit
38ba9771ec
@ -1,6 +1,7 @@
|
|||||||
package emu.grasscutter.server.packet.recv;
|
package emu.grasscutter.server.packet.recv;
|
||||||
|
|
||||||
import static emu.grasscutter.config.Configuration.GAME_INFO;
|
import static emu.grasscutter.config.Configuration.GAME_INFO;
|
||||||
|
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||||
|
|
||||||
import emu.grasscutter.GameConstants;
|
import emu.grasscutter.GameConstants;
|
||||||
import emu.grasscutter.Grasscutter;
|
import emu.grasscutter.Grasscutter;
|
||||||
@ -50,8 +51,13 @@ public class HandlerSetPlayerBornDataReq extends PacketHandler {
|
|||||||
// Create avatar
|
// Create avatar
|
||||||
if (player.getAvatars().getAvatarCount() == 0) {
|
if (player.getAvatars().getAvatarCount() == 0) {
|
||||||
Avatar mainCharacter = new Avatar(avatarId);
|
Avatar mainCharacter = new Avatar(avatarId);
|
||||||
|
|
||||||
|
// Check if the default Anemo skill should be given.
|
||||||
|
if (!GAME_OPTIONS.questing) {
|
||||||
mainCharacter.setSkillDepotData(
|
mainCharacter.setSkillDepotData(
|
||||||
GameData.getAvatarSkillDepotDataMap().get(startingSkillDepot));
|
GameData.getAvatarSkillDepotDataMap().get(startingSkillDepot));
|
||||||
|
}
|
||||||
|
|
||||||
// Manually handle adding to team
|
// Manually handle adding to team
|
||||||
player.addAvatar(mainCharacter, false);
|
player.addAvatar(mainCharacter, false);
|
||||||
player.setMainCharacterId(avatarId);
|
player.setMainCharacterId(avatarId);
|
||||||
|
Loading…
Reference in New Issue
Block a user