Implement MazeMapInfo and EnterMaze (map and teleport), better excel classes

This commit is contained in:
xeon 2024-01-20 15:42:08 +03:00
parent 2a0543e79e
commit 8be42d2ffb
20 changed files with 2048 additions and 78 deletions

View file

@ -0,0 +1,13 @@
namespace RPG.GameCore.Enums;
public enum AttackDamageType
{
Unknow = 0,
Physical = 1,
Fire = 2,
Ice = 3,
Thunder = 4,
Wind = 5,
Quantum = 6,
Imaginary = 7,
Heal = 8,
}

View file

@ -0,0 +1,12 @@
namespace RPG.GameCore.Enums;
public enum AvatarBaseType
{
Unknown = 0,
Warrior = 1,
Rogue = 2,
Mage = 3,
Shaman = 4,
Warlock = 5,
Knight = 6,
Priest = 7,
}

View file

@ -0,0 +1,9 @@
namespace RPG.GameCore.Enums;
public enum MainMissionType
{
None,
Main,
Branch,
Daily,
Maze
}

View file

@ -0,0 +1,8 @@
namespace RPG.GameCore.Enums;
public enum MapEntryType
{
Unknown,
Town,
Mission,
Explore
}

View file

@ -0,0 +1,11 @@
namespace RPG.GameCore.Enums;
public enum RequirementType // AEGBKHMFGPO
{
Unknown,
Auto,
Sequence,
Client,
MultiSequence,
PlayerLevel,
WorldLevel
}

View file

@ -1,49 +0,0 @@
using RPG.GameCore.Excel.Attributes;
namespace RPG.GameCore.Excel;
[ExcelTable("AvatarExcelTable.json", ExcelType.Avatar)]
public class AvatarExcelRow : ExcelRow
{
public override uint Id => AvatarID;
public uint AvatarID { get; set; }
public uint AdventurePlayerID { get; set; }
public string AvatarVOTag { get; set; } = string.Empty;
public uint Rarity { get; set; }
public string JsonPath { get; set; } = string.Empty;
public uint NatureID { get; set; }
public string DamageType { get; set; } = string.Empty;
public SPValue SPNeed { get; set; } = new();
public uint ExpGroup { get; set; }
public uint MaxPromotion { get; set; }
public uint MaxRank { get; set; }
public List<string> RankUpCostList { get; set; } = [];
public uint MaxRankRepay { get; set; }
public List<uint> SkillList { get; set; } = [];
public string AvatarBaseType { get; set; } = string.Empty;
public string DefaultAvatarImagePath { get; set; } = string.Empty;
public string DefaultAvatarModelPath { get; set; } = string.Empty;
public string DefaultAvatarHeadIconPath { get; set; } = string.Empty;
public string DefaultAvatarHalfImagePath { get; set; } = string.Empty;
public string AvatarSideIconPath { get; set; } = string.Empty;
public string ActionAvatarHeadIconPath { get; set; } = string.Empty;
public string DefaultAvatarQHeadIconPath { get; set; } = string.Empty;
public string AvatarBaseTypeIconPath { get; set; } = string.Empty;
public string AvatarDialogHalfImagePath { get; set; } = string.Empty;
public string UltraSkillCutInPrefabPath { get; set; } = string.Empty;
public string UIAvatarModelPath { get; set; } = string.Empty;
public string ManikinJsonPath { get; set; } = string.Empty;
public string AIPath { get; set; } = string.Empty;
public string SkilltreePrefabPath { get; set; } = string.Empty;
public bool Release { get; set; }
public string SideAvatarHeadIconPath { get; set; } = string.Empty;
public string WaitingAvatarHeadIconPath { get; set; } = string.Empty;
public string AvatarCutinImgPath { get; set; } = string.Empty;
public string AvatarCutinBgImgPath { get; set; } = string.Empty;
public class SPValue
{
public long RawValue { get; set; }
}
}

View file

