├── .editorconfig ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml └── workflows │ ├── codeql.yml │ └── dotnet.yml ├── .gitignore ├── LICENSE ├── NosCore.sln ├── NosCore.sln.DotSettings ├── NosCore.sln.startup.json ├── NuGet.config ├── README.md ├── build-exe.cmd ├── build.cmd ├── build └── .gitkeep ├── codecov.yml ├── configuration ├── api.yml ├── database.yml ├── logger.yml ├── login.yml ├── master.yml ├── parser.yml └── world.yml ├── deploy ├── Dockerfile-login ├── Dockerfile-master └── Dockerfile-world ├── docker-compose.yml ├── documentation └── PostmanCollection │ └── NosCore.postman_collection.json ├── lgtm.yml ├── scripts ├── Docker - All.cmd ├── Docker - LoginServer.cmd ├── Docker - MasterServer.cmd ├── Docker - Postgres.cmd ├── Docker - ReverseProxy.cmd ├── Docker - Shutdown.cmd ├── Docker - WorldServer.cmd ├── LoginServer.cmd ├── MasterServer.cmd ├── Parser.cmd ├── WorldServer.cmd └── docker-publish.sh ├── src ├── NosCore.Core │ ├── AuthorizeRoleAttribute.cs │ ├── Channel.cs │ ├── ChannelInfo.cs │ ├── Configuration │ │ ├── LoginConfiguration.cs │ │ └── WorldConfiguration.cs │ ├── ConfigureJwtBearerOptions.cs │ ├── ConnectionInfo.cs │ ├── Encryption │ │ ├── BcryptEncryption.cs │ │ ├── Pbkdf2Hasher.cs │ │ └── Sha512Hasher.cs │ ├── Extensions │ │ └── TypeExtension.cs │ ├── I18N │ │ ├── GameLanguageLocalizer.cs │ │ └── IGameLanguageLocalizer.cs │ ├── NosCore.Core.csproj │ ├── Services │ │ └── IdService │ │ │ ├── IIdService.cs │ │ │ └── IdService.cs │ ├── SessionFactory.cs │ └── packages.lock.json ├── NosCore.Data │ ├── CommandPackets │ │ ├── ChangeChannelPacket.cs │ │ ├── ChangeClassPacket.cs │ │ ├── ClearInventoryPacket.cs │ │ ├── CommandPacketHeaderAttribute.cs │ │ ├── CreateItemPacket.cs │ │ ├── EffectCommandPacket.cs │ │ ├── EntryPointPacket.cs │ │ ├── FlCommandPacket.cs │ │ ├── GiftPacket.cs │ │ ├── HelpPacket.cs │ │ ├── ICommandPacket.cs │ │ ├── InvisibleCommandPacket.cs │ │ ├── KickPacket.cs │ │ ├── PositionPacket.cs │ │ ├── SetGoldCommandPacket.cs │ │ ├── SetHeroLevelCommandPacket.cs │ │ ├── SetJobLevelCommandPacket.cs │ │ ├── SetLevelCommandPacket.cs │ │ ├── SetMaintenancePacket.cs │ │ ├── SetReputationPacket.cs │ │ ├── ShoutPacket.cs │ │ ├── SizePacket.cs │ │ ├── SpeedPacket.cs │ │ └── TeleportPacket.cs │ ├── DataAttributes │ │ └── StaticMetaDataAttribute.cs │ ├── Dto │ │ ├── I18NFromAttribute.cs │ │ ├── I18NString.cs │ │ ├── IDTO.cs │ │ ├── II18NDto.cs │ │ ├── IItemInstanceDto.cs │ │ ├── IStaticDto.cs │ │ └── StaticDtoExtension.cs │ ├── Enumerations │ │ ├── Audit │ │ │ └── AuditLogType.cs │ │ ├── Battle │ │ │ └── TargetHitType.cs │ │ ├── Bazaar │ │ │ ├── BazaarEquipmentType.cs │ │ │ ├── BazaarJeweleryType.cs │ │ │ ├── BazaarMainType.cs │ │ │ └── BazaarUsableType.cs │ │ ├── Buff │ │ │ ├── AdditionalTypes.cs │ │ │ ├── BCardType.cs │ │ │ ├── BuffType.cs │ │ │ ├── MedalType.cs │ │ │ ├── ShellOptionType.cs │ │ │ └── StaticBonusType.cs │ │ ├── Character │ │ │ ├── CharacterOption.cs │ │ │ ├── CharacterState.cs │ │ │ ├── FactionType.cs │ │ │ └── MateType.cs │ │ ├── Event │ │ │ ├── EventActionType.cs │ │ │ └── EventType.cs │ │ ├── Family │ │ │ ├── FamilyAuthority.cs │ │ │ ├── FamilyLogType.cs │ │ │ └── FamilyMemberRank.cs │ │ ├── Group │ │ │ ├── GroupSharingType.cs │ │ │ └── GroupType.cs │ │ ├── HashingType.cs │ │ ├── I18N │ │ │ └── LanguageKey.cs │ │ ├── Interaction │ │ │ ├── Act4RaidType.cs │ │ │ ├── ArenaTeamType.cs │ │ │ ├── ChatType.cs │ │ │ ├── GeneralLogType.cs │ │ │ ├── InRespawnType.cs │ │ │ ├── PenaltyType.cs │ │ │ ├── ReceiverType.cs │ │ │ ├── RespawnType.cs │ │ │ ├── ScriptedInstanceType.cs │ │ │ ├── TalentArenaOptionType.cs │ │ │ └── TeleporterType.cs │ │ ├── Items │ │ │ ├── CellonType.cs │ │ │ ├── ItemEffectType.cs │ │ │ ├── ItemType.cs │ │ │ ├── JewelOptionType.cs │ │ │ ├── RarifyMode.cs │ │ │ ├── RarifyProtection.cs │ │ │ ├── UpgradeMode.cs │ │ │ └── UpgradeProtection.cs │ │ ├── Map │ │ │ ├── MapInstanceEventType.cs │ │ │ ├── MapInstanceType.cs │ │ │ ├── MapTypeType.cs │ │ │ └── MonsterType.cs │ │ ├── Miniland │ │ │ └── WarehouseType.cs │ │ ├── NoscorePocketType.cs │ │ ├── Quest │ │ │ └── QuestRewardType.cs │ │ ├── SaveResult.cs │ │ └── UpdateStatActionType.cs │ ├── GameObjectMapper.cs │ ├── NosCore.Data.csproj │ ├── Resource │ │ ├── LocalizedResources.Designer.cs │ │ ├── LocalizedResources.cs.resx │ │ ├── LocalizedResources.de.resx │ │ ├── LocalizedResources.es.resx │ │ ├── LocalizedResources.fr.resx │ │ ├── LocalizedResources.it.resx │ │ ├── LocalizedResources.pl.resx │ │ ├── LocalizedResources.resx │ │ ├── LocalizedResources.ru.resx │ │ └── LocalizedResources.tr.resx │ ├── SkillPacket.cs │ ├── WebApi │ │ ├── AuthIntent.cs │ │ ├── BazaarLink.cs │ │ ├── BazaarRequest.cs │ │ ├── BlacklistRequest.cs │ │ ├── Character.cs │ │ ├── CharacterRelationStatus.cs │ │ ├── FriendShipRequest.cs │ │ ├── MailRequest.cs │ │ ├── Subscriber.cs │ │ ├── WareHouseDepositRequest.cs │ │ └── WarehouseLink.cs │ └── packages.lock.json ├── NosCore.Database │ ├── DesignTimeDbContextFactory.cs │ ├── Entities │ │ ├── Account.cs │ │ ├── Act.cs │ │ ├── ActPart.cs │ │ ├── AuditLog.cs │ │ ├── BCard.cs │ │ ├── Base │ │ │ ├── I18NStringAttribute.cs │ │ │ ├── IEntity.cs │ │ │ ├── IStaticEntity.cs │ │ │ └── SynchronizableBaseEntity.cs │ │ ├── BazaarItem.cs │ │ ├── BoxInstance.cs │ │ ├── Card.cs │ │ ├── Character.cs │ │ ├── CharacterActPart.cs │ │ ├── CharacterQuest.cs │ │ ├── CharacterRelation.cs │ │ ├── Characterskill.cs │ │ ├── Combo.cs │ │ ├── Drop.cs │ │ ├── EquipmentOption.cs │ │ ├── Family.cs │ │ ├── FamilyCharacter.cs │ │ ├── FamilyLog.cs │ │ ├── I18NActDesc.cs │ │ ├── I18NBCard.cs │ │ ├── I18NCard.cs │ │ ├── I18NItem.cs │ │ ├── I18NMapIdData.cs │ │ ├── I18NMapPointData.cs │ │ ├── I18NNpcMonster.cs │ │ ├── I18NNpcMonsterTalk.cs │ │ ├── I18NQuest.cs │ │ ├── I18NSkill.cs │ │ ├── InventoryItemInstance.cs │ │ ├── Item.cs │ │ ├── ItemInstance.cs │ │ ├── Mail.cs │ │ ├── Map.cs │ │ ├── MapMonster.cs │ │ ├── MapNpc.cs │ │ ├── MapType.cs │ │ ├── MapTypeMap.cs │ │ ├── Mate.cs │ │ ├── Miniland.cs │ │ ├── MinilandObject.cs │ │ ├── NpcMonster.cs │ │ ├── NpcMonsterskill.cs │ │ ├── NpcTalk.cs │ │ ├── PenaltyLog.cs │ │ ├── Portal.cs │ │ ├── Quest.cs │ │ ├── QuestObjective.cs │ │ ├── QuestQuestReward.cs │ │ ├── QuestReward.cs │ │ ├── QuicklistEntry.cs │ │ ├── Recipe.cs │ │ ├── RecipeItem.cs │ │ ├── Respawn.cs │ │ ├── RespawnMapType.cs │ │ ├── RollGeneratedItem.cs │ │ ├── Script.cs │ │ ├── ScriptedInstance.cs │ │ ├── Shop.cs │ │ ├── ShopItem.cs │ │ ├── Shopskill.cs │ │ ├── Skill.cs │ │ ├── SpecialistInstance.cs │ │ ├── StaticBonus.cs │ │ ├── StaticBuff.cs │ │ ├── Teleporter.cs │ │ ├── Title.cs │ │ ├── UsableInstance.cs │ │ ├── Warehouse.cs │ │ ├── WarehouseItem.cs │ │ └── WearableInstance.cs │ ├── Migrations │ │ ├── 20220103074410_FirstMigration.Designer.cs │ │ ├── 20220103074410_FirstMigration.cs │ │ ├── 20231125092440_BumpToEf8.Designer.cs │ │ ├── 20231125092440_BumpToEf8.cs │ │ └── NosCoreContextModelSnapshot.cs │ ├── NosCore.Database.csproj │ ├── NosCoreContext.cs │ └── packages.lock.json ├── NosCore.GameObject │ ├── Character.cs │ ├── CharacterRelation.cs │ ├── ComponentEntities │ │ ├── Extensions │ │ │ ├── AliveEntityExtension.cs │ │ │ ├── CharacterEntityExtension.cs │ │ │ ├── GroupExtension.cs │ │ │ ├── ItemInstanceExtension.cs │ │ │ └── VisualEntityExtension.cs │ │ └── Interfaces │ │ │ ├── IAliveEntity.cs │ │ │ ├── ICharacterEntity.cs │ │ │ ├── ICountableEntity.cs │ │ │ ├── INamedEntity.cs │ │ │ ├── INonPlayableEntity.cs │ │ │ ├── IRequestableEntity.cs │ │ │ └── IVisualEntity.cs │ ├── ExchangeData.cs │ ├── Gift.cs │ ├── Group.cs │ ├── Helper │ │ ├── GiftHelper.cs │ │ └── MinilandHelper.cs │ ├── Holders │ │ ├── BazaarItemsHolder.cs │ │ ├── ExchangeRequestHolder.cs │ │ ├── FriendRequestHolder.cs │ │ ├── MapInstanceHolder.cs │ │ ├── MinilandHolder.cs │ │ └── ParcelHolder.cs │ ├── IEventHandler.cs │ ├── IPacketHandler.cs │ ├── InterChannelCommunication │ │ ├── HubConnectionFactory.cs │ │ ├── Hubs │ │ │ ├── AuthHub │ │ │ │ ├── AuthHub.cs │ │ │ │ ├── AuthHubClient.cs │ │ │ │ └── IAuthHub.cs │ │ │ ├── BazaarHub │ │ │ │ ├── BazaarHub.cs │ │ │ │ ├── BazaarHubClient.cs │ │ │ │ └── IBazaarHub.cs │ │ │ ├── BlacklistHub │ │ │ │ ├── BlacklistHub.cs │ │ │ │ ├── BlacklistHubClient.cs │ │ │ │ └── IBlacklistHub.cs │ │ │ ├── ChannelHub │ │ │ │ ├── ChannelHub.cs │ │ │ │ ├── ChannelHubClient.cs │ │ │ │ └── IChannelHub.cs │ │ │ ├── FriendHub │ │ │ │ ├── FriendHub.cs │ │ │ │ ├── FriendHubClient.cs │ │ │ │ └── IFriendHub.cs │ │ │ ├── MailHub │ │ │ │ ├── IMailHub.cs │ │ │ │ ├── MailHub.cs │ │ │ │ └── MailHubClient.cs │ │ │ ├── PubSub │ │ │ │ ├── IPubSubHub.cs │ │ │ │ ├── PubSubHub.cs │ │ │ │ └── PubSubHubClient.cs │ │ │ └── WarehouseHub │ │ │ │ ├── IWarehouseHub.cs │ │ │ │ ├── WarehouseHub.cs │ │ │ │ └── WarehouseHubClient.cs │ │ ├── MasterClientList.cs │ │ ├── Messages │ │ │ ├── DeleteMailData.cs │ │ │ ├── DisconnectData.cs │ │ │ ├── IMessage.cs │ │ │ ├── MailData.cs │ │ │ ├── PostedPacket.cs │ │ │ └── StatData.cs │ │ └── PolymorphicConverter.cs │ ├── Map │ │ └── Map.cs │ ├── MapMonster.cs │ ├── MapNpc.cs │ ├── Networking │ │ ├── Broadcaster.cs │ │ └── ClientSession │ │ │ ├── ClientSession.cs │ │ │ └── RequestData.cs │ ├── NosCore.GameObject.csproj │ ├── Pet.cs │ ├── Portal.cs │ ├── Services │ │ ├── BattleService │ │ │ ├── BattleService.cs │ │ │ ├── CharacterSkill.cs │ │ │ ├── DamageResult.cs │ │ │ ├── HitArguments.cs │ │ │ ├── IBattleService.cs │ │ │ └── SkillResult.cs │ │ ├── BazaarService │ │ │ ├── BazaarService.cs │ │ │ └── IBazaarService.cs │ │ ├── BlackListService │ │ │ ├── BlacklistService.cs │ │ │ └── IBlacklistService.cs │ │ ├── ChannelCommunicationService │ │ │ └── Handlers │ │ │ │ ├── DeleteMailDataMessageChannelCommunicationMessageHandler.cs │ │ │ │ ├── DisconnectDataMessageChannelCommunicationMessageHandler.cs │ │ │ │ ├── IChannelCommunicationMessageHandler.cs │ │ │ │ ├── MailDataMessageChannelCommunicationMessageHandler.cs │ │ │ │ ├── PostedPacketMessageChannelCommunicationMessageHandler.cs │ │ │ │ └── StatDataMessageChannelCommunicationMessageHandler.cs │ │ ├── ChannelService │ │ │ ├── ChannelService.cs │ │ │ └── IChannelService.cs │ │ ├── EventLoaderService │ │ │ ├── Clock.cs │ │ │ ├── EventLoaderService.cs │ │ │ ├── Handlers │ │ │ │ ├── ChannelCommunicationRunner.cs │ │ │ │ ├── RemoveTimeoutStaticBonuses.cs │ │ │ │ └── SaveAll.cs │ │ │ ├── IEventLoaderService.cs │ │ │ └── ITimedEventHandler.cs │ │ ├── ExchangeService │ │ │ ├── ExchangeService.cs │ │ │ └── IExchangeService.cs │ │ ├── FriendService │ │ │ ├── FriendService.cs │ │ │ └── IFriendService.cs │ │ ├── GuriRunnerService │ │ │ ├── GuriRunnerService.cs │ │ │ ├── Handlers │ │ │ │ ├── EmoticonHandler.cs │ │ │ │ ├── MfaGuriHandler.cs │ │ │ │ ├── SpeakerGuriHandler.cs │ │ │ │ └── TitleGuriHandler.cs │ │ │ ├── IGuriEventHandler.cs │ │ │ └── IGuriRunnerService.cs │ │ ├── InventoryService │ │ │ ├── IInventoryService.cs │ │ │ ├── InventoryItemInstance.cs │ │ │ └── InventoryService.cs │ │ ├── ItemGenerationService │ │ │ ├── Handlers │ │ │ │ ├── BackPackHandler.cs │ │ │ │ ├── BazaarMedalsHandler.cs │ │ │ │ ├── MinilandBellHandler.cs │ │ │ │ ├── SpRechargerHandler.cs │ │ │ │ ├── SpeakerHandler.cs │ │ │ │ ├── TitleHandler.cs │ │ │ │ ├── VehicleHandler.cs │ │ │ │ └── WearHandler.cs │ │ │ ├── IItemGenerationService.cs │ │ │ ├── IUseItemEventHandler.cs │ │ │ ├── Item │ │ │ │ ├── BoxInstance.cs │ │ │ │ ├── IItemInstance.cs │ │ │ │ ├── Item.cs │ │ │ │ ├── ItemInstance.cs │ │ │ │ ├── SpecialistInstance.cs │ │ │ │ ├── UsableInstance.cs │ │ │ │ └── WearableInstance.cs │ │ │ └── ItemGenerationService.cs │ │ ├── LoginService │ │ │ ├── ILoginService.cs │ │ │ └── LoginService.cs │ │ ├── MailService │ │ │ ├── IMailService.cs │ │ │ └── MailService.cs │ │ ├── MapChangeService │ │ │ ├── IMapChangeService.cs │ │ │ └── MapChangeService.cs │ │ ├── MapInstanceAccessService │ │ │ ├── IMapInstanceAccessService.cs │ │ │ └── MapInstanceAccessService.cs │ │ ├── MapInstanceGenerationService │ │ │ ├── Handlers │ │ │ │ └── MinilandEntranceHandler.cs │ │ │ ├── IMapInstanceEntranceEventHandler.cs │ │ │ ├── IMapInstanceGenerationService.cs │ │ │ ├── MapDesignObject.cs │ │ │ ├── MapInstance.cs │ │ │ └── MapInstanceGenerationService.cs │ │ ├── MapItemGenerationService │ │ │ ├── Handlers │ │ │ │ ├── DropHandler.cs │ │ │ │ ├── GoldDropHandler.cs │ │ │ │ └── SpChargerHandler.cs │ │ │ ├── IGetMapItemEventHandler.cs │ │ │ ├── IMapItemGenerationService.cs │ │ │ ├── MapItem.cs │ │ │ └── MapItemGenerationService.cs │ │ ├── MinilandService │ │ │ ├── IMinilandService.cs │ │ │ ├── Miniland.cs │ │ │ └── MinilandService.cs │ │ ├── NRunService │ │ │ ├── Handlers │ │ │ │ ├── BazaarHandler.cs │ │ │ │ ├── ChangeClassHandler.cs │ │ │ │ ├── OpenShopHandler.cs │ │ │ │ └── TeleporterHandler.cs │ │ │ ├── INrunEventHandler.cs │ │ │ ├── INrunService.cs │ │ │ └── NrunService.cs │ │ ├── QuestService │ │ │ ├── IQuestService.cs │ │ │ ├── Quest.cs │ │ │ └── QuestService.cs │ │ ├── SaveService │ │ │ ├── ISaveService.cs │ │ │ └── SaveService.cs │ │ ├── SkillService │ │ │ ├── ISkillService.cs │ │ │ └── SkillService.cs │ │ ├── SpeedCalculationService │ │ │ ├── ISpeedCalculationService.cs │ │ │ └── SpeedCalculationService.cs │ │ ├── TransformationService │ │ │ ├── ITransformationService.cs │ │ │ └── TransformationService.cs │ │ └── WarehouseService │ │ │ ├── IWarehouseService.cs │ │ │ └── WarehouseService.cs │ ├── Shop.cs │ ├── ShopItem.cs │ ├── WarehouseItem.cs │ └── packages.lock.json ├── NosCore.LoginServer │ ├── LoginServer.cs │ ├── LoginServerBootstrap.cs │ ├── NosCore.LoginServer.csproj │ └── packages.lock.json ├── NosCore.MasterServer │ ├── MasterConfiguration.cs │ ├── MasterServer.cs │ ├── MasterServerBootstrap.cs │ ├── NosCore.MasterServer.csproj │ ├── Startup.cs │ └── packages.lock.json ├── NosCore.PacketHandlers │ ├── Battle │ │ └── UseSkillPacketHandler.cs │ ├── Bazaar │ │ ├── CBListPacketHandler.cs │ │ ├── CBuyPacketHandler.cs │ │ ├── CModPacketHandler.cs │ │ ├── CRegPacketHandler.cs │ │ ├── CSListPacketHandler.cs │ │ ├── CScalcPacketHandler.cs │ │ └── CSkillPacketHandler.cs │ ├── CharacterScreen │ │ ├── CharNewJobPacketHandler.cs │ │ ├── CharNewPacketHandler.cs │ │ ├── CharRenPacketHandler.cs │ │ ├── CharacterDeletePacketHandler.cs │ │ ├── DacPacketHandler.cs │ │ ├── EntryPointPacketHandler.cs │ │ └── SelectPacketHandler.cs │ ├── Chat │ │ ├── BtkPacketHandler.cs │ │ ├── ClientSayPacketHandler.cs │ │ └── WhisperPacketHandler.cs │ ├── Command │ │ ├── ChangeChannelPacketHandler.cs │ │ ├── ChangeClassPacketHandler.cs │ │ ├── CreateItemPacketHandler.cs │ │ ├── EffectCommandPacketHandler.cs │ │ ├── GiftPacketHandler.cs │ │ ├── HelpPacketHandler.cs │ │ ├── InvisibleCommandPacketHandler.cs │ │ ├── KickPacketHandler.cs │ │ ├── PositionPacketHandler.cs │ │ ├── SetGoldCommandPacketHandler.cs │ │ ├── SetHeroLevelCommandPacketHandler.cs │ │ ├── SetJobLevelCommandPacketHandler.cs │ │ ├── SetLevelCommandPacketHandler.cs │ │ ├── SetMaintenancePacketHandler.cs │ │ ├── SetReputationPacketHandler.cs │ │ ├── ShoutPacketHandler.cs │ │ ├── SizePacketHandler.cs │ │ ├── SpeedPacketHandler.cs │ │ └── TeleportPacketHandler.cs │ ├── Exchange │ │ ├── ExcListPacketHandler.cs │ │ └── ExchangeRequestPacketHandler.cs │ ├── Friend │ │ ├── BlDelPacketHandler.cs │ │ ├── BlInsPacketHandler.cs │ │ ├── BlPacketHandler.cs │ │ ├── FdelPacketHandler.cs │ │ ├── FinsPacketHandler.cs │ │ └── FlPacketHandler.cs │ ├── Game │ │ ├── GameStartPacketHandler.cs │ │ ├── GuriPacketHandler.cs │ │ ├── NcifPacketHandler.cs │ │ ├── PulsePacketHandler.cs │ │ ├── QSetPacketHandler.cs │ │ └── TitEqPacketHandler.cs │ ├── Group │ │ ├── GroupTalkPacketHandler.cs │ │ ├── PjoinPacketHandler.cs │ │ └── PleavePacketHandler.cs │ ├── Inventory │ │ ├── BiPacketHandler.cs │ │ ├── GetPacketHandler.cs │ │ ├── MvePacketHandler.cs │ │ ├── MviPacketHandler.cs │ │ ├── PutPacketHandler.cs │ │ ├── RemovePacketHandler.cs │ │ ├── SpTransformPacketHandler.cs │ │ ├── UseItemPacketHandler.cs │ │ └── WearPacketHandler.cs │ ├── Login │ │ ├── NoS0575PacketHandler.cs │ │ └── NoS0577PacketHandler.cs │ ├── Miniland │ │ ├── AddobjPacketHandler.cs │ │ ├── MJoinPacketHandler.cs │ │ ├── MinilandObjects │ │ │ ├── MgPacketHandler.cs │ │ │ └── UseobjPacketHandler.cs │ │ ├── MlobjPacketHandler.cs │ │ └── RmvobjPacketHandler.cs │ ├── Movement │ │ ├── ClientDirPacketHandler.cs │ │ ├── PreqPacketHandler.cs │ │ ├── SitPacketHandler.cs │ │ └── WalkPacketHandler.cs │ ├── NoAction │ │ ├── CClosePacketHandler.cs │ │ ├── LbsPacketHandler.cs │ │ ├── SnapPacketHandler.cs │ │ └── ZeroPacketHandler.cs │ ├── NosCore.PacketHandlers.csproj │ ├── Parcel │ │ ├── PclPacketHandler.cs │ │ └── PstClientPacketHandler.cs │ ├── Quest │ │ ├── QTPacketHandler.cs │ │ └── ScriptPacketHandler.cs │ ├── Shops │ │ ├── BuyPacketHandler.cs │ │ ├── MShopPacketHandler.cs │ │ ├── NrunPacketHandler.cs │ │ ├── RequestNpcPacketHandler.cs │ │ ├── SellPacketHandler.cs │ │ └── ShoppingPacketHandler.cs │ ├── Warehouse │ │ ├── DepositPacketHandler.cs │ │ ├── FDepositPacketHandler.cs │ │ ├── FReposPacketHandler.cs │ │ ├── FStashEndPacketHandler.cs │ │ ├── FWithdrawPacketHandler.cs │ │ ├── ReposPacketHandler.cs │ │ ├── StashEndPacketHandler.cs │ │ └── WithdrawPacketHandler.cs │ └── packages.lock.json ├── NosCore.Parser │ ├── ImportFactory.cs │ ├── NosCore.Parser.csproj │ ├── Parser.cs │ ├── ParserBootstrap.cs │ ├── ParserConfiguration.cs │ ├── Parsers │ │ ├── ActParser.cs │ │ ├── CardParser.cs │ │ ├── DropParser.cs │ │ ├── Generic │ │ │ └── GenericParser.cs │ │ ├── I18NParser.cs │ │ ├── ItemParser.cs │ │ ├── MapMonsterParser.cs │ │ ├── MapNpcParser.cs │ │ ├── MapParser.cs │ │ ├── MapTypeMapParser.cs │ │ ├── MapTypeParser.cs │ │ ├── NpcMonsterParser.cs │ │ ├── NpcTalkParser.cs │ │ ├── PortalParser.cs │ │ ├── QuestParser.cs │ │ ├── QuestPrizeParser.cs │ │ ├── RespawnMapTypeParser.cs │ │ ├── ScriptParser.cs │ │ ├── ShopItemParser.cs │ │ ├── ShopParser.cs │ │ └── SkillParser.cs │ └── packages.lock.json ├── NosCore.WebApi │ ├── ApiConfiguration.cs │ ├── Controllers │ │ ├── AuthController.cs │ │ └── NosmallController.cs │ ├── NosCore.WebApi.csproj │ ├── WebApiBootstrap.cs │ └── packages.lock.json └── NosCore.WorldServer │ ├── NosCore.WorldServer.csproj │ ├── WorldServer.cs │ ├── WorldServerBootstrap.cs │ └── packages.lock.json ├── test ├── NosCore.Core.Tests │ ├── LogLanguageTests.cs │ ├── NosCore.Core.Tests.csproj │ └── packages.lock.json ├── NosCore.Database.Tests │ ├── DatabaseTests.cs │ ├── NosCore.Database.Tests.csproj │ └── packages.lock.json ├── NosCore.GameObject.Tests │ ├── BazaarTests.cs │ ├── GroupTests.cs │ ├── NosCore.GameObject.Tests.csproj │ ├── Services │ │ ├── ExchangeService │ │ │ └── ExchangeServiceTests.cs │ │ ├── GuriRunnerService │ │ │ └── Handlers │ │ │ │ ├── GuriEventHandlerTestsBase.cs │ │ │ │ ├── SpeakerGuriHandlerTests.cs │ │ │ │ └── TitleGuriHandlerTests.cs │ │ ├── InventoryService │ │ │ └── InventoryServiceTests.cs │ │ ├── ItemGenerationService │ │ │ └── Handlers │ │ │ │ ├── BackPackHandlerTests.cs │ │ │ │ ├── BazaarMedalsHandlerTests.cs │ │ │ │ ├── MinilandBellHandlerTests.cs │ │ │ │ ├── SpRechargerHandlerTests.cs │ │ │ │ ├── SpeakerHandlerTests.cs │ │ │ │ ├── TitleHandlerTests.cs │ │ │ │ ├── UseItemEventHandlerTestsBase.cs │ │ │ │ ├── VehicleHandlerTests.cs │ │ │ │ └── WearHandlerTests.cs │ │ ├── NRunService │ │ │ └── Handlers │ │ │ │ └── ChangeClassTests.cs │ │ └── SpeedCalculationService │ │ │ └── SpeedCalculationServiceTests.cs │ ├── SetupAssemblyInitializer.cs │ ├── ShopTests.cs │ └── packages.lock.json ├── NosCore.PacketHandlers.Tests │ ├── Bazaar │ │ ├── CBListPacketHandlerTests.cs │ │ ├── CBuyPacketHandlerTests.cs │ │ ├── CModPacketHandlerTests.cs │ │ ├── CRegPacketHandlerTests.cs │ │ ├── CSListPacketHandlerTests.cs │ │ ├── CScalcPacketHandlerTests.cs │ │ └── CSkillPacketHandlerTests.cs │ ├── CharacterScreen │ │ ├── CharNewJobPacketHandlerTests.cs │ │ ├── CharNewPacketHandlerTests.cs │ │ ├── CharRenPacketHandlerTests.cs │ │ ├── CharacterDeletePacketHandlerTests.cs │ │ └── DacPacketHandlerTests.cs │ ├── Friend │ │ ├── BlDelPacketHandlerTests.cs │ │ ├── BlInsPacketHandlerTests.cs │ │ ├── BlPacketHandlerTests.cs │ │ ├── FinsPacketHandlerTests.cs │ │ ├── FlPacketHandlerTests.cs │ │ └── fDelPacketHandlerTests.cs │ ├── Game │ │ ├── PulsePacketHandlerTests.cs │ │ └── QsetPacketHandlerTests.cs │ ├── Group │ │ ├── PJoinPacketHandlerTests.cs │ │ └── PleavePacketHandlerTests.cs │ ├── Inventory │ │ ├── BiPacketHandlerTests.cs │ │ ├── GetPacketHandlerTests.cs │ │ ├── PutPacketHandlerTests.cs │ │ ├── SpTransformPacketHandlerTests.cs │ │ ├── UseItemPacketHandlerTests.cs │ │ └── WearPacketHandlerTests.cs │ ├── Login │ │ ├── NoS0575PacketHandlerTests.cs │ │ └── NoS0577PacketHandlerTests.cs │ ├── Miniland │ │ ├── MJoinPacketHandlerTests.cs │ │ └── MlEditPacketHandlerTests.cs │ ├── Movement │ │ └── PreqPacketHandlerTests.cs │ ├── NosCore.PacketHandlers.Tests.csproj │ ├── Parcel │ │ ├── PclPacketHandlerTests.cs │ │ └── PstClientPacketHandlerTests.cs │ ├── SetupAssemblyInitializer.cs │ ├── Shops │ │ ├── MShopPacketHandlerTests.cs │ │ └── SellPacketHandlerTests.cs │ └── packages.lock.json ├── NosCore.Tests.Shared │ ├── NosCore.Tests.Shared.csproj │ ├── TestHelpers.cs │ ├── packages.lock.json │ └── tools │ │ └── coverage.opencover.xml └── NosCore.WebApi.Tests │ ├── ApiTests │ └── AuthControllerTests.cs │ ├── NosCore.WebApi.Tests.csproj │ ├── SetupAssemblyInitializer.cs │ └── packages.lock.json └── tools └── NosCore.DtoGenerator ├── DtoGenerator.cs ├── NosCore.DtoGenerator.csproj └── packages.lock.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: 0Lucifer0 4 | patreon: NosCore 5 | ko_fi: noscoreio 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Additional context** 24 | Add any other context about the problem here. 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: nuget 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 50 8 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | schedule: 9 | - cron: "32 2 * * 5" 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | permissions: 16 | actions: read 17 | contents: read 18 | security-events: write 19 | 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | language: [ csharp ] 24 | 25 | steps: 26 | - name: Checkout 27 | uses: actions/checkout@v3 28 | 29 | - name: Setup .NET 30 | uses: actions/setup-dotnet@v3 31 | with: 32 | dotnet-version: 9.0.x 33 | 34 | - name: Initialize CodeQL 35 | uses: github/codeql-action/init@v2 36 | with: 37 | languages: ${{ matrix.language }} 38 | queries: +security-and-quality 39 | 40 | - name: Autobuild 41 | uses: github/codeql-action/autobuild@v2 42 | 43 | - name: Perform CodeQL Analysis 44 | uses: github/codeql-action/analyze@v2 45 | with: 46 | category: "/language:${{ matrix.language }}" 47 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /build-exe.cmd: -------------------------------------------------------------------------------- 1 | dotnet build -r win10-x64 2 | dotnet build -r ubuntu.14.04-x64 3 | mkdir .\build\Configuration 4 | cd Configuration 5 | copy *.* ..\build\Configuration\ -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | dotnet build -------------------------------------------------------------------------------- /build/.gitkeep: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: 35..100 #upgrade when code coverage is up 3 | round: down 4 | precision: 2 5 | ignore: 6 | - "src/NosCore.WorldServer/*" 7 | - "src/NosCore.MasterServer/*" 8 | - "src/NosCore.LoginServer/*" 9 | - "src/NosCore.WebApi/*" 10 | - "src/NosCore.Database/**/*" 11 | - "src/NosCore.Data/**/*" 12 | - "test/**/*" -------------------------------------------------------------------------------- /configuration/api.yml: -------------------------------------------------------------------------------- 1 | MasterCommunication: 2 | Password: NosCorePassword 3 | Host: ${MASTER_HOST,http://localhost} 4 | Port: 5000 5 | Host: ${HOST,127.0.0.1} 6 | Port: ${API_PORT,8080} 7 | Language: en 8 | Database: 9 | Host: ${DB_HOST,localhost} 10 | Port: 5432 11 | Database: noscore 12 | Username: postgres 13 | Password: password 14 | -------------------------------------------------------------------------------- /configuration/database.yml: -------------------------------------------------------------------------------- 1 | Host: localhost 2 | Port: 5432 3 | Database: noscore 4 | Username: postgres 5 | Password: password 6 | -------------------------------------------------------------------------------- /configuration/logger.yml: -------------------------------------------------------------------------------- 1 | Serilog: 2 | MinimumLevel: 3 | Default: Debug 4 | Override: 5 | Microsoft: Warning 6 | WriteTo: 7 | - Name: Console 8 | Args: 9 | outputTemplate: "{Level:u4} {Timestamp:HH:mm:ss} -- {Message:lj}{NewLine}{Exception}" 10 | theme: Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Literate, Serilog.Sinks.Console 11 | -------------------------------------------------------------------------------- /configuration/login.yml: -------------------------------------------------------------------------------- 1 | MasterCommunication: 2 | Password: NosCorePassword 3 | Host: ${MASTER_HOST,http://localhost} 4 | Port: 5000 5 | Host: ${HOST,127.0.0.1} 6 | Port: ${LOGIN_PORT,4000} 7 | Language: en 8 | Database: 9 | Host: ${DB_HOST,localhost} 10 | Port: 5432 11 | Database: noscore 12 | Username: postgres 13 | Password: password 14 | -------------------------------------------------------------------------------- /configuration/master.yml: -------------------------------------------------------------------------------- 1 | WebApi: 2 | Host: ${WEBAPI_HOST,http://localhost} 3 | Port: 5000 4 | Password: NosCorePassword 5 | Language: en 6 | Database: 7 | Host: ${DB_HOST,localhost} 8 | Port: 5432 9 | Database: noscore 10 | Username: postgres 11 | Password: password -------------------------------------------------------------------------------- /configuration/parser.yml: -------------------------------------------------------------------------------- 1 | Language: en 2 | Database: 3 | Host: 127.0.0.1 4 | Port: 5432 5 | Database: noscore 6 | Username: postgres 7 | Password: password 8 | -------------------------------------------------------------------------------- /configuration/world.yml: -------------------------------------------------------------------------------- 1 | MasterCommunication: 2 | Password: NosCorePassword 3 | Host: ${MASTER_HOST,http://localhost} 4 | Port: 5000 5 | ServerName: S1-NosCore 6 | Host: ${HOST,127.0.0.1} 7 | Port: ${WORLD_PORT,1337} 8 | DisplayHost: 127.0.0.1 9 | DisplayPort: 1337 10 | ConnectedAccountLimit: 100 11 | SceneOnCreate: false 12 | StartInMaintenance: false 13 | #0-3 English / International 14 | #4-7 German 15 | #8-11 French 16 | #12-15 Italian 17 | #16-19 Polish 18 | #20-23 Spanish 19 | ServerId: 0 20 | WorldInformation: true 21 | WebApi: 22 | Host: ${WEBAPI_HOST,http://localhost} 23 | Port: 5001 24 | Password: NosCorePassword 25 | Language: en 26 | Database: 27 | Host: ${DB_HOST,localhost} 28 | Port: 5432 29 | Database: noscore 30 | Username: postgres 31 | Password: password 32 | BackpackSize: 48 33 | MaxItemAmount: 999 34 | MaxGoldAmount: 1000000000 35 | MaxBankGoldAmount: 100000000000 36 | MaxSpPoints: 10000 37 | MaxAdditionalSpPoints: 1000000 38 | BasicEquipments: 39 | Adventurer: 40 | - VNum: 1 41 | Amount: 1 42 | NoscorePocketType: 8 43 | - VNum: 8 44 | Amount: 1 45 | NoscorePocketType: 8 46 | - VNum: 12 47 | Amount: 1 48 | NoscorePocketType: 8 49 | "*": 50 | - VNum: 2024 51 | Amount: 10 52 | NoscorePocketType: 2 53 | - VNum: 2081 54 | Amount: 1 55 | NoscorePocketType: 2 56 | BasicSkills: 57 | Adventurer: 58 | - 200 59 | - 201 60 | - 209 -------------------------------------------------------------------------------- /deploy/Dockerfile-login: -------------------------------------------------------------------------------- 1 | # cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/9.0/alpine3.19/amd64/Dockerfile 2 | 3 | ARG REPO=mcr.microsoft.com/dotnet/runtime 4 | FROM $REPO:9.0.5-alpine3.21-amd64 5 | 6 | # .NET globalization APIs will use invariant mode by default because DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true is set 7 | # by the base runtime-deps image. See https://aka.ms/dotnet-globalization-alpine-containers for more information. 8 | 9 | # ASP.NET Core version 10 | ENV ASPNET_VERSION=9.0.5 11 | ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false 12 | 13 | # Install ASP.NET Core 14 | RUN wget -O aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ 15 | && aspnetcore_sha512='880d6c516af46dda0686c0e56a55cad5d8c34bfe3cacdbee68a9d21a5ff9e9ee93a6c427ef0aabd4c45ab95aa772edc9b89927f38d07619db6219c93e6f6e43b' \ 16 | && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ 17 | && tar -oxzf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ 18 | && rm aspnetcore.tar.gz 19 | 20 | # Update package list and install libicu (ICU libraries) for Alpine 21 | RUN apk update \ 22 | && apk add --no-cache icu-libs 23 | 24 | COPY ./build/net9.0 /app/build/net9.0 25 | COPY ./configuration /app/configuration 26 | 27 | WORKDIR /app/build/net9.0 28 | 29 | EXPOSE 4002 30 | 31 | ENTRYPOINT ["dotnet", "NosCore.LoginServer.dll"] 32 | -------------------------------------------------------------------------------- /lgtm.yml: -------------------------------------------------------------------------------- 1 | extraction: 2 | csharp: 3 | index: 4 | dotnet: 5 | version: "8.0.100" 6 | -------------------------------------------------------------------------------- /scripts/Docker - All.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | dotnet build --nologo -p:TargetArch=linux-musl-x64 4 | docker-compose up --force-recreate --build login master world 5 | PAUSE -------------------------------------------------------------------------------- /scripts/Docker - LoginServer.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | dotnet build --nologo -p:TargetArch=linux-musl-x64 4 | docker-compose up --force-recreate --build login 5 | PAUSE -------------------------------------------------------------------------------- /scripts/Docker - MasterServer.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | dotnet build --nologo -p:TargetArch=linux-musl-x64 4 | docker-compose up --force-recreate --build master 5 | PAUSE -------------------------------------------------------------------------------- /scripts/Docker - Postgres.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | docker-compose up db 4 | PAUSE -------------------------------------------------------------------------------- /scripts/Docker - ReverseProxy.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | docker-compose pull 4 | dotnet build --nologo -p:TargetArch=linux-musl-x64 5 | docker-compose up --force-recreate --build reverse-proxy 6 | PAUSE -------------------------------------------------------------------------------- /scripts/Docker - Shutdown.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | docker-compose down 4 | PAUSE -------------------------------------------------------------------------------- /scripts/Docker - WorldServer.cmd: -------------------------------------------------------------------------------- 1 | cd .. 2 | 3 | dotnet build --nologo -p:TargetArch=linux-musl-x64 4 | docker-compose up --force-recreate --build world 5 | PAUSE -------------------------------------------------------------------------------- /scripts/LoginServer.cmd: -------------------------------------------------------------------------------- 1 | cd ..\build\net8.0\ 2 | start /d "." dotnet NosCore.LoginServer.dll -------------------------------------------------------------------------------- /scripts/MasterServer.cmd: -------------------------------------------------------------------------------- 1 | cd ..\build\net8.0\ 2 | start /d "." dotnet NosCore.MasterServer.dll -------------------------------------------------------------------------------- /scripts/Parser.cmd: -------------------------------------------------------------------------------- 1 | cd ..\build\net8.0\ 2 | start /d "." dotnet NosCore.Parser.dll -------------------------------------------------------------------------------- /scripts/WorldServer.cmd: -------------------------------------------------------------------------------- 1 | cd ..\build\net8.0\ 2 | start /d "." dotnet NosCore.WorldServer.dll -------------------------------------------------------------------------------- /scripts/docker-publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin 4 | dotnet test --runtime linux-musl-x64 --filter TestCategory=SomethingAsDotnetBuildDoesntWorkAnymore 5 | 6 | DOCKER_ENV='' 7 | DOCKER_TAG='' 8 | export PATH=$PATH:$HOME/.local/bin 9 | 10 | case "$TRAVIS_BRANCH" in 11 | "master") 12 | DOCKER_ENV=production 13 | DOCKER_TAG=latest 14 | ;; 15 | esac 16 | 17 | docker build -f ./deploy/Dockerfile-world -t noscore.worldserver:$DOCKER_TAG --no-cache . 18 | docker tag noscore.worldserver:$DOCKER_TAG noscoreio/noscore.worldserver:$DOCKER_TAG 19 | docker push noscoreio/noscore.worldserver:$DOCKER_TAG 20 | 21 | docker build -f ./deploy/Dockerfile-login -t noscore.loginserver:$DOCKER_TAG --no-cache . 22 | docker tag noscore.loginserver:$DOCKER_TAG noscoreio/noscore.loginserver:$DOCKER_TAG 23 | docker push noscoreio/noscore.loginserver:$DOCKER_TAG 24 | 25 | docker build -f ./deploy/Dockerfile-master -t noscore.masterserver:$DOCKER_TAG --no-cache . 26 | docker tag noscore.masterserver:$DOCKER_TAG noscoreio/noscore.masterserver:$DOCKER_TAG 27 | docker push noscoreio/noscore.masterserver:$DOCKER_TAG 28 | -------------------------------------------------------------------------------- /src/NosCore.Core/ConnectionInfo.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Core 21 | { 22 | public class ConnectionInfo 23 | { 24 | public string? Token { get; set; } 25 | public Channel? ChannelInfo { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.Core/Encryption/BcryptEncryption.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Authentication; 21 | using System; 22 | 23 | namespace NosCore.Core.Encryption 24 | { 25 | public class BcryptHasher : IHasher 26 | { 27 | public string Hash(string password, string? salt) 28 | { 29 | return BCrypt.Net.BCrypt.HashPassword(password, salt); 30 | } 31 | 32 | public string Hash(string password) => throw new NotImplementedException(); 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Core/I18N/IGameLanguageLocalizer.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using Microsoft.Extensions.Localization; 21 | using NosCore.Data.Enumerations.I18N; 22 | using NosCore.Shared.Enumerations; 23 | using NosCore.Shared.I18N; 24 | 25 | namespace NosCore.Core.I18N; 26 | 27 | public interface IGameLanguageLocalizer : ILogLanguageLocalizer 28 | { 29 | LocalizedString this[LanguageKey key, RegionType region, params object[] arguments] { get; } 30 | LocalizedString this[LanguageKey key, RegionType region] { get; } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Core/Services/IdService/IIdService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Collections.Concurrent; 21 | 22 | namespace NosCore.Core.Services.IdService 23 | { 24 | public interface IIdService 25 | { 26 | ConcurrentDictionary Items { get; } 27 | 28 | long GetNextId(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/NosCore.Core/Services/IdService/IdService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Collections.Concurrent; 21 | 22 | namespace NosCore.Core.Services.IdService 23 | { 24 | public class IdService(long firstId) : IIdService 25 | { 26 | public ConcurrentDictionary Items { get; } = new(); 27 | 28 | public long GetNextId() 29 | { 30 | return ++firstId; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/ChangeChannelPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Shared.Enumerations; 22 | 23 | namespace NosCore.Data.CommandPackets 24 | { 25 | [CommandPacketHeader("$ChangeChannel", AuthorityType.GameMaster)] 26 | public class ChangeChannelPacket : CommandPacket 27 | { 28 | [PacketIndex(0)] 29 | public int ChannelId { get; set; } 30 | 31 | public override string Help() 32 | { 33 | return "$ChangeChannel ChannelId"; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/ClearInventoryPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Enumerations; 21 | 22 | namespace NosCore.Data.CommandPackets 23 | { 24 | [CommandPacketHeader("$ClearInventory", AuthorityType.Moderator)] 25 | public class ClearInventoryPacket : CommandPacket 26 | { 27 | public override string Help() 28 | { 29 | return "$ClearInventory"; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/CommandPacketHeaderAttribute.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Packets.Enumerations; 22 | using NosCore.Shared.Enumerations; 23 | 24 | namespace NosCore.Data.CommandPackets 25 | { 26 | public class CommandPacketHeaderAttribute(string identification, AuthorityType authority) : PacketHeaderAttribute(identification, Scope.InGame | Scope.InGame) 27 | { 28 | public AuthorityType Authority { get; } = authority; 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/EffectCommandPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Shared.Enumerations; 22 | 23 | namespace NosCore.Data.CommandPackets 24 | { 25 | [CommandPacketHeader("$Effect", AuthorityType.GameMaster)] 26 | public class EffectCommandPacket : CommandPacket 27 | { 28 | [PacketIndex(0)] 29 | public int EffectId { get; set; } 30 | 31 | public override string Help() 32 | { 33 | return "$Effect EffectId"; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/EntryPointPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets; 21 | using NosCore.Packets.Attributes; 22 | using NosCore.Packets.Enumerations; 23 | 24 | namespace NosCore.Data.CommandPackets 25 | { 26 | [PacketHeader("EntryPoint", Scope.OnCharacterScreen)] 27 | public class EntryPointPacket : PacketBase 28 | { 29 | [PacketIndex(1)] 30 | public required string Name { get; set; } 31 | 32 | [PacketIndex(2)] 33 | public string? Password { get; set; } 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/FlCommandPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Packets.Enumerations; 22 | 23 | namespace NosCore.Data.CommandPackets 24 | { 25 | [PacketHeader("$fl", Scope.InTrade | Scope.InGame)] 26 | public class FlCommandPacket : CommandPacket 27 | { 28 | [PacketIndex(0)] 29 | public string? CharacterName { get; set; } 30 | 31 | public override string Help() 32 | { 33 | return "$fl [CharacterName]"; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/HelpPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Enumerations; 21 | 22 | namespace NosCore.Data.CommandPackets 23 | { 24 | [CommandPacketHeader("$Help", AuthorityType.GameMaster)] 25 | public class HelpPacket : CommandPacket 26 | { 27 | public override string Help() 28 | { 29 | return "$Help"; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/ICommandPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using JetBrains.Annotations; 21 | using NosCore.Packets; 22 | using NosCore.Packets.Interfaces; 23 | 24 | namespace NosCore.Data.CommandPackets 25 | { 26 | public interface ICommandPacket : IPacket 27 | { 28 | [UsedImplicitly] 29 | string Help(); 30 | } 31 | 32 | public abstract class CommandPacket : PacketBase, ICommandPacket 33 | { 34 | public abstract string Help(); 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/InvisibleCommandPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Enumerations; 21 | 22 | namespace NosCore.Data.CommandPackets 23 | { 24 | [CommandPacketHeader("$Invisible", AuthorityType.GameMaster)] 25 | public class InvisibleCommandPacket : CommandPacket 26 | { 27 | public override string Help() 28 | { 29 | return "$Invisible"; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/KickPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Shared.Enumerations; 22 | 23 | namespace NosCore.Data.CommandPackets 24 | { 25 | [CommandPacketHeader("$Kick", AuthorityType.Moderator)] 26 | public class KickPacket : CommandPacket 27 | { 28 | [PacketIndex(0)] 29 | public string? Name { get; set; } 30 | 31 | public override string Help() 32 | { 33 | return "$Kick [Name]"; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/PositionPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Enumerations; 21 | 22 | namespace NosCore.Data.CommandPackets 23 | { 24 | [CommandPacketHeader("$Position", AuthorityType.GameMaster)] 25 | public class PositionPacket : CommandPacket 26 | { 27 | public override string Help() 28 | { 29 | return "$Position"; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/ShoutPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Shared.Enumerations; 22 | 23 | namespace NosCore.Data.CommandPackets 24 | { 25 | [CommandPacketHeader("$Shout", AuthorityType.Moderator)] 26 | public class ShoutPacket : CommandPacket 27 | { 28 | [PacketIndex(0)] 29 | public string? Message { get; set; } 30 | 31 | public override string Help() 32 | { 33 | return "$Shout Message"; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/CommandPackets/SpeedPacket.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Attributes; 21 | using NosCore.Shared.Enumerations; 22 | 23 | namespace NosCore.Data.CommandPackets 24 | { 25 | [CommandPacketHeader("$Speed", AuthorityType.GameMaster)] 26 | public class SpeedPacket : CommandPacket 27 | { 28 | [PacketIndex(0)] 29 | public byte Speed { get; set; } 30 | 31 | public override string Help() 32 | { 33 | return "$Speed Speed"; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/DataAttributes/StaticMetaDataAttribute.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Enumerations.I18N; 21 | using System; 22 | 23 | namespace NosCore.Data.DataAttributes 24 | { 25 | public class StaticMetaDataAttribute : Attribute 26 | { 27 | public LogLanguageKey LoadedMessage { get; set; } 28 | 29 | public LogLanguageKey EmptyMessage { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Dto/I18NFromAttribute.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | 22 | namespace NosCore.Data.Dto 23 | { 24 | public class I18NFromAttribute(Type type) : Attribute 25 | { 26 | public Type Type { get; set; } = type; 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Dto/IDTO.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Dto 21 | { 22 | public interface IDto 23 | { 24 | } 25 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Dto/II18NDto.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Enumerations; 21 | 22 | namespace NosCore.Data.Dto 23 | { 24 | public interface II18NDto : IDto 25 | { 26 | string Key { get; set; } 27 | RegionType RegionType { get; set; } 28 | string Text { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Dto/IStaticDto.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Dto 21 | { 22 | public interface IStaticDto : IDto 23 | { 24 | } 25 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Audit/AuditLogType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Audit 21 | { 22 | public enum AuditLogType 23 | { 24 | AccountCreation, 25 | CharacterCreation, 26 | EmailUpdate 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Battle/TargetHitType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Battle 21 | { 22 | public enum TargetHitType : byte 23 | { 24 | SingleTargetHit = 0, 25 | SingleTargetHitCombo = 1, 26 | SingleAoeTargetHit = 2, 27 | AoeTargetHit = 3, 28 | ZoneHit = 4, 29 | SpecialZoneHit = 5 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Bazaar/BazaarEquipmentType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Bazaar 21 | { 22 | public enum BazaarEquipmentType 23 | { 24 | Mask = 2, 25 | Hat = 1, 26 | CostumeHat = 6, 27 | CostumeSuit = 5, 28 | Gloves = 3, 29 | Boots = 4 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Bazaar/BazaarJeweleryType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Bazaar 21 | { 22 | public enum BazaarJeweleryType 23 | { 24 | Ring = 2, 25 | Necklace = 1, 26 | Amulet = 5, 27 | Bracelet = 3, 28 | Fairy = 4, 29 | Box = 5 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Bazaar/BazaarMainType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Bazaar 21 | { 22 | public enum BazaarMainType 23 | { 24 | Main = 1, 25 | Upgrade = 2, 26 | Production = 3, 27 | Special = 4, 28 | Potion = 5, 29 | Event = 6 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Bazaar/BazaarUsableType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Bazaar 21 | { 22 | public enum BazaarUsableType 23 | { 24 | Food = 1, 25 | Snack = 2, 26 | Magical = 3, 27 | Part = 4, 28 | Teacher = 5, 29 | Sell = 6 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Buff/BuffType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Buff 21 | { 22 | public enum BuffType : byte 23 | { 24 | Good = 0, 25 | Neutral = 1, 26 | Bad = 2 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Buff/MedalType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Buff 21 | { 22 | public enum MedalType : byte 23 | { 24 | None = 0, 25 | Silver = 1, 26 | Gold = 2 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Buff/StaticBonusType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Buff 21 | { 22 | public enum StaticBonusType : byte 23 | { 24 | BazaarMedalGold = 0, 25 | BazaarMedalSilver = 1, 26 | BackPack = 2, 27 | PetBasket = 3, 28 | PetBackPack = 4, 29 | InventoryTicketUpgrade = 5 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Character/CharacterState.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Character 21 | { 22 | public enum CharacterState : byte 23 | { 24 | Active = 1, 25 | Inactive = 2 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Character/FactionType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Character 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum FactionType : byte 26 | { 27 | Neutral = 0, 28 | Angel = 1, 29 | Demon = 2 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Character/MateType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Character 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum MateType : byte 26 | { 27 | Partner = 0, 28 | Pet = 1 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Event/EventType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Event 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum EventType 26 | { 27 | Instantbattle, 28 | Lod, 29 | MinilandRefresh, 30 | LodDh, 31 | RankingreFresh, 32 | TalentArena, 33 | MasterArena, 34 | IceBreaker, 35 | Act4Ship 36 | } 37 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Family/FamilyAuthority.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Family 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum FamilyAuthority : byte 26 | { 27 | Head = 0, 28 | Assistant = 1, 29 | Manager = 2, 30 | Member = 3 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Group/GroupSharingType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Group 21 | { 22 | public enum GroupSharingType : byte 23 | { 24 | ByOrder = 0, 25 | Everyone = 1 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Group/GroupType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Group 21 | { 22 | public enum GroupType : byte 23 | { 24 | Group = 3, 25 | Team = 15, 26 | BigTeam = 20, 27 | GiantTeam = 40 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/HashingType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations 21 | { 22 | public enum HashingType 23 | { 24 | Sha512, 25 | 26 | //if your care about security use Pbkdf2 (bcrypt doesn't have a approved package for c#) 27 | //PBKDF2-HMAC-SHA512-150000 28 | Pbkdf2, 29 | BCrypt 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/Act4RaidType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum Act4RaidType : byte 23 | { 24 | Morcos, 25 | Hatus, 26 | Calvina, 27 | Berios 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/ArenaTeamType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum ArenaTeamType : byte 23 | { 24 | Zenas = 1, 25 | Erenia = 2 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/ChatType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum ChatType : byte 23 | { 24 | General = 0, 25 | Whisper = 1, 26 | Party = 2, 27 | Family = 3, 28 | Friend = 4, 29 | Speaker = 5 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/GeneralLogType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum GeneralLogType 23 | { 24 | Connection, 25 | Promotion, 26 | Demotion 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/InRespawnType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum InRespawnType : byte 23 | { 24 | TeleportationEffect = 0, 25 | NoEffect = 1, 26 | FallingDown = 2 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/PenaltyType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum PenaltyType : byte 23 | { 24 | Muted = 0, 25 | Banned = 1, 26 | BlockExp = 2, 27 | BlockFExp = 3, 28 | BlockRep = 4, 29 | Warning = 5 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/ReceiverType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum ReceiverType : byte 23 | { 24 | All = 1, 25 | AllExceptMe = 2, 26 | AllInRange = 3, 27 | OnlySomeone = 4, 28 | AllNoEmoBlocked = 5, 29 | AllNoHeroBlocked = 6, 30 | Group = 7, 31 | AllExceptGroup = 8, 32 | AllExceptMeAndBlacklisted = 9 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/RespawnType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Interaction 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum RespawnType : byte 26 | { 27 | DefaultAct1 = 0, 28 | ReturnAct1 = 1, 29 | DefaultAct3 = 2, 30 | DefaultAct5 = 3, 31 | ReturnAct5 = 4, 32 | DefaultAct6 = 5, 33 | DefaultAct62 = 6, 34 | DefaultOasis = 7 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/ScriptedInstanceType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Interaction 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum ScriptedInstanceType : byte 26 | { 27 | TimeSpace = 0, 28 | Raid = 1, 29 | RaidAct4 = 2 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/TalentArenaOptionType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Interaction 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum TalentArenaOptionType : byte 26 | { 27 | Watch = 0, 28 | Nothing = 1, 29 | Call = 2, 30 | WatchAndCall = 3 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Interaction/TeleporterType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Interaction 21 | { 22 | public enum TeleporterType : byte 23 | { 24 | Teleporter = 0, 25 | TeleporterOnMap = 1 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Items/CellonType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Items 21 | { 22 | public enum CellonType : byte 23 | { 24 | Hp, 25 | HpRecovery, 26 | Mp, 27 | MpRecovery, 28 | MpConsumption, 29 | CriticalDamageDecrease 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Items/JewelOptionType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Items 21 | { 22 | public enum JewelOptionType : byte 23 | { 24 | MaximumAugmentationHp = 0, 25 | MaximumAugmentationMp = 1, 26 | MaximumRegenerationHp = 2, 27 | MaximumRegenerationMp = 3, 28 | MinimiseUsedMp = 4, 29 | MinimiseCriticalHit = 5 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Items/RarifyMode.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Items 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum RarifyMode 26 | { 27 | Normal, 28 | Reduced, 29 | Free, 30 | Drop, 31 | Success 32 | } 33 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Items/RarifyProtection.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Items 21 | { 22 | public enum RarifyProtection 23 | { 24 | None, 25 | BlueAmulet, 26 | RedAmulet, 27 | Scroll 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Items/UpgradeMode.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Items 21 | { 22 | public enum UpgradeMode 23 | { 24 | Normal, 25 | Reduced, 26 | Free 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Items/UpgradeProtection.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Diagnostics.CodeAnalysis; 21 | 22 | namespace NosCore.Data.Enumerations.Items 23 | { 24 | [SuppressMessage("ReSharper", "UnusedMember.Global")] 25 | public enum UpgradeProtection 26 | { 27 | None, 28 | Protected 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Map/MapInstanceEventType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Map 21 | { 22 | public enum MapInstanceEventType 23 | { 24 | Entrance 25 | } 26 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Map/MonsterType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Map 21 | { 22 | public enum MonsterType : byte 23 | { 24 | Unknown = 0, 25 | Partner = 1, 26 | Npc = 2, 27 | Well = 3, 28 | Portal = 4, 29 | Boss = 5, 30 | Elite = 6, 31 | Peapod = 7, 32 | Special = 8, 33 | GemSpaceTime = 9 34 | } 35 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/Miniland/WarehouseType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations.Miniland 21 | { 22 | public enum WarehouseType : byte 23 | { 24 | Warehouse = 1, 25 | FamilyWareHouse = 2, 26 | PetWarehouse = 3 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/NoscorePocketType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Enumerations; 21 | 22 | namespace NosCore.Data.Enumerations 23 | { 24 | public enum NoscorePocketType : byte 25 | { 26 | Equipment = PocketType.Equipment, 27 | Main = PocketType.Main, 28 | Etc = PocketType.Etc, 29 | Miniland = PocketType.Miniland, 30 | Specialist = PocketType.Specialist, 31 | Costume = PocketType.Costume, 32 | Wear = 8 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/SaveResult.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations 21 | { 22 | public enum SaveResult : byte 23 | { 24 | Unknown = 0, 25 | Saved = 1, 26 | Error = 3 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Data/Enumerations/UpdateStatActionType.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.Enumerations 21 | { 22 | public enum UpdateStatActionType : byte 23 | { 24 | UpdateLevel, 25 | UpdateJobLevel, 26 | UpdateHeroLevel, 27 | UpdateReputation, 28 | UpdateGold, 29 | UpdateClass 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Data/GameObjectMapper.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | using Mapster; 22 | 23 | namespace NosCore.Data 24 | { 25 | public class GameObjectMapper : IGameObjectMapper 26 | { 27 | public GameObjectMapper(Func resolve) 28 | { 29 | TypeAdapterConfig.NewConfig().ConstructUsing(_ => resolve()); 30 | } 31 | } 32 | 33 | public interface IGameObjectMapper 34 | { 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/NosCore.Data/SkillPacket.cs: -------------------------------------------------------------------------------- 1 | using NosCore.Packets.Attributes; 2 | using NosCore.Packets; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using NosCore.Packets.Enumerations; 9 | 10 | //todo move to NosCore.Packets 11 | namespace NosCore.Data 12 | { 13 | [PacketHeader("ski", Scope.InGame)] 14 | public class SkillPacket : PacketBase 15 | { 16 | [PacketIndex(0)] 17 | public int MainSkill { get; set; } 18 | 19 | [PacketIndex(1)] 20 | public int SecondarySkill { get; set; } 21 | 22 | [PacketListIndex(2, SpecialSeparator = " ")] 23 | public List Skills { get; set; } = new(); 24 | } 25 | 26 | public class SubSkillPacket : PacketBase 27 | { 28 | [PacketIndex(0)] 29 | public int VNum { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/AuthIntent.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.WebApi 21 | { 22 | public class AuthIntent 23 | { 24 | public long SessionId { get; set; } 25 | public string AccountName { get; set; } = null!; 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/BazaarLink.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | 22 | namespace NosCore.Data.WebApi 23 | { 24 | public class BazaarLink 25 | { 26 | public BazaarItemDto? BazaarItem { get; set; } 27 | 28 | //todo move this to a generic ItemInstance with a converter 29 | public ItemInstanceDto? ItemInstance { get; set; } 30 | public string? SellerName { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/BazaarRequest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | 22 | namespace NosCore.Data.WebApi 23 | { 24 | public class BazaarRequest 25 | { 26 | public Guid ItemInstanceId { get; set; } 27 | public long CharacterId { get; set; } 28 | public string? CharacterName { get; set; } 29 | public bool HasMedal { get; set; } 30 | public long Price { get; set; } 31 | public bool IsPackage { get; set; } 32 | public short Duration { get; set; } 33 | public short Amount { get; set; } 34 | } 35 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/BlacklistRequest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.ClientPackets.Relations; 21 | 22 | namespace NosCore.Data.WebApi 23 | { 24 | public class BlacklistRequest 25 | { 26 | public long CharacterId { get; set; } 27 | public BlInsPacket? BlInsPacket { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/Character.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Data.WebApi 21 | { 22 | public class Character 23 | { 24 | public string? Name { get; set; } 25 | 26 | public long Id { get; set; } 27 | public bool FriendRequestBlocked { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/CharacterRelationStatus.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Enumerations; 21 | using System; 22 | 23 | namespace NosCore.Data.WebApi 24 | { 25 | public class CharacterRelationStatus 26 | { 27 | public Guid CharacterRelationId { get; set; } 28 | public CharacterRelationType RelationType { get; set; } 29 | public long CharacterId { get; set; } 30 | public string? CharacterName { get; set; } 31 | public bool IsConnected { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/FriendShipRequest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.ClientPackets.Relations; 21 | 22 | namespace NosCore.Data.WebApi 23 | { 24 | public class FriendShipRequest 25 | { 26 | public long CharacterId { get; set; } 27 | public FinsPacket? FinsPacket { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/MailRequest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | using System.ComponentModel.DataAnnotations; 22 | 23 | namespace NosCore.Data.WebApi 24 | { 25 | public class MailRequest 26 | { 27 | [Required] 28 | public MailDto? Mail { get; set; } 29 | public short? VNum { get; set; } 30 | public short? Amount { get; set; } 31 | public sbyte? Rare { get; set; } 32 | public byte? Upgrade { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/Subscriber.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Enumerations; 21 | 22 | namespace NosCore.Data.WebApi 23 | { 24 | public class Subscriber 25 | { 26 | public string? Name { get; set; } 27 | public RegionType Language { get; set; } 28 | public long ChannelId { get; set; } 29 | public Character? ConnectedCharacter { get; set; } 30 | public long Id { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/WareHouseDepositRequest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | using NosCore.Data.Enumerations.Miniland; 22 | 23 | namespace NosCore.Data.WebApi 24 | { 25 | public class WareHouseDepositRequest 26 | { 27 | public long OwnerId { get; set; } 28 | public WarehouseType WarehouseType { get; set; } 29 | public ItemInstanceDto? ItemInstance { get; set; } 30 | public short Slot { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Data/WebApi/WarehouseLink.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | 22 | namespace NosCore.Data.WebApi 23 | { 24 | public class WarehouseLink 25 | { 26 | public WarehouseDto? Warehouse { get; set; } 27 | 28 | //todo move this to a generic ItemInstance with a converter 29 | public ItemInstanceDto? ItemInstance { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Base/I18NStringAttribute.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | 22 | namespace NosCore.Database.Entities.Base 23 | { 24 | public class I18NStringAttribute(Type type) : Attribute 25 | { 26 | public Type Type { get; set; } = type; 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Base/IEntity.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Database.Entities.Base 21 | { 22 | public interface IEntity 23 | { 24 | } 25 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Base/IStaticEntity.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Database.Entities.Base 21 | { 22 | public interface IStaticEntity : IEntity 23 | { 24 | } 25 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Base/SynchronizableBaseEntity.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | using System.ComponentModel.DataAnnotations; 22 | using System.ComponentModel.DataAnnotations.Schema; 23 | 24 | namespace NosCore.Database.Entities.Base 25 | { 26 | public abstract class SynchronizableBaseEntity : IEntity 27 | { 28 | [Key] 29 | [DatabaseGenerated(DatabaseGeneratedOption.None)] 30 | public Guid Id { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/BoxInstance.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Database.Entities 21 | { 22 | public class BoxInstance : SpecialistInstance 23 | { 24 | public short? HoldingVNum { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/CharacterActPart.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | 22 | namespace NosCore.Database.Entities 23 | { 24 | public class CharacterActPart : SynchronizableBaseEntity 25 | { 26 | public long CharacterId { get; set; } 27 | public virtual Character Character { get; set; } = null!; 28 | 29 | public byte ActPartId { get; set; } 30 | public virtual ActPart ActPart { get; set; } = null!; 31 | 32 | public byte CurrentTs; 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/CharacterQuest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NodaTime; 22 | 23 | namespace NosCore.Database.Entities 24 | { 25 | public class CharacterQuest : SynchronizableBaseEntity 26 | { 27 | public virtual Character Character { get; set; } = null!; 28 | 29 | public long CharacterId { get; set; } 30 | 31 | public virtual Quest Quest { get; set; } = null!; 32 | 33 | public short QuestId { get; set; } 34 | 35 | public Instant? CompletedOn { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Characterskill.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | 22 | namespace NosCore.Database.Entities 23 | { 24 | public class CharacterSkill : SynchronizableBaseEntity 25 | { 26 | public virtual Character Character { get; set; } = null!; 27 | 28 | public long CharacterId { get; set; } 29 | 30 | public virtual Skill Skill { get; set; } = null!; 31 | 32 | public short SkillVNum { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Combo.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using System.ComponentModel.DataAnnotations; 22 | 23 | namespace NosCore.Database.Entities 24 | { 25 | public class Combo : IStaticEntity 26 | { 27 | public short Animation { get; set; } 28 | 29 | [Key] 30 | public int ComboId { get; set; } 31 | 32 | public short Effect { get; set; } 33 | 34 | public short Hit { get; set; } 35 | 36 | public virtual Skill Skill { get; set; } = null!; 37 | 38 | public short SkillVNum { get; set; } 39 | } 40 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/I18NActDesc.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NosCore.Shared.Enumerations; 22 | using System.ComponentModel.DataAnnotations; 23 | 24 | namespace NosCore.Database.Entities 25 | { 26 | public class I18NActDesc : IEntity 27 | { 28 | [Key] 29 | public int I18NActDescId { get; set; } 30 | 31 | [Required] 32 | public required string Key { get; set; } 33 | 34 | public RegionType RegionType { get; set; } 35 | 36 | [Required] 37 | public required string Text { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/I18NBCard.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NosCore.Shared.Enumerations; 22 | using System.ComponentModel.DataAnnotations; 23 | 24 | namespace NosCore.Database.Entities 25 | { 26 | public class I18NBCard : IEntity 27 | { 28 | [Key] 29 | public int I18NbCardId { get; set; } 30 | 31 | [Required] 32 | public required string Key { get; set; } 33 | 34 | public RegionType RegionType { get; set; } 35 | 36 | [Required] 37 | public required string Text { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/I18NCard.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NosCore.Shared.Enumerations; 22 | using System.ComponentModel.DataAnnotations; 23 | 24 | namespace NosCore.Database.Entities 25 | { 26 | public class I18NCard : IEntity 27 | { 28 | [Key] 29 | public int I18NCardId { get; set; } 30 | 31 | [Required] 32 | public required string Key { get; set; } 33 | 34 | public RegionType RegionType { get; set; } 35 | 36 | [Required] 37 | public required string Text { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/I18NItem.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NosCore.Shared.Enumerations; 22 | using System.ComponentModel.DataAnnotations; 23 | 24 | namespace NosCore.Database.Entities 25 | { 26 | public class I18NItem : IEntity 27 | { 28 | [Key] 29 | public int I18NItemId { get; set; } 30 | 31 | [Required] 32 | public required string Key { get; set; } 33 | 34 | public RegionType RegionType { get; set; } 35 | 36 | [Required] 37 | public required string Text { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/I18NQuest.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NosCore.Shared.Enumerations; 22 | using System.ComponentModel.DataAnnotations; 23 | 24 | namespace NosCore.Database.Entities 25 | { 26 | public class I18NQuest : IEntity 27 | { 28 | [Key] 29 | public int I18NQuestId { get; set; } 30 | 31 | [Required] 32 | public required string Key { get; set; } 33 | 34 | public RegionType RegionType { get; set; } 35 | 36 | [Required] 37 | public required string Text { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/I18NSkill.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using NosCore.Shared.Enumerations; 22 | using System.ComponentModel.DataAnnotations; 23 | 24 | namespace NosCore.Database.Entities 25 | { 26 | public class I18NSkill : IEntity 27 | { 28 | [Key] 29 | public int I18NSkillId { get; set; } 30 | 31 | [Required] 32 | public required string Key { get; set; } 33 | 34 | public RegionType RegionType { get; set; } 35 | 36 | [Required] 37 | public required string Text { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/MapTypeMap.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | using System.ComponentModel.DataAnnotations; 22 | 23 | namespace NosCore.Database.Entities 24 | { 25 | public class MapTypeMap : IStaticEntity 26 | { 27 | [Key] 28 | public short MapTypeMapId { get; set; } 29 | 30 | public virtual Map Map { get; set; } = null!; 31 | 32 | public short MapId { get; set; } 33 | 34 | public virtual MapType MapType { get; set; } = null!; 35 | 36 | public short MapTypeId { get; set; } 37 | } 38 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/Title.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Database.Entities.Base; 21 | 22 | namespace NosCore.Database.Entities 23 | { 24 | public class Title : SynchronizableBaseEntity 25 | { 26 | public virtual Character Character { get; set; } = null!; 27 | 28 | public long CharacterId { get; set; } 29 | 30 | public bool Active { get; set; } 31 | 32 | public bool Visible { get; set; } 33 | 34 | public short TitleType { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /src/NosCore.Database/Entities/UsableInstance.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.Database.Entities 21 | { 22 | public class UsableInstance : ItemInstance 23 | { 24 | public short? Hp { get; set; } 25 | 26 | public short? Mp { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/CharacterRelation.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | 22 | namespace NosCore.GameObject 23 | { 24 | public class CharacterRelation : CharacterRelationDto 25 | { 26 | public string? CharacterName { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/ComponentEntities/Interfaces/ICountableEntity.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.GameObject.ComponentEntities.Interfaces 21 | { 22 | public interface ICountableEntity : IVisualEntity 23 | { 24 | short Amount { get; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/ComponentEntities/Interfaces/INamedEntity.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.GameObject.ComponentEntities.Interfaces 21 | { 22 | public interface INamedEntity : IAliveEntity 23 | { 24 | Group? Group { get; set; } 25 | 26 | string? Name { get; } 27 | 28 | long LevelXp { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/ComponentEntities/Interfaces/INonPlayableEntity.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.StaticEntities; 21 | using NodaTime; 22 | 23 | namespace NosCore.GameObject.ComponentEntities.Interfaces 24 | { 25 | public interface INonPlayableEntity : IAliveEntity 26 | { 27 | bool IsMoving { get; } 28 | 29 | short Effect { get; } 30 | 31 | short EffectDelay { get; } 32 | 33 | bool IsDisabled { get; } 34 | 35 | NpcMonsterDto NpcMonster { get; } 36 | 37 | Instant LastMove { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/ExchangeData.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Services.InventoryService; 21 | using System.Collections.Concurrent; 22 | 23 | namespace NosCore.GameObject 24 | { 25 | public class ExchangeData 26 | { 27 | public ConcurrentDictionary ExchangeItems { get; set; } = new(); 28 | 29 | public long Gold { get; set; } 30 | 31 | public long BankGold { get; set; } 32 | 33 | public bool ExchangeConfirmed { get; set; } 34 | } 35 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Holders/ExchangeRequestHolder.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Collections.Concurrent; 21 | 22 | namespace NosCore.GameObject.Holders 23 | { 24 | public class ExchangeRequestHolder 25 | { 26 | public readonly ConcurrentDictionary ExchangeDatas = new(); 27 | 28 | public readonly ConcurrentDictionary ExchangeRequests = new(); 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Holders/FriendRequestHolder.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | using System.Collections.Concurrent; 22 | 23 | namespace NosCore.GameObject.Holders 24 | { 25 | public class FriendRequestHolder 26 | { 27 | public ConcurrentDictionary> FriendRequestCharacters { get; set; } = new(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Holders/MapInstanceHolder.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Services.MapInstanceGenerationService; 21 | using System; 22 | using System.Collections.Concurrent; 23 | 24 | namespace NosCore.GameObject.Holders 25 | { 26 | public class MapInstanceHolder 27 | { 28 | public ConcurrentDictionary MapInstances { get; set; } = null!; 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Holders/MinilandHolder.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Services.MinilandService; 21 | using System.Collections.Concurrent; 22 | 23 | namespace NosCore.GameObject.Holders 24 | { 25 | public class MinilandHolder 26 | { 27 | public ConcurrentDictionary Minilands { get; set; } = new(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/IEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Networking.ClientSession; 21 | using System.Threading.Tasks; 22 | 23 | namespace NosCore.GameObject 24 | { 25 | public interface IEventHandler : IEventHandler 26 | { 27 | bool Condition(T condition); 28 | 29 | Task ExecuteAsync(RequestData requestData); 30 | } 31 | 32 | public interface IEventHandler 33 | { 34 | } 35 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Hubs/AuthHub/IAuthHub.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Threading.Tasks; 21 | 22 | namespace NosCore.GameObject.InterChannelCommunication.Hubs.AuthHub; 23 | 24 | public interface IAuthHub 25 | { 26 | Task GetAwaitingConnectionAsync(string? name, string? packetPassword, int clientSessionSessionId); 27 | 28 | Task SetAwaitingConnectionAsync(long sessionId, string accountName); 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Hubs/BlacklistHub/IBlacklistHub.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | using System.Collections.Generic; 22 | using System.Threading.Tasks; 23 | using NosCore.Data.Enumerations.I18N; 24 | using NosCore.Data.WebApi; 25 | 26 | namespace NosCore.GameObject.InterChannelCommunication.Hubs.BlacklistHub; 27 | 28 | public interface IBlacklistHub 29 | { 30 | Task AddBlacklistAsync(BlacklistRequest blacklistRequest); 31 | Task> GetBlacklistedAsync(long id); 32 | Task DeleteAsync(Guid id); 33 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Hubs/ChannelHub/IChannelHub.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Collections.Generic; 21 | using System.Threading.Tasks; 22 | using NosCore.Core; 23 | 24 | namespace NosCore.GameObject.InterChannelCommunication.Hubs.ChannelHub; 25 | 26 | public interface IChannelHub 27 | { 28 | Task Bind(Channel data); 29 | 30 | Task> GetCommunicationChannels(); 31 | Task SetMaintenance(bool isGlobal, bool value); 32 | 33 | Task Ping(); 34 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Hubs/FriendHub/IFriendHub.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | using System.Collections.Generic; 22 | using System.Threading.Tasks; 23 | using NosCore.Data.Enumerations.I18N; 24 | using NosCore.Data.WebApi; 25 | 26 | namespace NosCore.GameObject.InterChannelCommunication.Hubs.FriendHub; 27 | 28 | public interface IFriendHub 29 | { 30 | Task AddFriendAsync(FriendShipRequest friendPacket); 31 | Task> GetFriendsAsync(long id); 32 | Task DeleteAsync(Guid id); 33 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Messages/DeleteMailData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NosCore.GameObject.InterChannelCommunication.Messages 4 | { 5 | public class DeleteMailData : IMessage 6 | { 7 | public long CharacterId { get; set; } 8 | public short MailId { get; set; } 9 | public byte PostType { get; set; } 10 | public Guid Id { get; set; } = Guid.NewGuid(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Messages/DisconnectData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NosCore.GameObject.InterChannelCommunication.Messages 4 | { 5 | public class DisconnectData : IMessage 6 | { 7 | public long CharacterId { get; set; } 8 | public Guid Id { get; set; } = Guid.NewGuid(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Messages/IMessage.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | 22 | namespace NosCore.GameObject.InterChannelCommunication.Messages 23 | { 24 | public interface IMessage 25 | { 26 | public Guid Id { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/InterChannelCommunication/Messages/StatData.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System; 21 | using NosCore.Data.Enumerations; 22 | 23 | namespace NosCore.GameObject.InterChannelCommunication.Messages 24 | { 25 | public class StatData : IMessage 26 | { 27 | public Data.WebApi.Character? Character { get; set; } 28 | 29 | public UpdateStatActionType ActionType { get; set; } 30 | 31 | public long Data { get; set; } //TODO: find other type(s) 32 | public Guid Id { get; set; } = Guid.NewGuid(); 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/NosCore.GameObject.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | true 6 | preview 7 | enable 8 | true 9 | 10 | 11 | 12 | ..\..\build\ 13 | 14 | 15 | 16 | ..\..\build\ 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | all 27 | runtime; build; native; contentfiles; analyzers; buildtransitive 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/BattleService/CharacterSkill.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NosCore.Data.Dto; 7 | using NosCore.Data.StaticEntities; 8 | 9 | namespace NosCore.GameObject.Services.BattleService 10 | { 11 | public class CharacterSkill : CharacterSkillDto 12 | { 13 | public CharacterSkill() 14 | { 15 | LastUse = DateTime.Now.AddHours(-1); 16 | } 17 | 18 | public DateTime LastUse 19 | { 20 | get; set; 21 | } 22 | 23 | public SkillDto? Skill { get; set; } 24 | 25 | public bool CanBeUsed() 26 | { 27 | return Skill != null && LastUse.AddMilliseconds(Skill.Cooldown * 100) < DateTime.Now; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/BattleService/DamageResult.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.Enumerations; 21 | 22 | namespace NosCore.GameObject.Services.BattleService; 23 | 24 | public record DamageResult(int Damage, SuPacketHitMode HitMode); -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/BattleService/HitArguments.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.GameObject.Services.BattleService; 21 | 22 | public record HitArguments() 23 | { 24 | public short? MapX { get; set; } 25 | public short? MapY { get; set; } 26 | public long SkillId { get; set; } 27 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/BattleService/IBattleService.cs: -------------------------------------------------------------------------------- 1 | using NosCore.GameObject.ComponentEntities.Interfaces; 2 | using System.Threading.Tasks; 3 | 4 | namespace NosCore.GameObject.Services.BattleService 5 | { 6 | public interface IBattleService 7 | { 8 | Task Hit(IAliveEntity origin, IAliveEntity target, HitArguments arguments); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/BattleService/SkillResult.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.GameObject.Services.BattleService; 21 | 22 | public record SkillResult 23 | { 24 | public int SkillVnum { get; set; } 25 | public int SkillCooldown { get; set; } 26 | public int AttackAnimation { get; set; } 27 | public int SkillEffect { get; set; } 28 | public int SkillTypeMinusOne { get; set; } 29 | public long CastId { get; set; } 30 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/BlackListService/IBlacklistService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Enumerations.I18N; 21 | using NosCore.Data.WebApi; 22 | using System; 23 | using System.Collections.Generic; 24 | using System.Threading.Tasks; 25 | 26 | namespace NosCore.GameObject.Services.BlackListService 27 | { 28 | public interface IBlacklistService 29 | { 30 | Task BlacklistPlayerAsync(long characterId, long secondCharacterId); 31 | Task> GetBlacklistedListAsync(long id); 32 | Task UnblacklistAsync(Guid id); 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/ChannelCommunicationService/Handlers/DeleteMailDataMessageChannelCommunicationMessageHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NosCore.GameObject.InterChannelCommunication.Hubs.PubSub; 3 | using NosCore.GameObject.Networking; 4 | using NosCore.Packets.ServerPackets.Parcel; 5 | using DeleteMailData = NosCore.GameObject.InterChannelCommunication.Messages.DeleteMailData; 6 | 7 | namespace NosCore.GameObject.Services.ChannelCommunicationService.Handlers 8 | { 9 | public class DeleteMailDataMessageChannelCommunicationMessageHandler(IPubSubHub pubSubHub) : ChannelCommunicationMessageHandler 10 | { 11 | public override async Task Handle(DeleteMailData data) 12 | { 13 | var session = Broadcaster.Instance.GetCharacter(s => s.VisualId == data.CharacterId); 14 | 15 | if (session == null) 16 | { 17 | return; 18 | } 19 | 20 | await session.SendPacketAsync(new PostPacket 21 | { 22 | Type = 2, 23 | PostType = data.PostType, 24 | Id = data.MailId 25 | }).ConfigureAwait(false); 26 | 27 | await pubSubHub.DeleteMessageAsync(data.Id); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/ChannelCommunicationService/Handlers/DisconnectDataMessageChannelCommunicationMessageHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NosCore.GameObject.InterChannelCommunication.Hubs.PubSub; 3 | using NosCore.GameObject.Networking; 4 | using DisconnectData = NosCore.GameObject.InterChannelCommunication.Messages.DisconnectData; 5 | 6 | 7 | namespace NosCore.GameObject.Services.ChannelCommunicationService.Handlers 8 | { 9 | public class DisconnectDataMessageChannelCommunicationMessageHandler(IPubSubHub pubSubHub) : ChannelCommunicationMessageHandler 10 | { 11 | public override async Task Handle(DisconnectData data) 12 | { 13 | var targetSession = Broadcaster.Instance.GetCharacter(s => s.VisualId == data.CharacterId) as Character; 14 | if (targetSession?.Session == null) 15 | { 16 | return; 17 | } 18 | 19 | await targetSession.Session.DisconnectAsync().ConfigureAwait(false); 20 | await pubSubHub.DeleteMessageAsync(data.Id); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/ChannelService/IChannelService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Threading.Tasks; 21 | 22 | namespace NosCore.GameObject.Services.ChannelService 23 | { 24 | public interface IChannelService 25 | { 26 | Task MoveChannelAsync(Networking.ClientSession.ClientSession clientSession, int channelId); 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/EventLoaderService/IEventLoaderService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.GameObject.Services.EventLoaderService 21 | { 22 | public interface IEventLoaderService 23 | { 24 | void LoadHandlers(T1 item); 25 | } 26 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/EventLoaderService/ITimedEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NodaTime; 21 | 22 | namespace NosCore.GameObject.Services.EventLoaderService 23 | { 24 | public interface ITimedEventHandler : IEventHandler 25 | { 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/GuriRunnerService/IGuriEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.ClientPackets.UI; 21 | 22 | namespace NosCore.GameObject.Services.GuriRunnerService 23 | { 24 | public interface IGuriEventHandler : IEventHandler 25 | { 26 | } 27 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/GuriRunnerService/IGuriRunnerService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Networking.ClientSession; 21 | using NosCore.Packets.ClientPackets.UI; 22 | 23 | namespace NosCore.GameObject.Services.GuriRunnerService 24 | { 25 | public interface IGuriRunnerService 26 | { 27 | void GuriLaunch(ClientSession clientSession, GuriPacket data); 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/ItemGenerationService/IUseItemEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Services.InventoryService; 21 | using NosCore.Packets.ClientPackets.Inventory; 22 | using System; 23 | 24 | namespace NosCore.GameObject.Services.ItemGenerationService 25 | { 26 | public interface IUseItemEventHandler : IEventHandler> 27 | { 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/ItemGenerationService/Item/IItemInstance.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | 22 | namespace NosCore.GameObject.Services.ItemGenerationService.Item 23 | { 24 | public interface IItemInstance : IItemInstanceDto 25 | { 26 | Item Item { get; set; } 27 | object Clone(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/LoginService/ILoginService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Threading.Tasks; 21 | using NosCore.Packets.ClientPackets.Login; 22 | using NosCore.Shared.Enumerations; 23 | 24 | namespace NosCore.GameObject.Services.LoginService 25 | { 26 | public interface ILoginService 27 | { 28 | Task LoginAsync(string? username, string md5String, ClientVersionSubPacket clientVersion, 29 | Networking.ClientSession.ClientSession clientSession, string passwordToken, bool useApiAuth, RegionType language); 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/MapChangeService/IMapChangeService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using NosCore.GameObject.Networking.ClientSession; 4 | 5 | namespace NosCore.GameObject.Services.MapChangeService 6 | { 7 | public interface IMapChangeService 8 | { 9 | Task ChangeMapInstanceAsync(ClientSession session, Guid mapInstanceId, int? mapX = null, int? mapY = null); 10 | Task ChangeMapAsync(ClientSession session, short? mapId = null, short? mapX = null, short? mapY = null); 11 | } 12 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/MapInstanceAccessService/IMapInstanceAccessService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Services.MapInstanceGenerationService; 21 | using System; 22 | 23 | namespace NosCore.GameObject.Services.MapInstanceAccessService 24 | { 25 | public interface IMapInstanceAccessorService 26 | { 27 | MapInstance? GetMapInstance(Guid id); 28 | 29 | MapInstance? GetBaseMapById(short mapId); 30 | } 31 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/MapInstanceGenerationService/IMapInstanceEntranceEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | namespace NosCore.GameObject.Services.MapInstanceGenerationService 21 | { 22 | public interface IMapInstanceEntranceEventHandler : IEventHandler 23 | { 24 | } 25 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/MapItemGenerationService/IGetMapItemEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.ClientPackets.Drops; 21 | using System; 22 | 23 | namespace NosCore.GameObject.Services.MapItemGenerationService 24 | { 25 | public interface IGetMapItemEventHandler : IEventHandler> 26 | { 27 | } 28 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/MapItemGenerationService/IMapItemGenerationService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.Services.ItemGenerationService.Item; 21 | using NosCore.GameObject.Services.MapInstanceGenerationService; 22 | 23 | namespace NosCore.GameObject.Services.MapItemGenerationService 24 | { 25 | public interface IMapItemGenerationService 26 | { 27 | MapItem Create(MapInstance mapInstance, IItemInstance itemInstance, short positionX, short positionY); 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/NRunService/INrunEventHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.ComponentEntities.Interfaces; 21 | using NosCore.Packets.ClientPackets.Npcs; 22 | using System; 23 | 24 | namespace NosCore.GameObject.Services.NRunService 25 | { 26 | public interface INrunEventHandler : IEventHandler, Tuple> 27 | { 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/NRunService/INrunService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.ComponentEntities.Interfaces; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Npcs; 23 | using System; 24 | using System.Threading.Tasks; 25 | 26 | namespace NosCore.GameObject.Services.NRunService 27 | { 28 | public interface INrunService 29 | { 30 | Task NRunLaunchAsync(ClientSession clientSession, Tuple data); 31 | } 32 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/QuestService/IQuestService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Packets.ClientPackets.Quest; 21 | using System.Threading.Tasks; 22 | 23 | namespace NosCore.GameObject.Services.QuestService 24 | { 25 | public interface IQuestService 26 | { 27 | Task RunScriptAsync(Character character); 28 | Task RunScriptAsync(Character character, ScriptClientPacket? packet); 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/SaveService/ISaveService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Threading.Tasks; 21 | using NosCore.GameObject.ComponentEntities.Interfaces; 22 | 23 | namespace NosCore.GameObject.Services.SaveService 24 | { 25 | public interface ISaveService 26 | { 27 | Task SaveAsync(ICharacterEntity character); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/SkillService/ISkillService.cs: -------------------------------------------------------------------------------- 1 | using NosCore.GameObject.ComponentEntities.Interfaces; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace NosCore.GameObject.Services.SkillService 9 | { 10 | public interface ISkillService 11 | { 12 | Task LoadSkill(ICharacterEntity character); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/SkillService/SkillService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Mapster; 6 | using NosCore.Dao.Interfaces; 7 | using NosCore.Data.Dto; 8 | using NosCore.Data.StaticEntities; 9 | using NosCore.GameObject.ComponentEntities.Interfaces; 10 | using NosCore.GameObject.Services.BattleService; 11 | 12 | namespace NosCore.GameObject.Services.SkillService 13 | { 14 | public class SkillService(IDao characterSkillDao, List skills) : ISkillService 15 | { 16 | public Task LoadSkill(ICharacterEntity character) 17 | { 18 | var characterSkills = characterSkillDao.Where(x => x.CharacterId == character.VisualId).Adapt>(); 19 | var skillToUse = skills.Where(x => characterSkills.Select(s => s.SkillVNum).Contains(x.SkillVNum)); 20 | character.Skills.Clear(); 21 | foreach (var characterSkill in characterSkills) 22 | { 23 | characterSkill.Skill = skillToUse.First(x => x.SkillVNum == characterSkill.SkillVNum); 24 | character.Skills.AddOrUpdate(characterSkill.SkillVNum, characterSkill, 25 | (key, oldValue) => characterSkill); 26 | } 27 | 28 | return Task.CompletedTask; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/SpeedCalculationService/ISpeedCalculationService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject.ComponentEntities.Interfaces; 21 | 22 | namespace NosCore.GameObject.Services.SpeedCalculationService 23 | { 24 | public interface ISpeedCalculationService 25 | { 26 | byte CalculateSpeed(INonPlayableEntity nonPlayableEntity); 27 | 28 | byte CalculateSpeed(ICharacterEntity visualEntity); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/Services/TransformationService/ITransformationService.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.Threading.Tasks; 21 | using NosCore.GameObject.Services.ItemGenerationService.Item; 22 | 23 | namespace NosCore.GameObject.Services.TransformationService 24 | { 25 | public interface ITransformationService 26 | { 27 | Task RemoveSpAsync(Character character); 28 | 29 | Task ChangeSpAsync(Character character); 30 | 31 | Task ChangeVehicleAsync(Character character, Item item); 32 | 33 | Task RemoveVehicleAsync(Character character); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/NosCore.GameObject/ShopItem.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.StaticEntities; 21 | using NosCore.GameObject.Services.ItemGenerationService.Item; 22 | 23 | namespace NosCore.GameObject 24 | { 25 | public class ShopItem : ShopItemDto 26 | { 27 | public IItemInstance? ItemInstance { get; set; } 28 | 29 | public long? Price { get; set; } 30 | 31 | public short? Amount { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /src/NosCore.GameObject/WarehouseItem.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Data.Dto; 21 | using NosCore.GameObject.Services.ItemGenerationService.Item; 22 | 23 | namespace NosCore.GameObject 24 | { 25 | public class WarehouseItem : WarehouseItemDto 26 | { 27 | public IItemInstance? ItemInstance { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /src/NosCore.MasterServer/MasterConfiguration.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Configuration; 21 | using System.ComponentModel.DataAnnotations; 22 | 23 | namespace NosCore.MasterServer 24 | { 25 | public class MasterConfiguration : LanguageConfiguration 26 | { 27 | [Required] 28 | public WebApiConfiguration WebApi { get; set; } = null!; 29 | 30 | [Required] 31 | public SqlConnectionConfiguration Database { get; set; } = null!; 32 | } 33 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/NoAction/CClosePacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Shops; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.NoAction 26 | { 27 | public class CClosePackettHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(CClosePacket packet, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/NoAction/LbsPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.NoAction 26 | { 27 | public class LbsPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(LbsPacket packet, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/NoAction/SnapPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Player; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.NoAction 26 | { 27 | public class SnapPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(SnapPacket packet, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/NoAction/ZeroPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Infrastructure; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.NoAction 26 | { 27 | public class ZeroPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(ZeroPacket packet, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/NosCore.PacketHandlers.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | true 6 | preview 7 | enable 8 | true 9 | 10 | 11 | 12 | ..\..\build\ 13 | 14 | 15 | 16 | ..\..\build\ 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | all 26 | runtime; build; native; contentfiles; analyzers; buildtransitive 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/Warehouse/FDepositPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Warehouse; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.Warehouse 26 | { 27 | public class FDepositPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(FDepositPacket fdepositPacket, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/Warehouse/FReposPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Warehouse; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.Warehouse 26 | { 27 | public class FReposPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(FReposPacket freposPacket, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/Warehouse/FStashEndPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Warehouse; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.Warehouse 26 | { 27 | public class FStashEndPackettHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(FStashEndPacket packet, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/Warehouse/StashEndPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Warehouse; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.Warehouse 26 | { 27 | public class StashEndPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(StashEndPacket packet, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.PacketHandlers/Warehouse/WithdrawPacketHandler.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.GameObject; 21 | using NosCore.GameObject.Networking.ClientSession; 22 | using NosCore.Packets.ClientPackets.Warehouse; 23 | using System.Threading.Tasks; 24 | 25 | namespace NosCore.PacketHandlers.Warehouse 26 | { 27 | public class WithdrawPacketHandler : PacketHandler, IWorldPacketHandler 28 | { 29 | public override Task ExecuteAsync(WithdrawPacket withdrawPacket, ClientSession clientSession) 30 | { 31 | return Task.CompletedTask; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/NosCore.Parser/ParserConfiguration.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using NosCore.Shared.Configuration; 21 | using System.ComponentModel.DataAnnotations; 22 | 23 | namespace NosCore.Parser 24 | { 25 | public class ParserConfiguration : LanguageConfiguration 26 | { 27 | [Required] 28 | public SqlConnectionConfiguration Database { get; set; } = null!; 29 | } 30 | } -------------------------------------------------------------------------------- /src/NosCore.WebApi/ApiConfiguration.cs: -------------------------------------------------------------------------------- 1 | // __ _ __ __ ___ __ ___ ___ 2 | // | \| |/__\ /' _/ / _//__\| _ \ __| 3 | // | | ' | \/ |`._`.| \_| \/ | v / _| 4 | // |_|\__|\__/ |___/ \__/\__/|_|_\___| 5 | // 6 | // Copyright (C) 2019 - NosCore 7 | // 8 | // NosCore is a free software: you can redistribute it and/or modify 9 | // it under the terms of the GNU General Public License as published by 10 | // the Free Software Foundation, either version 3 of the License, or any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | 20 | using System.ComponentModel.DataAnnotations; 21 | using NosCore.Shared.Configuration; 22 | 23 | namespace NosCore.WebApi 24 | { 25 | public class ApiConfiguration : ServerConfiguration 26 | { 27 | [Required] 28 | public WebApiConfiguration MasterCommunication { get; set; } = null!; 29 | 30 | [Required] 31 | public SqlConnectionConfiguration Database { get; set; } = null!; 32 | } 33 | } -------------------------------------------------------------------------------- /src/NosCore.WebApi/Controllers/NosmallController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | using Microsoft.AspNetCore.Authorization; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace NosCore.WebApi.Controllers 8 | { 9 | [Route("[controller]")] 10 | [AllowAnonymous] 11 | // this file is an entrypoint for Mall creation. it's not recommended to add code here. 12 | public class MallController : Controller 13 | { 14 | [HttpGet] 15 | [Route("")] 16 | public ActionResult Index(string sid, string pid, string user_id, string m_szName, string sas, string c, string shopType, 17 | string display_language) 18 | { 19 | using var md5 = MD5.Create(); 20 | var md5bytes = md5.ComputeHash(Encoding.Default.GetBytes($"{sid}{pid}{user_id}{m_szName}shtmxpdlfeoqkr")); 21 | 22 | if (sas != Convert.ToHexString(md5bytes)) 23 | { 24 | throw new ArgumentException(null, nameof(sas)); 25 | } 26 | var result = Content(@$" 27 | 28 | 29 | 30 | {sid} 31 | {pid} 32 | {user_id} 33 | {m_szName} 34 | {sas} 35 | {c} 36 | {shopType} 37 | {display_language} 38 | 39 | 40 | "); 41 | result.ContentType = "text/html; charset=UTF-8"; 42 | 43 | return result; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tools/NosCore.DtoGenerator/NosCore.DtoGenerator.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | enable 6 | preview 7 | true 8 | false 9 | 10 | 11 | 12 | 13 | all 14 | runtime; build; native; contentfiles; analyzers; buildtransitive 15 | 16 | 17 | all 18 | 19 | 20 | 21 | 22 | 23 | all 24 | runtime; build; native; contentfiles; analyzers; buildtransitive 25 | 26 | 27 | 28 | --------------------------------------------------------------------------------