mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Update to support game version 1.9.0.*
This commit is contained in:
@@ -7,7 +7,7 @@ import emu.nebula.game.inventory.ItemParamMap;
|
||||
import emu.nebula.util.WeightedList;
|
||||
|
||||
public class GameConstants {
|
||||
public static final String VERSION = "1.8.0";
|
||||
public static final String VERSION = "1.9.0";
|
||||
public static int DATA_VERSION = 0;
|
||||
|
||||
public static final ZoneId UTC_ZONE = ZoneId.of("UTC");
|
||||
|
||||
@@ -58,6 +58,10 @@ public class HonorDef extends BaseDef {
|
||||
// Group
|
||||
this.valid = true;
|
||||
}
|
||||
case 4 -> {
|
||||
// Levels
|
||||
this.valid = true;
|
||||
}
|
||||
default -> {
|
||||
// Unknown honor type
|
||||
Nebula.getLogger().warn("Honor " + this.getId() + " has an unknown type (" + this.getType() + ")");
|
||||
|
||||
@@ -5,141 +5,138 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import lombok.Getter;
|
||||
|
||||
public enum AchievementCondition {
|
||||
AchievementSpecific (1),
|
||||
AchievementTotal (2),
|
||||
BattleTotal (3),
|
||||
CharacterAcquire (5),
|
||||
CharacterAcquireQuantityRarityAndAdvancement (6),
|
||||
CharacterAdvanceTotal (7),
|
||||
CharacterSkillUpTotal (8),
|
||||
CharacterSkillWithSpecificUpTotal (9),
|
||||
CharacterSpecific (10),
|
||||
CharacterUpLevel (11),
|
||||
CharacterUpTotal (12),
|
||||
CharacterWithSpecificAdvance (13),
|
||||
CharacterWithSpecificAffinity (14),
|
||||
CharacterWithSpecificUpLevel (15),
|
||||
CharactersWithSpecificLevelAndQuantity (16),
|
||||
CharactersWithSpecificNumberLevelAndAttributes (17),
|
||||
CharactersWithSpecificPlot (18),
|
||||
CharactersWithSpecificQuantityAdvancementCountAndAttribute (19),
|
||||
CharactersWithSpecificQuantityAndRarity (20),
|
||||
CharactersWithSpecificQuantityRarityAndAdvancement (21),
|
||||
CharactersWithSpecificQuantityRarityAndLevel (22),
|
||||
ChatTotal (23),
|
||||
DailyInstanceClearSpecificDifficultyAndTotal (24),
|
||||
DailyInstanceClearSpecificTypeAndTotal (25),
|
||||
DailyInstanceClearTotal (26),
|
||||
DateSpecific (27),
|
||||
DiscAcquire (28),
|
||||
DiscAcquireSpecificQuantityAndRarity (29),
|
||||
DiscAcquireQuantityLevelAndRarity (30),
|
||||
DiscAcquireQuantityPhaseAndRarity (31),
|
||||
DiscAcquireQuantityStarAndRarity (32),
|
||||
DiscLimitBreakTotal (33),
|
||||
DiscPromoteTotal (34),
|
||||
DiscStrengthenTotal (35),
|
||||
DiscWithSpecificQuantityLevelAndRarity (36),
|
||||
DiscWithSpecificQuantityPhaseAndRarity (37),
|
||||
DiscWithSpecificQuantityStarAndRarity (38),
|
||||
GachaCharacterNotSSRTotal (40),
|
||||
GachaCharacterTenModeSSRTotal (41),
|
||||
GachaCharacterTotal (42),
|
||||
GachaTenModeAcquireQuantityAndRarityItems (43),
|
||||
GachaTotal (44),
|
||||
GiftGiveTotal (45),
|
||||
InfinityTowerClearSpecificFloor (46),
|
||||
InfinityTowerClearTotal (47),
|
||||
ItemsAdd (48),
|
||||
ItemsDeplete (49),
|
||||
ItemsProductTotal (50),
|
||||
LoginTotal (51),
|
||||
QuestTravelerDuelChallengeTotal (52),
|
||||
QuestTourGuideSpecific (53),
|
||||
QuestWithSpecificType (55),
|
||||
RegionBossClearSpecificFullStarWithBossIdAndDifficulty (56),
|
||||
RegionBossClearSpecificLevelWithDifficultyAndTotal (57),
|
||||
RegionBossClearSpecificTotal (58),
|
||||
RegionBossClearTotal (59),
|
||||
SkillsWithSpecificQuantityAndLevel (60),
|
||||
SkinAcquire (61),
|
||||
StageClearSpecificStars (62),
|
||||
StoryClear (63),
|
||||
TravelerDuelChallengeSpecificBoosLevelWithDifficultyAndTotal (64),
|
||||
TravelerDuelChallengeClearSpecificBossLevelAndAffix (67),
|
||||
TravelerDuelClearSpecificBossTotal (69),
|
||||
WorldClassSpecific (71),
|
||||
RegionBossClearSpecificTypeWithTotal (72),
|
||||
CharactersWithSpecificDatingCount (73),
|
||||
CharactersDatingTotal (74),
|
||||
VampireSurvivorScoreTotal (75),
|
||||
VampireSurvivorSpecificLevelWithSpecificScore (76),
|
||||
VampireSurvivorPassedSpecificLevel (77),
|
||||
CharacterParticipateTowerNumber (78),
|
||||
CharacterAllSkillReachSpecificLevel (79),
|
||||
VampireClearTotal (81),
|
||||
VampireWithSpecificClearTotal (82),
|
||||
AgentFinishTotal (83),
|
||||
AgentWithSpecificFinishTotal (84),
|
||||
ActivityMiningEnterLayer (86),
|
||||
ActivityMiningDestroyGrid (87),
|
||||
BossRushTotalStars (88),
|
||||
InfinityTowerClearSpecificDifficultyAndTotal (89),
|
||||
SkillInstanceClearTotal (90),
|
||||
VampireSurvivorSpecificPassedLevel (91),
|
||||
WeekBoosClearSpecificDifficultyAndTotal (92),
|
||||
NpcAffinityWithSpecificLevel (93),
|
||||
CharacterPassedWithSpecificTowerAndCount (94),
|
||||
JointDrillScoreTotal (95),
|
||||
CharGemInstanceClearTotal (104),
|
||||
DailyShopReceiveShopTotal (105),
|
||||
AgentApplyTotal (106),
|
||||
DiscSpecific (114),
|
||||
StorySetClearSpecific (116),
|
||||
CharacterWithSpecificSkillAndLevel (118),
|
||||
DiscWithSpecificQuantityLevelAndAttr (119),
|
||||
TutorialLevelClearSpecific (120),
|
||||
TutorialLevelSpecificClearTotal (121),
|
||||
DiscWithSpecificQuantityPhaseAndAttr (122),
|
||||
WeekBossClearTotal (123),
|
||||
ClientReport (200),
|
||||
TowerBattleTimes (501),
|
||||
TowerBossChallengeSpecificHighRewardWithTotal (502),
|
||||
TowerBuildSpecificCharacter (503),
|
||||
TowerBuildSpecificScoreWithTotal (504),
|
||||
TowerClearSpecificCharacterTypeWithTotal (505),
|
||||
TowerClearSpecificGroupIdAndDifficulty (506),
|
||||
TowerClearSpecificLevelWithDifficultyAndTotal (507),
|
||||
TowerClearTotal (508),
|
||||
TowerEnterRoom (509),
|
||||
TowerEventTimes (511),
|
||||
TowerFateTimes (512),
|
||||
TowerItemsGet (513),
|
||||
TowerSpecificDifficultyShopBuyTimes (514),
|
||||
TowerGrowthSpecificNote (515),
|
||||
TowerClearSpecificLevelWithDifficultyAndTotalHistory (516),
|
||||
TowerBookWithSpecificEvent (517),
|
||||
TowerBookWithSpecificFateCard (518),
|
||||
TowerBookWithSpecificPotential (520),
|
||||
TowerBuildSpecificDifficultyAndScoreWithTotal (521),
|
||||
TowerSpecificDifficultyStrengthenMachineTotal (522),
|
||||
TowerSpecificDifficultyKillBossTotal (524),
|
||||
TowerBookSpecificCharWithPotentialTotal (525),
|
||||
TowerBuildSpecificCharSpecificScoreWithTotal (526),
|
||||
TowerGrowthWithSpecificNote (527),
|
||||
TowerSpecificFateCardReRollTotal (528),
|
||||
TowerSpecificPotentialReRollTotal (529),
|
||||
TowerSpecificShopReRollTotal (530),
|
||||
TowerSpecificNoteActivateTotal (531),
|
||||
TowerSpecificNoteLevelTotal (532),
|
||||
TowerSpecificPotentialBonusTotal (533),
|
||||
TowerSpecificPotentialLuckyTotal (534),
|
||||
TowerSpecificShopBuyDiscountTotal (535),
|
||||
TowerSpecificSecondarySkillActivateTotal (536),
|
||||
TowerSpecificGetExtraNoteLvTotal (537),
|
||||
TowerSweepTimes (539),
|
||||
TowerSweepTotal (540),
|
||||
TowerBattleWithPartner (541);
|
||||
AchievementSpecific (1),
|
||||
AchievementTotal (2),
|
||||
BattleTotal (3),
|
||||
CharacterAcquire (5),
|
||||
CharacterAcquireQuantityRarityAndAdvancement (6),
|
||||
CharacterAdvanceTotal (7),
|
||||
CharacterSkillUpTotal (8),
|
||||
CharacterSkillWithSpecificUpTotal (9),
|
||||
CharacterSpecific (10),
|
||||
CharacterUpLevel (11),
|
||||
CharacterUpTotal (12),
|
||||
CharacterWithSpecificAdvance (13),
|
||||
CharacterWithSpecificAffinity (14),
|
||||
CharacterWithSpecificUpLevel (15),
|
||||
CharactersWithSpecificLevelAndQuantity (16),
|
||||
CharactersWithSpecificNumberLevelAndAttributes (17),
|
||||
CharactersWithSpecificPlot (18),
|
||||
CharactersWithSpecificQuantityAdvancementCountAndAttribute (19),
|
||||
CharactersWithSpecificQuantityAndRarity (20),
|
||||
CharactersWithSpecificQuantityRarityAndAdvancement (21),
|
||||
CharactersWithSpecificQuantityRarityAndLevel (22),
|
||||
ChatTotal (23),
|
||||
DailyInstanceClearSpecificDifficultyAndTotal (24),
|
||||
DailyInstanceClearSpecificTypeAndTotal (25),
|
||||
DailyInstanceClearTotal (26),
|
||||
DateSpecific (27),
|
||||
DiscAcquire (28),
|
||||
DiscAcquireSpecificQuantityAndRarity (29),
|
||||
DiscAcquireQuantityLevelAndRarity (30),
|
||||
DiscAcquireQuantityPhaseAndRarity (31),
|
||||
DiscAcquireQuantityStarAndRarity (32),
|
||||
DiscLimitBreakTotal (33),
|
||||
DiscPromoteTotal (34),
|
||||
DiscStrengthenTotal (35),
|
||||
DiscWithSpecificQuantityLevelAndRarity (36),
|
||||
DiscWithSpecificQuantityPhaseAndRarity (37),
|
||||
DiscWithSpecificQuantityStarAndRarity (38),
|
||||
GachaCharacterNotSSRTotal (40),
|
||||
GachaCharacterTenModeSSRTotal (41),
|
||||
GachaCharacterTotal (42),
|
||||
GachaTenModeAcquireQuantityAndRarityItems (43),
|
||||
GachaTotal (44),
|
||||
GiftGiveTotal (45),
|
||||
InfinityTowerClearSpecificFloor (46),
|
||||
InfinityTowerClearTotal (47),
|
||||
ItemsAdd (48),
|
||||
ItemsDeplete (49),
|
||||
ItemsProductTotal (50),
|
||||
LoginTotal (51),
|
||||
QuestTravelerDuelChallengeTotal (52),
|
||||
QuestTourGuideSpecific (53),
|
||||
QuestWithSpecificType (55),
|
||||
RegionBossClearSpecificFullStarWithBossIdAndDifficulty (56),
|
||||
RegionBossClearSpecificLevelWithDifficultyAndTotal (57),
|
||||
RegionBossClearSpecificTotal (58),
|
||||
RegionBossClearTotal (59),
|
||||
SkillsWithSpecificQuantityAndLevel (60),
|
||||
SkinAcquire (61),
|
||||
StageClearSpecificStars (62),
|
||||
StoryClear (63),
|
||||
WorldClassSpecific (71),
|
||||
RegionBossClearSpecificTypeWithTotal (72),
|
||||
CharactersWithSpecificDatingCount (73),
|
||||
CharactersDatingTotal (74),
|
||||
VampireSurvivorScoreTotal (75),
|
||||
VampireSurvivorSpecificLevelWithSpecificScore (76),
|
||||
VampireSurvivorPassedSpecificLevel (77),
|
||||
CharacterParticipateTowerNumber (78),
|
||||
CharacterAllSkillReachSpecificLevel (79),
|
||||
VampireClearTotal (81),
|
||||
VampireWithSpecificClearTotal (82),
|
||||
AgentFinishTotal (83),
|
||||
AgentWithSpecificFinishTotal (84),
|
||||
ActivityMiningEnterLayer (86),
|
||||
ActivityMiningDestroyGrid (87),
|
||||
BossRushTotalStars (88),
|
||||
InfinityTowerClearSpecificDifficultyAndTotal (89),
|
||||
SkillInstanceClearTotal (90),
|
||||
VampireSurvivorSpecificPassedLevel (91),
|
||||
WeekBoosClearSpecificDifficultyAndTotal (92),
|
||||
NpcAffinityWithSpecificLevel (93),
|
||||
CharacterPassedWithSpecificTowerAndCount (94),
|
||||
JointDrillScoreTotal (95),
|
||||
CharGemInstanceClearTotal (104),
|
||||
DailyShopReceiveShopTotal (105),
|
||||
AgentApplyTotal (106),
|
||||
DiscSpecific (114),
|
||||
StorySetClearSpecific (116),
|
||||
CharacterWithSpecificSkillAndLevel (118),
|
||||
DiscWithSpecificQuantityLevelAndAttr (119),
|
||||
TutorialLevelClearSpecific (120),
|
||||
TutorialLevelSpecificClearTotal (121),
|
||||
DiscWithSpecificQuantityPhaseAndAttr (122),
|
||||
WeekBossClearTotal (123),
|
||||
ClientReport (200),
|
||||
TowerBattleTimes (501),
|
||||
TowerBossChallengeSpecificHighRewardWithTotal (502),
|
||||
TowerBuildSpecificCharacter (503),
|
||||
TowerBuildSpecificScoreWithTotal (504),
|
||||
TowerClearSpecificCharacterTypeWithTotal (505),
|
||||
TowerClearSpecificGroupIdAndDifficulty (506),
|
||||
TowerClearSpecificLevelWithDifficultyAndTotal (507),
|
||||
TowerClearTotal (508),
|
||||
TowerEnterRoom (509),
|
||||
TowerEventTimes (511),
|
||||
TowerFateTimes (512),
|
||||
TowerItemsGet (513),
|
||||
TowerSpecificDifficultyShopBuyTimes (514),
|
||||
TowerGrowthSpecificNote (515),
|
||||
TowerClearSpecificLevelWithDifficultyAndTotalHistory (516),
|
||||
TowerBookWithSpecificEvent (517),
|
||||
TowerBookWithSpecificFateCard (518),
|
||||
TowerBookWithSpecificPotential (520),
|
||||
TowerBuildSpecificDifficultyAndScoreWithTotal (521),
|
||||
TowerSpecificDifficultyStrengthenMachineTotal (522),
|
||||
TowerSpecificDifficultyKillBossTotal (524),
|
||||
TowerBookSpecificCharWithPotentialTotal (525),
|
||||
TowerBuildSpecificCharSpecificScoreWithTotal (526),
|
||||
TowerGrowthWithSpecificNote (527),
|
||||
TowerSpecificFateCardReRollTotal (528),
|
||||
TowerSpecificPotentialReRollTotal (529),
|
||||
TowerSpecificShopReRollTotal (530),
|
||||
TowerSpecificNoteActivateTotal (531),
|
||||
TowerSpecificNoteLevelTotal (532),
|
||||
TowerSpecificPotentialBonusTotal (533),
|
||||
TowerSpecificPotentialLuckyTotal (534),
|
||||
TowerSpecificShopBuyDiscountTotal (535),
|
||||
TowerSpecificSecondarySkillActivateTotal (536),
|
||||
TowerSpecificGetExtraNoteLvTotal (537),
|
||||
TowerSweepTimes (539),
|
||||
TowerSweepTotal (540),
|
||||
TowerBattleWithPartner (541);
|
||||
|
||||
@Getter
|
||||
private final int value;
|
||||
|
||||
@@ -45,28 +45,34 @@ public class ActivityModule extends GameContextModule {
|
||||
//this.activities.add(1010504);
|
||||
|
||||
// To My Dearest You
|
||||
this.activities.add(1010601);
|
||||
this.activities.add(1010603);
|
||||
this.activities.add(1010604);
|
||||
//this.activities.add(1010601);
|
||||
//this.activities.add(1010603);
|
||||
//this.activities.add(1010604);
|
||||
|
||||
// Solitary Waltz in Night's Embrace
|
||||
this.activities.add(2010201);
|
||||
this.activities.add(2010203);
|
||||
this.activities.add(2010204);
|
||||
|
||||
// ===== Joint Drills (Finale Echoing) =====
|
||||
this.activities.add(510003);
|
||||
//this.activities.add(510003); // Causes soft lock in event screen
|
||||
|
||||
// ===== Etc Events =====
|
||||
|
||||
// Trial activities
|
||||
this.activities.add(700111);
|
||||
this.activities.add(700112);
|
||||
this.activities.add(700117);
|
||||
this.activities.add(700118);
|
||||
|
||||
// Tower defense activity
|
||||
this.activities.add(102002);
|
||||
this.activities.add(102002); // Broken
|
||||
|
||||
// Login events
|
||||
//this.activities.add(301011); // Christmas 2025
|
||||
//this.activities.add(301012); // Christmas 2025
|
||||
this.activities.add(301031); // Stellar Prelude
|
||||
|
||||
// Christmas 2025 login events
|
||||
this.activities.add(301011);
|
||||
this.activities.add(301012);
|
||||
|
||||
// Fatebound Stellar Deck
|
||||
this.activities.add(800001);
|
||||
//this.activities.add(800001); // Causes soft lock in event screen
|
||||
|
||||
// Trekker versus (broken)
|
||||
//this.activities.add(600001);
|
||||
|
||||
@@ -24,7 +24,8 @@ public enum ActivityType {
|
||||
TrekkerVersus (16),
|
||||
Story (17),
|
||||
PenguinCard (18),
|
||||
ThrowGift (19);
|
||||
ThrowGift (19),
|
||||
GoldenSpy (20);
|
||||
|
||||
@Getter
|
||||
private final int value;
|
||||
|
||||
@@ -64,7 +64,9 @@ public class CharacterGem {
|
||||
var proto = CharGem.newInstance()
|
||||
.setLock(this.isLocked())
|
||||
.addAllAttributes(this.getAttributes())
|
||||
.addAllAlterAttributes(this.getAlterAttributes());
|
||||
.addAllAlterAttributes(this.getAlterAttributes())
|
||||
.addAllOverlockCount(new int[this.getAttributes().length])
|
||||
.addAllAlterOverlockCount(new int[this.getAlterAttributes().length]);
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ public class GameCharacter implements GameDatabaseObject {
|
||||
private int advance;
|
||||
private int level;
|
||||
private int exp;
|
||||
private boolean favorite;
|
||||
private int affinityLevel;
|
||||
private int affinityExp;
|
||||
private int skin;
|
||||
@@ -136,6 +137,10 @@ public class GameCharacter implements GameDatabaseObject {
|
||||
public void setAdvance(int advance) {
|
||||
this.advance = advance;
|
||||
}
|
||||
|
||||
public void setFavorite(boolean b) {
|
||||
this.favorite = b;
|
||||
}
|
||||
|
||||
public void setAffinityLevel(int level) {
|
||||
this.affinityLevel = Math.max(level, 0);
|
||||
@@ -821,6 +826,7 @@ public class GameCharacter implements GameDatabaseObject {
|
||||
.setLevel(this.getLevel())
|
||||
.setSkin(this.getSkin())
|
||||
.setAdvance(this.getAdvance())
|
||||
.setIsFavorite(this.isFavorite())
|
||||
.setAffinityLevel(this.getAffinityLevel())
|
||||
.setAffinityExp(this.getAffinityExp())
|
||||
.setTalentNodes(this.getTalents().toByteArray())
|
||||
|
||||
@@ -15,6 +15,7 @@ public enum ItemSubType {
|
||||
TalentStrengthen (9),
|
||||
DiscStrengthen (12),
|
||||
DiscPromote (13),
|
||||
LevelHonor (15),
|
||||
TreasureBox (17),
|
||||
GearTreasureBox (18),
|
||||
SubNoteSkill (19),
|
||||
|
||||
@@ -17,7 +17,8 @@ public enum ItemType {
|
||||
MonthlyCard (11),
|
||||
Title (12),
|
||||
Honor (13),
|
||||
HeadItem (14);
|
||||
HeadItem (14),
|
||||
LevelHonor (15);
|
||||
|
||||
@Getter
|
||||
private final int value;
|
||||
|
||||
@@ -995,8 +995,6 @@ public class Player implements GameDatabaseObject {
|
||||
state.getMutableMallPackage();
|
||||
state.getMutableTravelerDuelQuest()
|
||||
.setType(QuestType.TravelerDuel);
|
||||
state.getMutableTravelerDuelChallengeQuest()
|
||||
.setType(QuestType.TravelerDuelChallenge);
|
||||
state.getMutableStarTower();
|
||||
state.getMutableStarTowerBook();
|
||||
state.getMutableScoreBoss();
|
||||
|
||||
@@ -49,9 +49,10 @@ public enum QuestCondition {
|
||||
SkillsWithSpecificQuantityAndLevel (60),
|
||||
StageClearSpecificStars (62),
|
||||
StoryClear (63),
|
||||
TravelerDuelChallengeSpecificBoosLevelWithDifficultyAndTotal (64),
|
||||
TravelerDuelChallengeClearSpecificBossLevelAndAffix (67),
|
||||
TravelerDuelClearSpecificBossTotal (69),
|
||||
TrekkerVersusClearCount (64),
|
||||
TrekkerVersusClearWithSpecificAffix (65),
|
||||
TrekkerVersusClearWithSpecificDifficultyAndTotal (66),
|
||||
TrekkerVersusFansWithSpecificLevel (67),
|
||||
WorldClassSpecific (71),
|
||||
RegionBossClearSpecificTypeWithTotal (72),
|
||||
CharactersWithSpecificDatingCount (73),
|
||||
|
||||
@@ -3,6 +3,7 @@ package emu.nebula.net;
|
||||
public class NetMsgId {
|
||||
public static final int none = 0;
|
||||
|
||||
public static final int clear_all_activity_golden_spy_levels_notify = -10051;
|
||||
public static final int clear_all_activity_breakout_levels_notify = -10050;
|
||||
public static final int clear_story_set_notify = -10049;
|
||||
public static final int unlock_activity_story_notify = -10048;
|
||||
@@ -188,6 +189,9 @@ public class NetMsgId {
|
||||
public static final int milkout_settle_req = 1401;
|
||||
public static final int milkout_settle_succeed_ack = 1402;
|
||||
public static final int milkout_settle_failed_ack = 1403;
|
||||
public static final int activity_gds_settle_req = 1501;
|
||||
public static final int activity_gds_settle_succeed_ack = 1502;
|
||||
public static final int activity_gds_settle_failed_ack = 1503;
|
||||
public static final int player_formation_req = 2001;
|
||||
public static final int player_formation_succeed_ack = 2002;
|
||||
public static final int player_formation_failed_ack = 2003;
|
||||
@@ -254,6 +258,15 @@ public class NetMsgId {
|
||||
public static final int char_gem_equip_gem_req = 2519;
|
||||
public static final int char_gem_equip_gem_succeed_ack = 2520;
|
||||
public static final int char_gem_equip_gem_failed_ack = 2521;
|
||||
public static final int char_gem_overlock_revert_req = 2522;
|
||||
public static final int char_gem_overlock_revert_succeed_ack = 2523;
|
||||
public static final int char_gem_overlock_revert_failed_ack = 2524;
|
||||
public static final int char_gem_overlock_req = 2525;
|
||||
public static final int char_gem_overlock_succeed_ack = 2526;
|
||||
public static final int char_gem_overlock_failed_ack = 2527;
|
||||
public static final int char_favorite_set_req = 2601;
|
||||
public static final int char_favorite_set_succeed_ack = 2602;
|
||||
public static final int char_favorite_set_failed_ack = 2603;
|
||||
public static final int disc_strengthen_req = 3119;
|
||||
public static final int disc_strengthen_succeed_ack = 3120;
|
||||
public static final int disc_strengthen_failed_ack = 3121;
|
||||
@@ -368,6 +381,24 @@ public class NetMsgId {
|
||||
public static final int star_tower_build_preference_set_req = 4719;
|
||||
public static final int star_tower_build_preference_set_succeed_ack = 4720;
|
||||
public static final int star_tower_build_preference_set_failed_ack = 4721;
|
||||
public static final int potential_preselection_list_req = 4722;
|
||||
public static final int potential_preselection_list_succeed_ack = 4723;
|
||||
public static final int potential_preselection_list_failed_ack = 4724;
|
||||
public static final int potential_preselection_import_req = 4725;
|
||||
public static final int potential_preselection_import_succeed_ack = 4726;
|
||||
public static final int potential_preselection_import_failed_ack = 4727;
|
||||
public static final int potential_preselection_name_set_req = 4728;
|
||||
public static final int potential_preselection_name_set_succeed_ack = 4729;
|
||||
public static final int potential_preselection_name_set_failed_ack = 4730;
|
||||
public static final int potential_preselection_preference_set_req = 4731;
|
||||
public static final int potential_preselection_preference_set_succeed_ack = 4732;
|
||||
public static final int potential_preselection_preference_set_failed_ack = 4733;
|
||||
public static final int potential_preselection_update_req = 4734;
|
||||
public static final int potential_preselection_update_succeed_ack = 4735;
|
||||
public static final int potential_preselection_update_failed_ack = 4736;
|
||||
public static final int potential_preselection_delete_req = 4737;
|
||||
public static final int potential_preselection_delete_succeed_ack = 4738;
|
||||
public static final int potential_preselection_delete_failed_ack = 4739;
|
||||
public static final int build_convert_detail_list_get_req = 4801;
|
||||
public static final int build_convert_detail_list_get_succeed_ack = 4802;
|
||||
public static final int build_convert_detail_list_get_failed_ack = 4803;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package emu.nebula.server.handlers;
|
||||
|
||||
import emu.nebula.net.NetHandler;
|
||||
import emu.nebula.net.NetMsgId;
|
||||
import emu.nebula.proto.Public.UI32;
|
||||
import emu.nebula.net.HandlerId;
|
||||
import emu.nebula.net.GameSession;
|
||||
|
||||
@HandlerId(NetMsgId.char_favorite_set_req)
|
||||
public class HandlerCharFavoriteSetReq extends NetHandler {
|
||||
|
||||
@Override
|
||||
public byte[] handle(GameSession session, byte[] message) throws Exception {
|
||||
// Parse request
|
||||
var req = UI32.parseFrom(message);
|
||||
|
||||
// Get character
|
||||
var character = session.getPlayer().getCharacters().getCharacterById(req.getValue());
|
||||
|
||||
if (character == null) {
|
||||
return session.encodeMsg(NetMsgId.char_favorite_set_failed_ack);
|
||||
}
|
||||
|
||||
// Toggle favorite status
|
||||
character.setFavorite(!character.isFavorite());
|
||||
character.save();
|
||||
|
||||
// Encode and send
|
||||
return session.encodeMsg(NetMsgId.char_favorite_set_succeed_ack);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package emu.nebula.server.handlers;
|
||||
|
||||
import emu.nebula.net.NetHandler;
|
||||
import emu.nebula.net.NetMsgId;
|
||||
import emu.nebula.proto.PotentialPreselectionListOuterClass.PotentialPreselectionList;
|
||||
import emu.nebula.net.HandlerId;
|
||||
import emu.nebula.net.GameSession;
|
||||
|
||||
@HandlerId(NetMsgId.potential_preselection_list_req)
|
||||
public class HandlerPotentialPreselectionListReq extends NetHandler {
|
||||
|
||||
@Override
|
||||
public byte[] handle(GameSession session, byte[] message) throws Exception {
|
||||
// Create base response
|
||||
var rsp = PotentialPreselectionList.newInstance();
|
||||
|
||||
// Encode and send
|
||||
return session.encodeMsg(NetMsgId.potential_preselection_list_succeed_ack, rsp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"global": 98,
|
||||
"kr": 103,
|
||||
"jp": 101,
|
||||
"tw": 108,
|
||||
"cn": 99
|
||||
"global": 99,
|
||||
"kr": 104,
|
||||
"jp": 102,
|
||||
"tw": 109,
|
||||
"cn": 100
|
||||
}
|
||||
Reference in New Issue
Block a user