@ -0,0 +1,53 @@
using System.Text.Json.Serialization;
using RPG.GameCore.Enums;
using RPG.GameCore.Excel.Attributes;
using RPG.GameCore.Types;
namespace RPG.GameCore.Excel;
[ExcelTable("AvatarExcelTable.json", ExcelType.Avatar)]
public class AvatarRow : ExcelRow
{
public override uint Id => AvatarID;
public uint AvatarID { get; set; } // 0x10
public TextID AvatarName { get; set; } // 0x14
public TextID AvatarFullName { get; set; } // 0x18
public uint AdventurePlayerID { get; set; } // 0x1C
public string AvatarVOTag { get; set; } = string.Empty; // 0x20
public uint Rarity { get; set; } // 0x28
public string JsonPath { get; set; } = string.Empty; // 0x30
public uint NatureID { get; set; } // 0x38
[JsonConverter(typeof(JsonStringEnumConverter))]
public AttackDamageType DamageType { get; set; } // 0x3C
public FixPoint SPNeed { get; set; } // 0x40
public uint ExpGroup { get; set; } // 0x48
public uint MaxPromotion { get; set; } // 0x4C
public uint MaxRank { get; set; } // 0x50
public string[] RankUpCostList { get; set; } = []; // 0x58
public uint MaxRankRepay { get; set; } // 0x60
public uint[] SkillList { get; set; } // 0x68
[JsonConverter(typeof(JsonStringEnumConverter))]
public AvatarBaseType AvatarBaseType { get; set; } // 0x70
public string DefaultAvatarImagePath { get; set; } = string.Empty; // 0x78
public string DefaultAvatarModelPath { get; set; } = string.Empty; // 0x80
public string DefaultAvatarHeadIconPath { get; set; } = string.Empty; // 0x88
public string DefaultAvatarHalfImagePath { get; set; } = string.Empty; // 0x90
public string AvatarSideIconPath { get; set; } = string.Empty; // 0x98
public string ActionAvatarHeadIconPath { get; set; } = string.Empty; // 0xA0
public string DefaultAvatarQHeadIconPath { get; set; } = string.Empty; // 0xA8
public string AvatarBaseTypeIconPath { get; set; } = string.Empty; // 0xB0
public string AvatarDialogHalfImagePath { get; set; } = string.Empty; // 0xB8
public string UltraSkillCutInPrefabPath { get; set; } = string.Empty; // 0xC0
public string UIAvatarModelPath { get; set; } = string.Empty; // 0xC8
public string ManikinJsonPath { get; set; } = string.Empty; // 0xD0
public TextID AvatarDesc { get; set; } // 0xD8
public string AIPath { get; set; } = string.Empty; // 0xE0
public string SkilltreePrefabPath { get; set; } = string.Empty; // 0xE8
public GCINNHHNFMP[] DamageTypeResistance { get; set; } = []; // 0xF0
public bool Release { get; set; } // 0xF8
public string SideAvatarHeadIconPath { get; set; } = string.Empty; // 0x100
public string WaitingAvatarHeadIconPath { get; set; } = string.Empty; // 0x108
public string AvatarCutinImgPath { get; set; } = string.Empty; // 0x110
public string AvatarCutinBgImgPath { get; set; } = string.Empty; // 0x118
}

View file

@ -15,7 +15,7 @@ public class ExcelTables
_logger = logger;
}
public TExcelRow? GetExcelRow<TExcelRow>(ExcelType type, int id) where TExcelRow : ExcelRow
public TExcelRow? GetExcelRow<TExcelRow>(ExcelType type, uint id) where TExcelRow : ExcelRow
{
if (_tables == null) throw new InvalidOperationException("GetExcelRow called when ExcelTables not loaded.");

View file

@ -2,5 +2,6 @@
public enum ExcelType
{
Avatar,
MainMission
MainMission,
MapEntry
}

View file

@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using System.Text.Json.Serialization;
using RPG.GameCore.Enums;
using RPG.GameCore.Excel.Attributes;
using RPG.GameCore.Types;
namespace RPG.GameCore.Excel;
@ -13,22 +10,27 @@ public class MainMissionRow : ExcelRow
{
public override uint Id => MainMissionID;
public uint MainMissionID { get; set; }
public string Type { get; set; } = string.Empty;
public bool IsLoop { get; set; }
public List<uint> NextMainMissionList { get; set; } = [];
public string TakeType { get; set; } = string.Empty;
public uint TakeParamInt1 { get; set; }
public List<uint> TakeParamIntList { get; set; } = [];
public string BeginType { get; set; } = string.Empty;
public uint BeginParamInt1 { get; set; }
public List<uint> BeginParamIntList { get; set; } = [];
public List<uint> StartSubMissionList { get; set; } = [];
public List<uint> FinishSubMissionList { get; set; } = [];
public uint NextTrackMainMission { get; set; }
public uint TrackWeight { get; set; }
public bool IsShowStartHint { get; set; }
public bool IsShowFinishHint { get; set; }
public int RewardID { get; set; }
public int DisplayRewardID { get; set; }
public uint MainMissionID { get; set; } // 0x10
[JsonConverter(typeof(JsonStringEnumConverter))]
public MainMissionType Type { get; set; } // 0x14
public bool IsLoop { get; set; } // 0x18
public uint[] NextMainMissionList { get; set; } = []; // 0x20
public TextID Name { get; set; } // 0x28
[JsonConverter(typeof(JsonStringEnumConverter))]
public RequirementType TakeType { get; set; } // 0x2C
public uint TakeParamInt1 { get; set; } // 0x30
public uint[] TakeParamIntList { get; set; } = []; // 0x38
[JsonConverter(typeof(JsonStringEnumConverter))]
public RequirementType BeginType { get; set; } // 0x40
public uint BeginParamInt1 { get; set; } // 0x44
public TextID BeginDesc { get; set; } // 0x48
public uint[] BeginParamIntList { get; set; } = []; // 0x50
public uint[] StartSubMissionList { get; set; } = []; // 0x58
public uint[] FinishSubMissionList { get; set; } = []; // 0x60
public uint NextTrackMainMission { get; set; } // 0x68
public uint TrackWeight { get; set; } // 0x6C
public bool IsShowStartHint { get; set; } // 0x70
public bool IsShowFinishHint { get; set; } // 0x71
public uint RewardID { get; set; } // 0x74
public uint DisplayRewardID { get; set; } // 0x78
}

View file

@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
using RPG.GameCore.Enums;
using RPG.GameCore.Excel.Attributes;
using RPG.GameCore.Types;
namespace RPG.GameCore.Excel;
[ExcelTable("MapEntryExcelTable.json", ExcelType.MapEntry)]
public class MapEntryRow : ExcelRow
{
public override uint Id => ID;
public uint ID { get; set; } // 0x10
[JsonConverter(typeof(JsonStringEnumConverter))]
public MapEntryType EntranceType { get; set; } // 0x14
public uint IsShowInMapMenu { get; set; } // 0x18
public uint EntranceGroupID { get; set; } // 0x1C
public TextID Name { get; set; } // 0x20
public TextID MapEntranceName { get; set; } // 0x24
public TextID Desc { get; set; } // 0x28
public string ImagePath { get; set; } = string.Empty; // 0x30
public uint[] MiniMapIconHintList { get; set; } = []; // 0x38
public uint ShowReward { get; set; } // 0x40
public uint PlaneID { get; set; } // 0x44
public uint FloorID { get; set; } // 0x48
public uint StartGroupID { get; set; } // 0x4C
public uint StartAnchorID { get; set; } // 0x50
public uint TargetMission { get; set; } // 0x54
public uint[] TargetMainMissionList { get; set; } = []; // 0x58
public uint[] BeginMainMissionList { get; set; } = []; // 0x60
public uint[] FinishMainMissionList { get; set; } = []; // 0x68
public uint[] FinishQuestList { get; set; } = []; // 0x70
public uint UnlockQuest { get; set; } // 0x78
}

View file

@ -21,6 +21,9 @@
<None Update="data\excel\MainMissionExcelTable.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\excel\MapEntryExcelTable.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View file

@ -0,0 +1,5 @@
namespace RPG.GameCore.Types;
public struct FixPoint
{
public long RawValue { get; }
}

View file

@ -0,0 +1,8 @@
using RPG.GameCore.Enums;
namespace RPG.GameCore.Types;
public class GCINNHHNFMP
{
public AttackDamageType LDIGCDHLBGE { get; set; } // 0x10
public FixPoint BNHLMJGNADI { get; set; } // 0x18
}

View file

@ -0,0 +1,8 @@
using System.Text.Json.Serialization;
namespace RPG.GameCore.Types;
public struct TextID
{
[JsonPropertyName("hash")]
public int Hash { get; set; }
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,186 @@
namespace RPG.Network.Proto;
public static class Retcode
{
public const uint RET_SUCC = 0;
public const uint RET_FAIL = 1;
public const uint RET_SERVER_INTERNAL_ERROR = 2;
public const uint RET_TIMEOUT = 3;
public const uint RET_REPEATED_REQ = 4;
public const uint RET_REQ_PARA_INVALID = 5;
public const uint RET_PLAYER_DATA_ERROR = 6;
public const uint RET_PLAYER_CLIENT_PAUSED = 7;
public const uint RET_REPEATE_LOGIN = 1000;
public const uint RET_RETRY_LOGIN = 1001;
public const uint RET_WAIT_LOGIN = 1002;
public const uint RET_NOT_IN_WHITE_LIST = 1003;
public const uint RET_IN_BLACK_LIST = 1004;
public const uint RET_ACCOUNT_VERIFY_ERROR = 1005;
public const uint RET_ACCOUNT_PARA_ERROR = 1006;
public const uint RET_ANTI_ADDICT_LOGIN = 1007;
public const uint RET_CHECK_SUM_ERROR = 1008;
public const uint RET_QUEST_REWARD_ALREADY_TAKEN = 1100;
public const uint RET_QUEST_NOT_ACCEPT = 1101;
public const uint RET_QUEST_NOT_FINISH = 1102;
public const uint RET_QUEST_STATUS_ERROR = 1103;
public const uint RET_AVATAR_NOT_EXIST = 1200;
public const uint RET_AVATAR_RES_EXP_NOT_ENOUGH = 1201;
public const uint RET_AVATAR_EXP_REACH_PROMOTION_LIMIT = 1202;
public const uint RET_AVATAR_REACH_MAX_PROMOTION = 1203;
public const uint RET_SKILLTREE_CONFIG_NOT_EXIST = 1204;
public const uint RET_SKILLTREE_ALREADY_UNLOCK = 1205;
public const uint RET_SKILLTREE_PRE_LOCKED = 1206;
public const uint RET_SKILLTREE_LEVEL_NOT_MEET = 1207;
public const uint RET_SKILLTREE_RANK_NOT_MEET = 1208;
public const uint RET_AVATAR_DRESS_NO_EQUIPMENT = 1209;
public const uint RET_AVATAR_EXP_ITEM_NOT_EXIST = 1210;
public const uint RET_SKILLTREE_POINT_UNLOCK = 1211;
public const uint RET_SKILLTREE_POINT_LEVEL_UPGRADE_NOT_MATCH = 1212;
public const uint RET_SKILLTREE_POINT_LEVEL_REACH_MAX = 1213;
public const uint RET_WORLD_LEVEL_NOT_MEET = 1214;
public const uint RET_PLAYER_LEVEL_NOT_MEET = 1215;
public const uint RET_ITEM_NOT_EXIST = 1300;
public const uint RET_ITEM_COST_NOT_ENOUGH = 1301;
public const uint RET_ITEM_COST_TOO_MUCH = 1302;
public const uint RET_ITEM_NO_COST = 1303;
public const uint RET_ITEM_NOT_ENOUGH = 1304;
public const uint RET_ITEM_INVALID = 1305;
public const uint RET_ITEM_CONFIG_NOT_EXIST = 1306;
public const uint RET_SCOIN_NOT_ENOUGH = 1307;
public const uint RET_ITEM_REWARD_EXCEED_LIMIT = 1308;
public const uint RET_ITEM_INVALID_USE = 1309;
public const uint RET_ITEM_USE_CONFIG_NOT_EXIST = 1310;
public const uint RET_REWARD_CONFIG_NOT_EXIST = 1311;
public const uint RET_ITEM_EXCEED_LIMIT = 1312;
public const uint RET_ITEM_COUNT_INVALID = 1313;
public const uint RET_ITEM_USE_TARGET_TYPE_INVALID = 1314;
public const uint RET_ITEM_USE_SATIETY_FULL = 1315;
public const uint RET_ITEM_COMPOSE_NOT_EXIST = 1316;
public const uint RET_EQUIPMENT_ALREADY_DRESSED = 1350;
public const uint RET_EQUIPMENT_NOT_EXIST = 1351;
public const uint RET_EQUIPMENT_REACH_LEVEL_LIMIT = 1352;
public const uint RET_EQUIPMENT_CONSUME_SELF = 1353;
public const uint RET_EQUIPMENT_ALREADY_LOCKED = 1354;
public const uint RET_EQUIPMENT_ALREADY_UNLOCKED = 1355;
public const uint RET_EQUIPMENT_LOCKED = 1356;
public const uint RET_EQUIPMENT_SELECT_NUM_OVER_LIMIT = 1357;
public const uint RET_EQUIPMENT_RANK_UP_MUST_CONSUME_SAME_TID = 1358;
public const uint RET_EQUIPMENT_PROMOTION_REACH_MAX = 1359;
public const uint RET_EQUIPMENT_RANK_UP_REACH_MAX = 1360;
public const uint RET_EQUIPMENT_LEVEL_REACH_MAX = 1361;
public const uint RET_EQUIPMENT_EXCEED_LIMIT = 1362;
public const uint RET_LINEUP_INVALID_INDEX = 1400;
public const uint RET_LINEUP_INVALID_MEMBER_POS = 1401;
public const uint RET_LINEUP_SWAP_NOT_EXIST = 1402;
public const uint RET_LINEUP_AVATAR_ALREADY_IN = 1403;
public const uint RET_LINEUP_CREATE_AVATAR_ERROR = 1404;
public const uint RET_LINEUP_AVATAR_INIT_ERROR = 1405;
public const uint RET_LINEUP_NOT_EXIST = 1406;
public const uint RET_LINEUP_ONLY_ONE_MEMBER = 1407;
public const uint RET_LINEUP_SAME_LEADER_SLOT = 1408;
public const uint RET_LINEUP_NO_LEADER_SELECT = 1409;
public const uint RET_LINEUP_SWAP_SAME_SLOT = 1410;
public const uint RET_LINEUP_AVATAR_NOT_EXIST = 1411;
public const uint RET_LINEUP_TRIAL_AVATAR_CAN_NOT_QUIT = 1412;
public const uint RET_LINEUP_VIRTUAL_LINEUP_PLANE_NOT_MATCH = 1413;
public const uint RET_LINEUP_NOT_VALID_LEADER = 1414;
public const uint RET_LINEUP_SAME_INDEX = 1415;
public const uint RET_LINEUP_IS_EMPTY = 1416;
public const uint RET_LINEUP_NAME_FORMAT_ERROR = 1417;
public const uint RET_MAIL_NOT_EXIST = 1700;
public const uint RET_MAIL_RANGE_INVALID = 1701;
public const uint RET_MAIL_MAIL_ID_INVALID = 1702;
public const uint RET_MAIL_NO_MAIL_TAKE_ATTACHMENT = 1703;
public const uint RET_MAIL_NO_MAIL_TO_DEL = 1704;
public const uint RET_STAGE_SETTLE_ERROR = 1800;
public const uint RET_STAGE_CONFIG_NOT_EXIST = 1801;
public const uint RET_STAGE_NOT_FOUND = 1802;
public const uint RET_STAGE_COCOON_PROP_NOT_VALID = 1804;
public const uint RET_STAGE_COCOON_WAVE_NOT_VALID = 1805;
public const uint RET_STAGE_PROP_ID_NOT_EQUAL = 1806;
public const uint RET_STAGE_COCOON_WAVE_OVER = 1807;
public const uint RET_CHAPTER_LOCK = 1900;
public const uint RET_CHAPTER_CHALLENGE_NUM_NOT_ENOUGH = 1901;
public const uint RET_CHAPTER_REWARD_ID_NOT_EXIST = 1902;
public const uint RET_CHAPTER_REWARD_ALREADY_TAKEN = 1903;
public const uint RET_BATTLE_STAGE_NOT_MATCH = 2000;
public const uint RET_IN_BATTLE_NOW = 2001;
public const uint RET_BATTLE_CHEAT = 2002;
public const uint RET_BATTLE_FAIL = 2003;
public const uint RET_BATTLE_NO_LINEUP = 2004;
public const uint RET_BATTLE_LINEUP_EMPTY = 2005;
public const uint RET_BATTLE_VERSION_NOT_MATCH = 2006;
public const uint RET_LACK_EXCHANGE_STAMINA_TIMES = 2100;
public const uint RET_LACK_STAMINA = 2101;
public const uint RET_STAMINA_FULL = 2102;
public const uint RET_AUTHKEY_SIGN_TYPE_ERROR = 2103;
public const uint RET_AUTHKEY_SIGN_VER_ERROR = 2104;
public const uint RET_NICKNAME_FORMAT_ERROR = 2105;
public const uint RET_SENSITIVE_WORDS = 2106;
public const uint RET_LEVEL_REWARD_HAS_TAKEN = 2107;
public const uint RET_LEVEL_REWARD_LEVEL_ERROR = 2108;
public const uint RET_LANGUAGE_INVALID = 2109;
public const uint RET_MAZE_NOT_FINISH = 2200;
public const uint RET_MAZE_LACK_TICKET = 2201;
public const uint RET_MAZE_NOT_UNLOCK = 2202;
public const uint RET_MAZE_DIFFICULTY_LIMIT = 2203;
public const uint RET_MAZE_NO_ABILITY = 2204;
public const uint RET_MAZE_NO_PLANE = 2205;
public const uint RET_MAZE_STAGE_DISMATCH = 2206;
public const uint RET_MAZE_MAP_NOT_EXIST = 2207;
public const uint RET_MAZE_TYPE_NOT_EXIST = 2208;
public const uint RET_MAZE_ALREADY_FINISH = 2209;
public const uint RET_MAZE_PROP_NOT_EXIST = 2210;
public const uint RET_MAZE_POSITION_TOO_FAR = 2211;
public const uint RET_MAZE_SKILL_CAST_CNT_REACH_MAX = 2212;
public const uint RET_MAZE_MP_NOT_ENOUGH = 2213;
public const uint RET_SPRING_NOT_ENABLE = 2214;
public const uint RET_SPRING_REFRESH_IN_CD = 2215;
public const uint RET_SPRING_TOO_FAR = 2216;
public const uint RET_MAZE_NO_FLOOR = 2217;
public const uint RET_NOT_IN_MAZE = 2218;
public const uint RET_PLANE_ID_NOT_MATCH = 2219;
public const uint RET_FLOOR_ID_NOT_MATCH = 2220;
public const uint RET_SAVEPOINTS_TIMES_ZERO = 2221;
public const uint RET_PLOT_NOT_UNLOCK = 2300;
public const uint RET_MISSION_NOT_EXIST = 2400;
public const uint RET_MISSION_ALREADY_DONE = 2401;
public const uint RET_DAILY_TASK_NOT_FINISH = 2402;
public const uint RET_DAILY_TASK_REWARD_HAS_TAKEN = 2403;
public const uint RET_MISSION_NOT_FINISH = 2404;
public const uint RET_MISSION_NOT_DOING = 2405;
public const uint RET_MISSION_FINISH_WAY_NOT_MATCH = 2406;
public const uint RET_MISSION_SCENE_NOT_MATCH = 2407;
public const uint RET_ADVENTURE_MAP_NOT_EXIST = 2500;
public const uint RET_SCENE_ENTITY_NOT_EXIST = 2600;
public const uint RET_NOT_IN_SCENE = 2601;
public const uint RET_SCENE_MONSTER_NOT_EXIST = 2602;
public const uint RET_INTERACT_CONFIG_NOT_EXIST = 2603;
public const uint RET_UNSUPPORTED_PROP_STATE = 2604;
public const uint RET_SCENE_ENTRY_ID_NOT_MATCH = 2605;
public const uint RET_ASSIST_MONSTER_COUNT_LIMIT = 2607;
public const uint RET_SCENE_USE_SKILL_FAIL = 2608;
public const uint RET_PROP_IS_HIDDEN = 2609;
public const uint RET_LOADING_SUCC_ALREADY = 2610;
public const uint RET_SCENE_ENTITY_TYPE_INVALID = 2611;
public const uint RET_INTERACT_TYPE_INVALID = 2612;
public const uint RET_INTERACT_NOT_IN_REGION = 2613;
public const uint RET_INTERACT_SUB_TYPE_INVALID = 2614;
public const uint RET_NOT_LEADER_ENTITY = 2615;
public const uint RET_BUY_TIMES_LIMIT = 2700;
public const uint RET_BUY_LIMIT_TYPE = 2701;
public const uint RET_SHOP_NOT_OPEN = 2702;
public const uint RET_GOODS_NOT_OPEN = 2703;
public const uint RET_TUTORIAL_NOT_UNLOCK = 2751;
public const uint RET_TUTORIAL_UNLOCK_ALREADY = 2752;
public const uint RET_TUTORIAL_FINISH_ALREADY = 2753;
public const uint RET_TUTORIAL_PRE_NOT_UNLOCK = 2754;
public const uint RET_TUTORIAL_PLAYER_LEVEL_NOT_MATCH = 2755;
public const uint RET_TUTORIAL_TUTORIAL_NOT_FOUND = 2756;
public const uint RET_CHALLENGE_NOT_EXIST = 2801;
public const uint RET_CHALLENGE_NOT_UNLOCK = 2802;
public const uint RET_CHALLENGE_ALREADY = 2803;
public const uint RET_CHALLENGE_LINEUP_EDIT_FORBIDDEN = 2804;
public const uint RET_CHALLENGE_LINEUP_EMPTY = 2805;
public const uint RET_CHALLENGE_NOT_DOING = 2806;
public const uint RET_CHALLENGE_NOT_FINISH = 2807;
}

View file

@ -386,7 +386,7 @@ enum BattleEndStatus {
BATTLE_END_QUIT = 3;
}
enum Retcode {
enum ERetcode {
RET_SUCC = 0;
RET_FAIL = 1;
RET_SERVER_INTERNAL_ERROR = 2;

View file

@ -1,10 +1,18 @@
using RPG.Network.Proto;
using RPG.GameCore.Excel;
using RPG.Network.Proto;
using RPG.Services.Gameserver.Modules.Attributes;
using RPG.Services.Gameserver.Session;
namespace RPG.Services.Gameserver.Modules;
internal class AdventureModule : BaseModule
{
private readonly ExcelTables _tables;
public AdventureModule(ExcelTables excelTables)
{
_tables = excelTables;
}
[OnCommand(CmdType.CmdGetCurSceneInfoCsReq)]
public Task OnCmdGetCurSceneInfoCsReq(PlayerSession session, ReadOnlyMemory<byte> _)
{
@ -23,4 +31,61 @@ internal class AdventureModule : BaseModule
return Task.CompletedTask;
}
[OnCommand(CmdType.CmdGetMazeMapInfoCsReq)]
public Task OnCmdGetMazeMapInfoCsReq(PlayerSession session, ReadOnlyMemory<byte> body)
{
GetMazeMapInfoCsReq req = GetMazeMapInfoCsReq.Parser.ParseFrom(body.Span);
Send(session, CmdType.CmdGetMazeMapInfoScRsp, new GetMazeMapInfoScRsp
{
Retcode = 0,
EntryId = req.EntryId,
// TODO:
LightenSectionList = { },
MazeGroupList = { },
MazePropList = { }
});
return Task.CompletedTask;
}
[OnCommand(CmdType.CmdEnterMazeCsReq)]
public Task OnCmdEnterMazeCsReq(PlayerSession session, ReadOnlyMemory<byte> body)
{
EnterMazeCsReq req = EnterMazeCsReq.Parser.ParseFrom(body.Span);
MapEntryRow? entry = _tables.GetExcelRow<MapEntryRow>(ExcelType.MapEntry, req.EntryId);
if (entry == null)
{
Send(session, CmdType.CmdEnterMazeScRsp, new EnterMazeScRsp
{
Retcode = Retcode.RET_MAZE_MAP_NOT_EXIST
});
return Task.CompletedTask;
}
Send(session, CmdType.CmdEnterMazeScRsp, new EnterMazeScRsp
{
Retcode = 0,
Maze = new Maze
{
MapEntryId = entry.ID,
Id = entry.PlaneID,
Floor = new MazeFloor
{
FloorId = entry.FloorID,
Scene = new SceneInfo
{
EntryId = entry.ID,
PlaneId = entry.PlaneID,
FloorId = entry.FloorID
}
}
},
});
return Task.CompletedTask;
}
}

View file

@ -25,7 +25,7 @@ internal class AvatarModule : BaseModule
foreach (ExcelRow row in _excelTables.GetAllRows(ExcelType.Avatar))
{
if (row is AvatarExcelRow avatarRow)
if (row is AvatarRow avatarRow)
{
if (avatarRow.AvatarID >= 9000) continue;