diff --git a/Core/src/commands/admin/testCommands/Fight/GloryPointsTestCommand.ts b/Core/src/commands/admin/testCommands/Fight/GloryPointsTestCommand.ts index f7fd8539e..95074e420 100644 --- a/Core/src/commands/admin/testCommands/Fight/GloryPointsTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Fight/GloryPointsTestCommand.ts @@ -1,5 +1,5 @@ import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; export const commandInfo: ITestCommand = { name: "glorypoints", diff --git a/Core/src/commands/admin/testCommands/Guild/ForceJoinGuildTestCommand.ts b/Core/src/commands/admin/testCommands/Guild/ForceJoinGuildTestCommand.ts index f82f24dbe..78e80b0ed 100644 --- a/Core/src/commands/admin/testCommands/Guild/ForceJoinGuildTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Guild/ForceJoinGuildTestCommand.ts @@ -1,7 +1,7 @@ import Guild from "../../../../core/database/game/models/Guild"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {Players} from "../../../../core/database/game/models/Player"; -import {GuildConstants} from "../../../../core/constants/GuildConstants"; +import {GuildConstants} from "../../../../../../Lib/src/constants/GuildConstants"; export const commandInfo: ITestCommand = { name: "forcejoinguild", diff --git a/Core/src/commands/admin/testCommands/Guild/GuildLevelTestCommand.ts b/Core/src/commands/admin/testCommands/Guild/GuildLevelTestCommand.ts index 381955d04..b08c5154c 100644 --- a/Core/src/commands/admin/testCommands/Guild/GuildLevelTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Guild/GuildLevelTestCommand.ts @@ -1,6 +1,6 @@ import Guild from "../../../../core/database/game/models/Guild"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; -import {GuildConstants} from "../../../../core/constants/GuildConstants"; +import {GuildConstants} from "../../../../../../Lib/src/constants/GuildConstants"; export const commandInfo: ITestCommand = { name: "guildlevel", diff --git a/Core/src/commands/admin/testCommands/Guild/GuildRewardTestCommand.ts b/Core/src/commands/admin/testCommands/Guild/GuildRewardTestCommand.ts index bd6842bff..0f67012a2 100644 --- a/Core/src/commands/admin/testCommands/Guild/GuildRewardTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Guild/GuildRewardTestCommand.ts @@ -1,5 +1,5 @@ import Guild from "../../../../core/database/game/models/Guild"; -import {GuildDailyConstants} from "../../../../core/constants/GuildDailyConstants"; +import {GuildDailyConstants} from "../../../../../../Lib/src/constants/GuildDailyConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; let stringDesc = "Force un gd avec une sortie donnée. Liste des sorties possibles : "; diff --git a/Core/src/commands/admin/testCommands/Guild/GuildScoreTestCommand.ts b/Core/src/commands/admin/testCommands/Guild/GuildScoreTestCommand.ts index 15550d91c..603d76795 100644 --- a/Core/src/commands/admin/testCommands/Guild/GuildScoreTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Guild/GuildScoreTestCommand.ts @@ -1,6 +1,6 @@ import Guild from "../../../../core/database/game/models/Guild"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {draftBotInstance} from "../../../../index"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Guild/GuildXpTestCommand.ts b/Core/src/commands/admin/testCommands/Guild/GuildXpTestCommand.ts index ed90b963b..31a1e93fa 100644 --- a/Core/src/commands/admin/testCommands/Guild/GuildXpTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Guild/GuildXpTestCommand.ts @@ -1,5 +1,5 @@ import Guild from "../../../../core/database/game/models/Guild"; -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Guild/SetFoodTestCommand.ts b/Core/src/commands/admin/testCommands/Guild/SetFoodTestCommand.ts index 45309a860..fca21ac01 100644 --- a/Core/src/commands/admin/testCommands/Guild/SetFoodTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Guild/SetFoodTestCommand.ts @@ -1,6 +1,6 @@ import Guild from "../../../../core/database/game/models/Guild"; import {getFoodIndexOf} from "../../../../core/utils/FoodUtils"; -import {Constants} from "../../../../core/Constants"; +import {Constants} from "../../../../../../Lib/src/constants/Constants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Map/TravelTestCommand.ts b/Core/src/commands/admin/testCommands/Map/TravelTestCommand.ts index a0310a4d2..a9f125677 100644 --- a/Core/src/commands/admin/testCommands/Map/TravelTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Map/TravelTestCommand.ts @@ -1,7 +1,7 @@ import {Maps} from "../../../../core/maps/Maps"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {TravelTime} from "../../../../core/maps/TravelTime"; -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {MapLinkDataController} from "../../../../data/MapLink"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Missions/AddGemsTestCommand.ts b/Core/src/commands/admin/testCommands/Missions/AddGemsTestCommand.ts index 1039d3562..dff7ae0cf 100644 --- a/Core/src/commands/admin/testCommands/Missions/AddGemsTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Missions/AddGemsTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {PlayerMissionsInfos} from "../../../../core/database/game/models/PlayerMissionsInfo"; diff --git a/Core/src/commands/admin/testCommands/Pet/PetLovePointsTestCommand.ts b/Core/src/commands/admin/testCommands/Pet/PetLovePointsTestCommand.ts index fa4ca24a8..b8cbec0e3 100644 --- a/Core/src/commands/admin/testCommands/Pet/PetLovePointsTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Pet/PetLovePointsTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {PetEntities} from "../../../../core/database/game/models/PetEntity"; diff --git a/Core/src/commands/admin/testCommands/Player/AddMoneyTestCommand.ts b/Core/src/commands/admin/testCommands/Player/AddMoneyTestCommand.ts index e214b6bf3..91642ee28 100644 --- a/Core/src/commands/admin/testCommands/Player/AddMoneyTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/AddMoneyTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Player/ExperienceTestCommand.ts b/Core/src/commands/admin/testCommands/Player/ExperienceTestCommand.ts index 8b44c5791..738959698 100644 --- a/Core/src/commands/admin/testCommands/Player/ExperienceTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/ExperienceTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Player/PlayerHealthTestCommand.ts b/Core/src/commands/admin/testCommands/Player/PlayerHealthTestCommand.ts index a1bb7b89b..8ea25daa0 100644 --- a/Core/src/commands/admin/testCommands/Player/PlayerHealthTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/PlayerHealthTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Player/PlayerMoneyTestCommand.ts b/Core/src/commands/admin/testCommands/Player/PlayerMoneyTestCommand.ts index 3cdcaffca..6299596fb 100644 --- a/Core/src/commands/admin/testCommands/Player/PlayerMoneyTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/PlayerMoneyTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Player/PlayerScoreTestCommand.ts b/Core/src/commands/admin/testCommands/Player/PlayerScoreTestCommand.ts index 029cf4ac8..da1f10717 100644 --- a/Core/src/commands/admin/testCommands/Player/PlayerScoreTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/PlayerScoreTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; export const commandInfo: ITestCommand = { diff --git a/Core/src/commands/admin/testCommands/Player/PlayerSuicideTestCommand.ts b/Core/src/commands/admin/testCommands/Player/PlayerSuicideTestCommand.ts index 4dd655da1..ee6fa95aa 100644 --- a/Core/src/commands/admin/testCommands/Player/PlayerSuicideTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/PlayerSuicideTestCommand.ts @@ -1,5 +1,5 @@ import {ExecuteTestCommandLike, ITestCommand} from "../../../../core/CommandsTest"; -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; export const commandInfo: ITestCommand = { name: "playerkill", diff --git a/Core/src/commands/admin/testCommands/Player/SkipTutorialTestCommand.ts b/Core/src/commands/admin/testCommands/Player/SkipTutorialTestCommand.ts index de3fb7054..fcf16ab7c 100644 --- a/Core/src/commands/admin/testCommands/Player/SkipTutorialTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Player/SkipTutorialTestCommand.ts @@ -1,5 +1,5 @@ import {Maps} from "../../../../core/maps/Maps"; -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand} from "../../../../core/CommandsTest"; import {TravelTime} from "../../../../core/maps/TravelTime"; import {MapLinkDataController} from "../../../../data/MapLink"; diff --git a/Core/src/commands/admin/testCommands/Time/AdvanceTravelTestCommand.ts b/Core/src/commands/admin/testCommands/Time/AdvanceTravelTestCommand.ts index 43761383f..07e6fbbcd 100644 --- a/Core/src/commands/admin/testCommands/Time/AdvanceTravelTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Time/AdvanceTravelTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {TravelTime} from "../../../../core/maps/TravelTime"; diff --git a/Core/src/commands/admin/testCommands/Time/BlockPlayerTestCommand.ts b/Core/src/commands/admin/testCommands/Time/BlockPlayerTestCommand.ts index dc1d530b4..4cd2b6dd1 100644 --- a/Core/src/commands/admin/testCommands/Time/BlockPlayerTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Time/BlockPlayerTestCommand.ts @@ -1,7 +1,7 @@ import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import Player from "../../../../core/database/game/models/Player"; import {BlockingUtils} from "../../../../core/utils/BlockingUtils"; -import {BlockingConstants} from "../../../../core/constants/BlockingConstants"; +import {BlockingConstants} from "../../../../../../Lib/src/constants/BlockingConstants"; export const commandInfo: ITestCommand = { name: "blockplayer", diff --git a/Core/src/commands/admin/testCommands/Time/JailPlayerTestCommand.ts b/Core/src/commands/admin/testCommands/Time/JailPlayerTestCommand.ts index 64aaab467..60756c275 100644 --- a/Core/src/commands/admin/testCommands/Time/JailPlayerTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Time/JailPlayerTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {EffectsConstants} from "../../../../../../Lib/src/constants/EffectsConstants"; import {TravelTime} from "../../../../core/maps/TravelTime"; diff --git a/Core/src/commands/admin/testCommands/Time/PlayerEffectTestCommand.ts b/Core/src/commands/admin/testCommands/Time/PlayerEffectTestCommand.ts index cdb8882ab..cefe592ae 100644 --- a/Core/src/commands/admin/testCommands/Time/PlayerEffectTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Time/PlayerEffectTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; import {EffectsConstants} from "../../../../../../Lib/src/constants/EffectsConstants"; import {TravelTime} from "../../../../core/maps/TravelTime"; diff --git a/Core/src/commands/admin/testCommands/Time/RemovePlayerEffectTestCommand.ts b/Core/src/commands/admin/testCommands/Time/RemovePlayerEffectTestCommand.ts index 60e2dc346..4f3236b5a 100644 --- a/Core/src/commands/admin/testCommands/Time/RemovePlayerEffectTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Time/RemovePlayerEffectTestCommand.ts @@ -1,4 +1,4 @@ -import {NumberChangeReason} from "../../../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {ExecuteTestCommandLike, ITestCommand} from "../../../../core/CommandsTest"; import {TravelTime} from "../../../../core/maps/TravelTime"; diff --git a/Core/src/commands/player/ProfileCommand.ts b/Core/src/commands/player/ProfileCommand.ts index 5c69f347f..2664737c6 100644 --- a/Core/src/commands/player/ProfileCommand.ts +++ b/Core/src/commands/player/ProfileCommand.ts @@ -1,7 +1,7 @@ import {PetEntities} from "../../core/database/game/models/PetEntity"; import PlayerMissionsInfo, {PlayerMissionsInfos} from "../../core/database/game/models/PlayerMissionsInfo"; import {InventorySlots} from "../../core/database/game/models/InventorySlot"; -import {FightConstants} from "../../core/constants/FightConstants"; +import {FightConstants} from "../../../../Lib/src/constants/FightConstants"; import {packetHandler} from "../../core/packetHandlers/PacketHandler"; import {WebsocketClient} from "../../../../Lib/src/instances/WebsocketClient"; import {DraftBotPacket, makePacket, PacketContext} from "../../../../Lib/src/packets/DraftBotPacket"; @@ -9,7 +9,7 @@ import {CommandProfilePacketReq, CommandProfilePacketRes} from "../../../../Lib/ import {Campaign} from "../../core/missions/Campaign"; import {Players} from "../../core/database/game/models/Player"; import {Guilds} from "../../core/database/game/models/Guild"; -import {Constants} from "../../core/Constants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; import {hoursToMilliseconds} from "../../../../Lib/src/utils/TimeUtils"; import {PetDataController} from "../../data/Pet"; diff --git a/Core/src/commands/player/ReportCommand.ts b/Core/src/commands/player/ReportCommand.ts index 72b80c5bf..696b3b984 100644 --- a/Core/src/commands/player/ReportCommand.ts +++ b/Core/src/commands/player/ReportCommand.ts @@ -14,18 +14,18 @@ import {Player, Players} from "../../core/database/game/models/Player"; import {EffectsConstants} from "../../../../Lib/src/constants/EffectsConstants"; import {Maps} from "../../core/maps/Maps"; import {MapLink, MapLinkDataController} from "../../data/MapLink"; -import {Constants} from "../../core/Constants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; import {getTimeFromXHoursAgo, millisecondsToMinutes, millisecondsToSeconds} from "../../../../Lib/src/utils/TimeUtils"; import {BlockingUtils} from "../../core/utils/BlockingUtils"; -import {BlockingConstants} from "../../core/constants/BlockingConstants"; +import {BlockingConstants} from "../../../../Lib/src/constants/BlockingConstants"; import {MissionsController} from "../../core/missions/MissionsController"; import {FightController} from "../../core/fights/FightController"; -import {PVEConstants} from "../../core/constants/PVEConstants"; +import {PVEConstants} from "../../../../Lib/src/constants/PVEConstants"; import {MonsterDataController} from "../../data/Monster"; import {PlayerFighter} from "../../core/fights/fighter/PlayerFighter"; -import {NumberChangeReason} from "../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {Guilds} from "../../core/database/game/models/Guild"; -import {GuildConstants} from "../../core/constants/GuildConstants"; +import {GuildConstants} from "../../../../Lib/src/constants/GuildConstants"; import {draftBotInstance} from "../../index"; import {MonsterFighter} from "../../core/fights/fighter/MonsterFighter"; import {EndCallback, ReactionCollectorInstance} from "../../core/utils/ReactionsCollector"; @@ -44,7 +44,7 @@ import { import {MapCache} from "../../core/maps/MapCache"; import {TravelTime} from "../../core/maps/TravelTime"; import {SmallEventDataController, SmallEventFuncs} from "../../data/SmallEvent"; -import {ReportConstants} from "../../core/constants/ReportConstants"; +import {ReportConstants} from "../../../../Lib/src/constants/ReportConstants"; import {BigEvent, BigEventDataController} from "../../data/BigEvent"; import { ReactionCollectorBigEvent, diff --git a/Core/src/core/bot/DraftBot.ts b/Core/src/core/bot/DraftBot.ts index 1f4dc2acd..932142e94 100644 --- a/Core/src/core/bot/DraftBot.ts +++ b/Core/src/core/bot/DraftBot.ts @@ -10,7 +10,7 @@ import PetEntity from "../database/game/models/PetEntity"; import {RandomUtils} from "../utils/RandomUtils"; import {PotionDataController} from "../../data/Potion"; import {getNextDay2AM} from "../../../../Lib/src/utils/TimeUtils"; -import {TIMEOUT_FUNCTIONS} from "../constants/TimeoutFunctionsConstants"; +import {TIMEOUT_FUNCTIONS} from "../../../../Lib/src/constants/TimeoutFunctionsConstants"; import {MapCache} from "../maps/MapCache"; import {registerAllPacketHandlers} from "../packetHandlers/PacketHandler"; diff --git a/Core/src/core/database/game/migrations/003-remove-entity.ts b/Core/src/core/database/game/migrations/003-remove-entity.ts index 7e571dfd2..261e8aba8 100644 --- a/Core/src/core/database/game/migrations/003-remove-entity.ts +++ b/Core/src/core/database/game/migrations/003-remove-entity.ts @@ -1,5 +1,5 @@ import {DataTypes, QueryInterface} from "sequelize"; -import {EntityConstants} from "../../../constants/EntityConstants"; +import {EntityConstants} from "../../../../../../Lib/src/constants/EntityConstants"; import {entitiesAttributes001} from "./001-initial-database"; export async function up({context}: { context: QueryInterface }): Promise { diff --git a/Core/src/core/database/game/migrations/008-gloryandleague.ts b/Core/src/core/database/game/migrations/008-gloryandleague.ts index 0f0e5d562..49b38af11 100644 --- a/Core/src/core/database/game/migrations/008-gloryandleague.ts +++ b/Core/src/core/database/game/migrations/008-gloryandleague.ts @@ -1,5 +1,5 @@ import {DataTypes, QueryInterface} from "sequelize"; -import {FightConstants} from "../../../constants/FightConstants"; +import {FightConstants} from "../../../../../../Lib/src/constants/FightConstants"; export const leaguesAttributes008 = { id: { diff --git a/Core/src/core/database/game/models/Guild.ts b/Core/src/core/database/game/models/Guild.ts index bc262809d..22ecd7387 100644 --- a/Core/src/core/database/game/models/Guild.ts +++ b/Core/src/core/database/game/models/Guild.ts @@ -9,7 +9,7 @@ import {DraftBotPacket} from "../../../../../../Lib/src/packets/DraftBotPacket"; import {GuildLevelUpPacket} from "../../../../../../Lib/src/packets/notifications/GuildLevelUpPacket"; import moment = require("moment"); import {TopConstants} from "../../../../../../Lib/src/constants/TopConstants"; -import { Constants } from "../../../../../../Lib/src/Constants/Constants"; +import { Constants } from "../../../../../../Lib/src/constants/Constants"; import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {GuildConstants} from "../../../../../../Lib/src/constants/GuildConstants"; import {PetEntityConstants} from "../../../../../../Lib/src/constants/PetEntityConstants"; diff --git a/Core/src/core/database/game/models/GuildPet.ts b/Core/src/core/database/game/models/GuildPet.ts index 910f7fd69..28915e5bb 100644 --- a/Core/src/core/database/game/models/GuildPet.ts +++ b/Core/src/core/database/game/models/GuildPet.ts @@ -1,4 +1,4 @@ -import {DataTypes, Model, Sequelize} from "sequelize"; +import {CreateOptions, DataTypes, Model, Sequelize} from "sequelize"; import PetEntity from "./PetEntity"; import Guild from "./Guild"; import {draftBotInstance} from "../../../../index"; @@ -16,6 +16,18 @@ export class GuildPet extends Model { declare createdAt: Date; } +// Todo: this needs to be moved +export type ModelType = { create: (values?: unknown, options?: CreateOptions) => Promise> }; + +// Todo: moved the type below here from the constants; maybe somewhere else would be better ? +export type GuildLikeType = { + id: number, + name: string, + creationDate: Date, + chiefId: number, + guildPets: GuildPet[] +} + /** * This class is used to information about pets that are in a shelter */ diff --git a/Core/src/core/database/game/models/PetEntity.ts b/Core/src/core/database/game/models/PetEntity.ts index 4669135ff..7933bbbdb 100644 --- a/Core/src/core/database/game/models/PetEntity.ts +++ b/Core/src/core/database/game/models/PetEntity.ts @@ -1,7 +1,7 @@ import {DataTypes, Model, QueryTypes, Sequelize} from "sequelize"; import {RandomUtils} from "../../../utils/RandomUtils"; import {MissionsController} from "../../../missions/MissionsController"; -import {PET_ENTITY_GIVE_RETURN, PetEntityConstants} from "../../../constants/PetEntityConstants"; +import {PET_ENTITY_GIVE_RETURN, PetEntityConstants} from "../../../../../../Lib/src/constants/PetEntityConstants"; import {Player, PlayerEditValueParameters} from "./Player"; import {PetConstants} from "../../../../../../Lib/src/constants/PetConstants"; import {Guild, Guilds} from "./Guild"; diff --git a/Core/src/core/database/game/models/Player.ts b/Core/src/core/database/game/models/Player.ts index 836c0668b..fa9b28c5e 100644 --- a/Core/src/core/database/game/models/Player.ts +++ b/Core/src/core/database/game/models/Player.ts @@ -3,27 +3,15 @@ import InventorySlot, {InventorySlots} from "./InventorySlot"; import PetEntity from "./PetEntity"; import MissionSlot from "./MissionSlot"; import {InventoryInfos} from "./InventoryInfo"; -import {Constants} from "../../../Constants"; import {MissionsController} from "../../../missions/MissionsController"; import {PlayerActiveObjects} from "./PlayerActiveObjects"; -import {NumberChangeReason} from "../../../constants/LogsConstants"; import {EffectsConstants} from "../../../../../../Lib/src/constants/EffectsConstants"; -import {PlayersConstants} from "../../../constants/PlayersConstants"; -import {InventoryConstants} from "../../../constants/InventoryConstants"; import {getOneDayAgo, millisecondsToSeconds, minutesToHours} from "../../../../../../Lib/src/utils/TimeUtils"; import {TravelTime} from "../../../maps/TravelTime"; -import {EntityConstants} from "../../../constants/EntityConstants"; -import {BlockingConstants} from "../../../constants/BlockingConstants"; -import {GuildConstants} from "../../../constants/GuildConstants"; -import {FightConstants} from "../../../constants/FightConstants"; import {ItemCategory} from "../../../../../../Lib/src/constants/ItemConstants"; import {Maps} from "../../../maps/Maps"; -import {PVEConstants} from "../../../constants/PVEConstants"; -import {MapConstants} from "../../../constants/MapConstants"; import {RandomUtils} from "../../../utils/RandomUtils"; -import {LeagueInfoConstants} from "../../../constants/LeagueInfoConstants"; import {LogsReadRequests} from "../../logs/LogsReadRequests"; -import {ClassInfoConstants} from "../../../constants/ClassInfoConstants"; import {PlayerSmallEvents} from "./PlayerSmallEvent"; import {Guilds} from "./Guild"; import {DraftBotPacket} from "../../../../../../Lib/src/packets/DraftBotPacket"; @@ -39,6 +27,18 @@ import {BlockingUtils} from "../../../utils/BlockingUtils"; import {League, LeagueDataController} from "../../../../data/League"; import moment = require("moment"); import {TopConstants} from "../../../../../../Lib/src/constants/TopConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; +import {InventoryConstants} from "../../../../../../Lib/src/constants/InventoryConstants"; +import { Constants } from "../../../../../../Lib/src/constants/Constants"; +import {FightConstants} from "../../../../../../Lib/src/constants/FightConstants"; +import {LeagueInfoConstants} from "../../../../../../Lib/src/constants/LeagueInfoConstants"; +import {PVEConstants} from "../../../../../../Lib/src/constants/PVEConstants"; +import {PlayersConstants} from "../../../../../../Lib/src/constants/PlayersConstants"; +import {EntityConstants} from "../../../../../../Lib/src/constants/EntityConstants"; +import {ClassInfoConstants} from "../../../../../../Lib/src/constants/ClassInfoConstants"; +import {GuildConstants} from "../../../../../../Lib/src/constants/GuildConstants"; +import {MapConstants} from "../../../../../../Lib/src/constants/MapConstants"; +import {BlockingConstants} from "../../../../../../Lib/src/constants/BlockingConstants"; export type PlayerEditValueParameters = { player: Player, diff --git a/Core/src/core/database/game/models/PlayerMissionsInfo.ts b/Core/src/core/database/game/models/PlayerMissionsInfo.ts index 6f662e92d..656f89693 100644 --- a/Core/src/core/database/game/models/PlayerMissionsInfo.ts +++ b/Core/src/core/database/game/models/PlayerMissionsInfo.ts @@ -1,6 +1,6 @@ import {DataTypes, Model, Sequelize} from "sequelize"; import {datesAreOnSameDay} from "../../../../../../Lib/src/utils/TimeUtils"; -import {NumberChangeReason} from "../../../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../../Lib/src/constants/LogsConstants"; import {draftBotInstance} from "../../../../index"; import {Campaign} from "../../../missions/Campaign"; import moment = require("moment"); diff --git a/Core/src/core/database/logs/LogsDatabase.ts b/Core/src/core/database/logs/LogsDatabase.ts index 5240de39f..d4bc7efdb 100644 --- a/Core/src/core/database/logs/LogsDatabase.ts +++ b/Core/src/core/database/logs/LogsDatabase.ts @@ -52,7 +52,7 @@ import {LogsMissionShopBuyouts} from "./models/LogsMissionShopBuyouts"; import {getFoodIndexOf} from "../../utils/FoodUtils"; import {LogsDailyTimeouts} from "./models/LogsDailyTimeouts"; import {LogsTopWeekEnd} from "./models/LogsTopWeekEnd"; -import {GuildDailyConstants} from "../../constants/GuildDailyConstants"; +import {GuildDailyConstants} from "../../../../../Lib/src/constants/GuildDailyConstants"; import {LogsGuildsDailies} from "./models/LogsGuildsDailies"; import {LogsPetsTransfers} from "./models/LogsPetsTransfers"; import {LogsGuildsLeaves} from "./models/LogsGuildsLeaves"; @@ -60,7 +60,7 @@ import {LogsGuildsDestroys} from "./models/LogsGuildsDestroys"; import {LogsGuildsEldersRemoves} from "./models/LogsGuildsEldersRemoves"; import {LogsGuildsChiefsChanges} from "./models/LogsGuildsChiefsChanges"; import {LogsPetsFrees} from "./models/LogsPetsFrees"; -import {GuildPets} from "../game/models/GuildPet"; +import {GuildLikeType, GuildPets, ModelType} from "../game/models/GuildPet"; import {LogsFightsResults} from "./models/LogsFightsResults"; import {LogsFightsActionsUsed} from "./models/LogsFightsActionsUsed"; import {LogsFightsActions} from "./models/LogsFightsActions"; @@ -78,7 +78,7 @@ import {LogsGuildsNewPets} from "./models/LogsGuildsNewPets"; import {LogsPlayersNewPets} from "./models/LogsPlayersNewPets"; import {EffectsConstants} from "../../../../../Lib/src/constants/EffectsConstants"; import {LogsPlayersDailies} from "./models/LogsPlayersDailies"; -import {GuildLikeType, ModelType, NumberChangeReason, ShopItemType} from "../../constants/LogsConstants"; +import {NumberChangeReason, ShopItemType} from "../../../../../Lib/src/constants/LogsConstants"; import {getDateLogs} from "../../../../../Lib/src/utils/TimeUtils"; import {LogsPlayersGloryPoints} from "./models/LogsPlayersGloryPoints"; import {LogsPlayers15BestSeason} from "./models/LogsPlayers15BestSeason"; diff --git a/Core/src/core/database/logs/LogsReadRequests.ts b/Core/src/core/database/logs/LogsReadRequests.ts index 4394866f3..0f9166a49 100644 --- a/Core/src/core/database/logs/LogsReadRequests.ts +++ b/Core/src/core/database/logs/LogsReadRequests.ts @@ -1,7 +1,7 @@ import {LogsDailyPotions} from "./models/LogsDailyPotions"; import {LogsClassicalShopBuyouts} from "./models/LogsClassicalShopBuyouts"; import {HasOne, Op} from "sequelize"; -import {ShopItemType} from "../../constants/LogsConstants"; +import {ShopItemType} from "../../../../../Lib/src/constants/LogsConstants"; import {LogsDatabase} from "./LogsDatabase"; import {LogsPlayersPossibilities} from "./models/LogsPlayersPossibilities"; import {LogsPossibilities} from "./models/LogsPossibilities"; @@ -9,14 +9,14 @@ import {LogsPlayers} from "./models/LogsPlayers"; import {LogsPlayersTravels} from "./models/LogsPlayersTravels"; import {getNextSaturdayMidnight, getNextSundayMidnight, minutesToMilliseconds} from "../../../../../Lib/src/utils/TimeUtils"; import {LogsMapLinks} from "./models/LogsMapLinks"; -import {MapConstants} from "../../constants/MapConstants"; +import {MapConstants} from "../../../../../Lib/src/constants/MapConstants"; import {LogsFightsResults} from "./models/LogsFightsResults"; import {LogsSeasonEnd} from "./models/LogsSeasonEnd"; import {LogsPlayerLeagueReward} from "./models/LogsPlayerLeagueReward"; import {LogsPlayersClassChanges} from "./models/LogsPlayersClassChanges"; import Player from "../game/models/Player"; import {MapCache} from "../../maps/MapCache"; -import {PVEConstants} from "../../constants/PVEConstants"; +import {PVEConstants} from "../../../../../Lib/src/constants/PVEConstants"; import {LogsGuildsJoins} from "./models/LogsGuildJoins"; import {LogsGuilds} from "./models/LogsGuilds"; import {MapLocationDataController} from "../../../data/MapLocation"; diff --git a/Core/src/core/fights/FightController.ts b/Core/src/core/fights/FightController.ts index 6327ad6c2..16c87130c 100644 --- a/Core/src/core/fights/FightController.ts +++ b/Core/src/core/fights/FightController.ts @@ -2,13 +2,13 @@ import {Fighter} from "./fighter/Fighter"; import {FightState} from "./FightState"; import {FightView} from "./FightView"; import {RandomUtils} from "../utils/RandomUtils"; -import {FightConstants} from "../constants/FightConstants"; +import {FightConstants} from "../../../../Lib/src/constants/FightConstants"; import {FighterStatus} from "./FighterStatus"; import {FightWeather, FightWeatherEnum} from "./FightWeather"; import {FightOvertimeBehavior} from "./FightOvertimeBehavior"; import {MonsterFighter} from "./fighter/MonsterFighter"; import {PlayerFighter} from "./fighter/PlayerFighter"; -import {PVEConstants} from "../constants/PVEConstants"; +import {PVEConstants} from "../../../../Lib/src/constants/PVEConstants"; import {PacketContext} from "../../../../Lib/src/packets/DraftBotPacket"; import {FightStatModifierOperation} from "../../../../Lib/src/interfaces/FightStatModifierOperation"; import {FightAlterationResult, FightAlterationState} from "../../../../Lib/src/interfaces/FightAlterationResult"; diff --git a/Core/src/core/fights/actions/FightActionController.ts b/Core/src/core/fights/actions/FightActionController.ts index d9640001d..fa5da61b9 100644 --- a/Core/src/core/fights/actions/FightActionController.ts +++ b/Core/src/core/fights/actions/FightActionController.ts @@ -1,4 +1,4 @@ -import {FightConstants} from "../../constants/FightConstants"; +import {FightConstants} from "../../../../../Lib/src/constants/FightConstants"; import {RandomUtils} from "../../utils/RandomUtils"; import {Fighter} from "../fighter/Fighter"; import {FightActionStatus} from "../../../../../Lib/src/interfaces/FightActionStatus"; diff --git a/Core/src/core/fights/actions/interfaces/alterations/cursed.ts b/Core/src/core/fights/actions/interfaces/alterations/cursed.ts index 53628dc4b..37c27e05c 100644 --- a/Core/src/core/fights/actions/interfaces/alterations/cursed.ts +++ b/Core/src/core/fights/actions/interfaces/alterations/cursed.ts @@ -1,7 +1,7 @@ import {Fighter} from "../../../fighter/Fighter"; import {attackInfo, FightActionController, statsInfo} from "../../FightActionController"; import {MathUtils} from "../../../../utils/MathUtils"; -import {FightConstants} from "../../../../constants/FightConstants"; +import {FightConstants} from "../../../../../../../Lib/src/constants/FightConstants"; import {FightAlterationFunc} from "../../../../../data/FightAlteration"; import {defaultFightAlterationResult, defaultHealFightAlterationResult} from "../../../FightController"; diff --git a/Core/src/core/fights/actions/interfaces/players/counterAttack.ts b/Core/src/core/fights/actions/interfaces/players/counterAttack.ts index 9bb1418b0..c5ec83b9d 100644 --- a/Core/src/core/fights/actions/interfaces/players/counterAttack.ts +++ b/Core/src/core/fights/actions/interfaces/players/counterAttack.ts @@ -1,4 +1,4 @@ -import {FightConstants} from "../../../../constants/FightConstants"; +import {FightConstants} from "../../../../../../../Lib/src/constants/FightConstants"; import {FightActionDataController, FightActionFunc} from "../../../../../data/FightAction"; import {defaultFailFightActionResult, defaultFightActionResult} from "../../../../../../../Lib/src/interfaces/FightActionResult"; diff --git a/Core/src/core/fights/actions/interfaces/players/divineAttack.ts b/Core/src/core/fights/actions/interfaces/players/divineAttack.ts index 082cad2af..ac6d0f539 100644 --- a/Core/src/core/fights/actions/interfaces/players/divineAttack.ts +++ b/Core/src/core/fights/actions/interfaces/players/divineAttack.ts @@ -1,6 +1,6 @@ import {Fighter} from "../../../fighter/Fighter"; import {attackInfo, FightActionController, statsInfo} from "../../FightActionController"; -import {FightConstants} from "../../../../constants/FightConstants"; +import {FightConstants} from "../../../../../../../Lib/src/constants/FightConstants"; import {FightAlterations} from "../../FightAlterations"; import {FightActionFunc} from "../../../../../data/FightAction"; import {simpleDamageFightAction} from "../../templates/SimpleDamageFightActionTemplate"; diff --git a/Core/src/core/fights/actions/interfaces/players/rageExplosion.ts b/Core/src/core/fights/actions/interfaces/players/rageExplosion.ts index 02b475d12..9a113682c 100644 --- a/Core/src/core/fights/actions/interfaces/players/rageExplosion.ts +++ b/Core/src/core/fights/actions/interfaces/players/rageExplosion.ts @@ -1,8 +1,8 @@ import {Fighter} from "../../../fighter/Fighter"; import {attackInfo, FightActionController, statsInfo} from "../../FightActionController"; import {PlayerFighter} from "../../../fighter/PlayerFighter"; -import {NumberChangeReason} from "../../../../constants/LogsConstants"; -import {PVEConstants} from "../../../../constants/PVEConstants"; +import {NumberChangeReason} from "../../../../../../../Lib/src/constants/LogsConstants"; +import {PVEConstants} from "../../../../../../../Lib/src/constants/PVEConstants"; import {FightActionFunc} from "../../../../../data/FightAction"; import {FightActionStatus} from "../../../../../../../Lib/src/interfaces/FightActionStatus"; diff --git a/Core/src/core/fights/fighter/Fighter.ts b/Core/src/core/fights/fighter/Fighter.ts index 6c8841cf4..781febf24 100644 --- a/Core/src/core/fights/fighter/Fighter.ts +++ b/Core/src/core/fights/fighter/Fighter.ts @@ -1,7 +1,7 @@ import {FighterStatus} from "../FighterStatus"; import {FightView} from "../FightView"; import {RandomUtils} from "../../utils/RandomUtils"; -import {PVEConstants} from "../../constants/PVEConstants"; +import {PVEConstants} from "../../../../../Lib/src/constants/PVEConstants"; import {FightStatModifierOperation} from "../../../../../Lib/src/interfaces/FightStatModifierOperation"; import {FightAlteration} from "../../../data/FightAlteration"; import {FightAction} from "../../../data/FightAction"; diff --git a/Core/src/core/fights/fighter/MonsterFighter.ts b/Core/src/core/fights/fighter/MonsterFighter.ts index 9b6cd4d99..71637b908 100644 --- a/Core/src/core/fights/fighter/MonsterFighter.ts +++ b/Core/src/core/fights/fighter/MonsterFighter.ts @@ -1,7 +1,7 @@ import {Fighter} from "./Fighter"; import {FightView} from "../FightView"; import {RandomUtils} from "../../utils/RandomUtils"; -import {PVEConstants} from "../../constants/PVEConstants"; +import {PVEConstants} from "../../../../../Lib/src/constants/PVEConstants"; import {FighterStatus} from "../FighterStatus"; import {Monster} from "../../../data/Monster"; import {FightAction, FightActionDataController} from "../../../data/FightAction"; diff --git a/Core/src/core/fights/fighter/PlayerFighter.ts b/Core/src/core/fights/fighter/PlayerFighter.ts index 8bd7be3ff..484c75a9d 100644 --- a/Core/src/core/fights/fighter/PlayerFighter.ts +++ b/Core/src/core/fights/fighter/PlayerFighter.ts @@ -4,16 +4,16 @@ import {InventorySlots} from "../../database/game/models/InventorySlot"; import {PlayerActiveObjects} from "../../database/game/models/PlayerActiveObjects"; import {checkDrinkPotionMissions} from "../../utils/ItemUtils"; import {BlockingUtils} from "../../utils/BlockingUtils"; -import {BlockingConstants} from "../../constants/BlockingConstants"; +import {BlockingConstants} from "../../../../../Lib/src/constants/BlockingConstants"; import {FightView} from "../FightView"; import {MissionsController} from "../../missions/MissionsController"; import {MissionSlots} from "../../database/game/models/MissionSlot"; import {getDayNumber} from "../../../../../Lib/src/utils/TimeUtils"; -import {NumberChangeReason} from "../../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../../Lib/src/constants/LogsConstants"; import {FighterStatus} from "../FighterStatus"; import {Maps} from "../../maps/Maps"; import {RandomUtils} from "../../utils/RandomUtils"; -import {PVEConstants} from "../../constants/PVEConstants"; +import {PVEConstants} from "../../../../../Lib/src/constants/PVEConstants"; import {Class} from "../../../data/Class"; import {FightAction, FightActionDataController} from "../../../data/FightAction"; import {DraftBotPacket} from "../../../../../Lib/src/packets/DraftBotPacket"; diff --git a/Core/src/core/maps/MapCache.ts b/Core/src/core/maps/MapCache.ts index 1e28423bc..89fad5d48 100644 --- a/Core/src/core/maps/MapCache.ts +++ b/Core/src/core/maps/MapCache.ts @@ -1,4 +1,4 @@ -import {MapConstants} from "../constants/MapConstants"; +import {MapConstants} from "../../../../Lib/src/constants/MapConstants"; import {RandomUtils} from "../utils/RandomUtils"; import {LogsMapLinks} from "../database/logs/models/LogsMapLinks"; import {Op, Sequelize} from "sequelize"; diff --git a/Core/src/core/maps/Maps.ts b/Core/src/core/maps/Maps.ts index bf793fb03..edfb5813f 100644 --- a/Core/src/core/maps/Maps.ts +++ b/Core/src/core/maps/Maps.ts @@ -1,6 +1,6 @@ import Player from "../database/game/models/Player"; import {TravelTime} from "./TravelTime"; -import {MapConstants} from "../constants/MapConstants"; +import {MapConstants} from "../../../../Lib/src/constants/MapConstants"; import {MapCache} from "./MapCache"; import {Op} from "sequelize"; import {LogsReadRequests} from "../database/logs/LogsReadRequests"; diff --git a/Core/src/core/maps/TravelTime.ts b/Core/src/core/maps/TravelTime.ts index 0ca23b78c..e77e8ee6a 100644 --- a/Core/src/core/maps/TravelTime.ts +++ b/Core/src/core/maps/TravelTime.ts @@ -1,11 +1,11 @@ import Player from "../database/game/models/Player"; import {millisecondsToMinutes, minutesToMilliseconds} from "../../../../Lib/src/utils/TimeUtils"; import {PlayerSmallEvents} from "../database/game/models/PlayerSmallEvent"; -import {Constants} from "../Constants"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {EffectsConstants} from "../../../../Lib/src/constants/EffectsConstants"; import {Maps} from "./Maps"; -import {PVEConstants} from "../constants/PVEConstants"; +import {PVEConstants} from "../../../../Lib/src/constants/PVEConstants"; import {MapLinkDataController} from "../../data/MapLink"; import {draftBotInstance} from "../../index"; import {TravelEndPushPacket} from "../../../../Lib/src/packets/push/TravelEndPushPacket"; diff --git a/Core/src/core/missions/MissionsController.ts b/Core/src/core/missions/MissionsController.ts index 52b4ddefc..08150d8d7 100644 --- a/Core/src/core/missions/MissionsController.ts +++ b/Core/src/core/missions/MissionsController.ts @@ -5,9 +5,9 @@ import {DailyMissions} from "../database/game/models/DailyMission"; import {hoursToMilliseconds} from "../../../../Lib/src/utils/TimeUtils"; import {MissionDifficulty} from "./MissionDifficulty"; import {Campaign} from "./Campaign"; -import {Constants} from "../Constants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; import {RandomUtils} from "../utils/RandomUtils"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import PlayerMissionsInfo, {PlayerMissionsInfos} from "../database/game/models/PlayerMissionsInfo"; import {DraftBotPacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {MissionsExpiredPacket} from "../../../../Lib/src/packets/notifications/MissionsExpiredPacket"; diff --git a/Core/src/core/smallEvents/advanceTime.ts b/Core/src/core/smallEvents/advanceTime.ts index e8b35703d..15a3f02d4 100644 --- a/Core/src/core/smallEvents/advanceTime.ts +++ b/Core/src/core/smallEvents/advanceTime.ts @@ -2,7 +2,7 @@ import {SmallEventFuncs} from "../../data/SmallEvent"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {RandomUtils} from "../utils/RandomUtils"; import {TravelTime} from "../maps/TravelTime"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {SmallEventAdvanceTimePacket} from "../../../../Lib/src/packets/smallEvents/SmallEventAdvanceTimePacket"; import {Maps} from "../maps/Maps"; diff --git a/Core/src/core/smallEvents/bigBad.ts b/Core/src/core/smallEvents/bigBad.ts index 417471012..1f04a760b 100644 --- a/Core/src/core/smallEvents/bigBad.ts +++ b/Core/src/core/smallEvents/bigBad.ts @@ -1,7 +1,7 @@ import {SmallEventDataController, SmallEventFuncs} from "../../data/SmallEvent"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {RandomUtils} from "../utils/RandomUtils"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {TravelTime} from "../maps/TravelTime"; import {MissionsController} from "../missions/MissionsController"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; diff --git a/Core/src/core/smallEvents/bonusGuildPVEIsland.ts b/Core/src/core/smallEvents/bonusGuildPVEIsland.ts index 20be2fbde..9f1861e64 100644 --- a/Core/src/core/smallEvents/bonusGuildPVEIsland.ts +++ b/Core/src/core/smallEvents/bonusGuildPVEIsland.ts @@ -1,11 +1,11 @@ import {SmallEventDataController, SmallEventFuncs} from "../../data/SmallEvent"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {SmallEventBonusGuildPVEIslandPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventBonusGuildPVEIslandPacket"; import {DraftBotPacket, makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {Maps} from "../maps/Maps"; import Player from "../database/game/models/Player"; import {RandomUtils} from "../utils/RandomUtils"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {Guilds} from "../database/game/models/Guild"; type Malus = { diff --git a/Core/src/core/smallEvents/fightPet.ts b/Core/src/core/smallEvents/fightPet.ts index 6635e5490..7909fe152 100644 --- a/Core/src/core/smallEvents/fightPet.ts +++ b/Core/src/core/smallEvents/fightPet.ts @@ -1,14 +1,14 @@ import Player from "../database/game/models/Player"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; -import {ClassInfoConstants} from "../constants/ClassInfoConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; +import {ClassInfoConstants} from "../../../../Lib/src/constants/ClassInfoConstants"; import {FightPetAction, FightPetActionDataController} from "../../data/FightPetAction"; import {Maps} from "../maps/Maps"; import {SmallEventFuncs} from "../../data/SmallEvent"; import {PetDataController} from "../../data/Pet"; import {BlockingUtils} from "../utils/BlockingUtils"; import {makePacket, PacketContext} from "../../../../Lib/src/packets/DraftBotPacket"; -import {BlockingConstants} from "../constants/BlockingConstants"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {BlockingConstants} from "../../../../Lib/src/constants/BlockingConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {RandomUtils} from "../utils/RandomUtils"; import {EndCallback, ReactionCollectorInstance} from "../utils/ReactionsCollector"; import {ReactionCollectorFightPet, ReactionCollectorFightPetReaction} from "../../../../Lib/src/packets/interaction/ReactionCollectorFightPet"; diff --git a/Core/src/core/smallEvents/fightPet/attackLeft.ts b/Core/src/core/smallEvents/fightPet/attackLeft.ts index a07e5eed8..fafdb549a 100644 --- a/Core/src/core/smallEvents/fightPet/attackLeft.ts +++ b/Core/src/core/smallEvents/fightPet/attackLeft.ts @@ -1,6 +1,6 @@ import Player from "../../database/game/models/Player"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; import {FightPetActionFunc} from "../../../data/FightPetAction"; export const fightPetAction: FightPetActionFunc = (player: Player): boolean => RandomUtils.draftbotRandom.bool( diff --git a/Core/src/core/smallEvents/fightPet/attackRight.ts b/Core/src/core/smallEvents/fightPet/attackRight.ts index a07e5eed8..fafdb549a 100644 --- a/Core/src/core/smallEvents/fightPet/attackRight.ts +++ b/Core/src/core/smallEvents/fightPet/attackRight.ts @@ -1,6 +1,6 @@ import Player from "../../database/game/models/Player"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; import {FightPetActionFunc} from "../../../data/FightPetAction"; export const fightPetAction: FightPetActionFunc = (player: Player): boolean => RandomUtils.draftbotRandom.bool( diff --git a/Core/src/core/smallEvents/fightPet/doNothing.ts b/Core/src/core/smallEvents/fightPet/doNothing.ts index 26d028886..eacbcb109 100644 --- a/Core/src/core/smallEvents/fightPet/doNothing.ts +++ b/Core/src/core/smallEvents/fightPet/doNothing.ts @@ -1,4 +1,4 @@ -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; import {RandomUtils} from "../../utils/RandomUtils"; import {FightPetActionFunc} from "../../../data/FightPetAction"; diff --git a/Core/src/core/smallEvents/fightPet/fistHit.ts b/Core/src/core/smallEvents/fightPet/fistHit.ts index c5bf1d22c..4436f325c 100644 --- a/Core/src/core/smallEvents/fightPet/fistHit.ts +++ b/Core/src/core/smallEvents/fightPet/fistHit.ts @@ -1,7 +1,7 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; import {InventorySlots} from "../../database/game/models/InventorySlot"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; export const fightPetAction: FightPetActionFunc = async (player, pet) => RandomUtils.draftbotRandom.bool( Math.max( diff --git a/Core/src/core/smallEvents/fightPet/focusEnergy.ts b/Core/src/core/smallEvents/fightPet/focusEnergy.ts index a80e5228b..a913f85f3 100644 --- a/Core/src/core/smallEvents/fightPet/focusEnergy.ts +++ b/Core/src/core/smallEvents/fightPet/focusEnergy.ts @@ -1,6 +1,6 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; export const fightPetAction: FightPetActionFunc = (player, pet) => // Chances of success is the ratio of remaining energy on total energy minus the rarity of the pet diff --git a/Core/src/core/smallEvents/fightPet/intimidate.ts b/Core/src/core/smallEvents/fightPet/intimidate.ts index 343a844a7..b3c10e59c 100644 --- a/Core/src/core/smallEvents/fightPet/intimidate.ts +++ b/Core/src/core/smallEvents/fightPet/intimidate.ts @@ -1,5 +1,5 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; import {RandomUtils} from "../../utils/RandomUtils"; export const fightPetAction: FightPetActionFunc = (player, pet) => diff --git a/Core/src/core/smallEvents/fightPet/lastEffort.ts b/Core/src/core/smallEvents/fightPet/lastEffort.ts index 76299b361..91cf2f6fe 100644 --- a/Core/src/core/smallEvents/fightPet/lastEffort.ts +++ b/Core/src/core/smallEvents/fightPet/lastEffort.ts @@ -1,6 +1,6 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; export const fightPetAction: FightPetActionFunc = (player, pet) => // Chances of success is the ratio of remaining energy on total energy minus the rarity of the pet diff --git a/Core/src/core/smallEvents/fightPet/prayGod.ts b/Core/src/core/smallEvents/fightPet/prayGod.ts index c944d666f..cabc25946 100644 --- a/Core/src/core/smallEvents/fightPet/prayGod.ts +++ b/Core/src/core/smallEvents/fightPet/prayGod.ts @@ -1,5 +1,5 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; import {InventorySlots} from "../../database/game/models/InventorySlot"; import {ItemConstants} from "../../../../../Lib/src/constants/ItemConstants"; import {RandomUtils} from "../../utils/RandomUtils"; diff --git a/Core/src/core/smallEvents/fightPet/protect.ts b/Core/src/core/smallEvents/fightPet/protect.ts index d0fc0b7e4..9997278f8 100644 --- a/Core/src/core/smallEvents/fightPet/protect.ts +++ b/Core/src/core/smallEvents/fightPet/protect.ts @@ -1,7 +1,7 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; import {InventorySlots} from "../../database/game/models/InventorySlot"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; export const fightPetAction: FightPetActionFunc = async (player, pet) => RandomUtils.draftbotRandom.bool( Math.max( diff --git a/Core/src/core/smallEvents/fightPet/runAway.ts b/Core/src/core/smallEvents/fightPet/runAway.ts index 1647617e5..d33d7c83d 100644 --- a/Core/src/core/smallEvents/fightPet/runAway.ts +++ b/Core/src/core/smallEvents/fightPet/runAway.ts @@ -1,7 +1,7 @@ import {FightPetActionFunc} from "../../../data/FightPetAction"; import {InventorySlots} from "../../database/game/models/InventorySlot"; import {RandomUtils} from "../../utils/RandomUtils"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; export const fightPetAction: FightPetActionFunc = async (player, pet) => RandomUtils.draftbotRandom.bool( Math.max( diff --git a/Core/src/core/smallEvents/fightPet/usePlayerPet.ts b/Core/src/core/smallEvents/fightPet/usePlayerPet.ts index a63b7d21e..13fe36d21 100644 --- a/Core/src/core/smallEvents/fightPet/usePlayerPet.ts +++ b/Core/src/core/smallEvents/fightPet/usePlayerPet.ts @@ -1,8 +1,8 @@ import {PetEntities} from "../../database/game/models/PetEntity"; import {FightPetActionFunc} from "../../../data/FightPetAction"; import {PetConstants} from "../../../../../Lib/src/constants/PetConstants"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; -import {PetEntityConstants} from "../../constants/PetEntityConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; +import {PetEntityConstants} from "../../../../../Lib/src/constants/PetEntityConstants"; import {RandomUtils} from "../../utils/RandomUtils"; import {PetDataController} from "../../../data/Pet"; diff --git a/Core/src/core/smallEvents/gobletsGame.ts b/Core/src/core/smallEvents/gobletsGame.ts index cf7615098..885dbe664 100644 --- a/Core/src/core/smallEvents/gobletsGame.ts +++ b/Core/src/core/smallEvents/gobletsGame.ts @@ -1,13 +1,13 @@ import {SmallEventDataController, SmallEventFuncs} from "../../data/SmallEvent"; -import {MapConstants} from "../constants/MapConstants"; +import {MapConstants} from "../../../../Lib/src/constants/MapConstants"; import {Maps} from "../maps/Maps"; -import {BlockingConstants} from "../constants/BlockingConstants"; +import {BlockingConstants} from "../../../../Lib/src/constants/BlockingConstants"; import Player from "../database/game/models/Player"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {RandomUtils} from "../utils/RandomUtils"; import {BlockingUtils} from "../utils/BlockingUtils"; import {DraftBotPacket, makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {TravelTime} from "../maps/TravelTime"; import {EffectsConstants} from "../../../../Lib/src/constants/EffectsConstants"; import {SmallEventGobletsGamePacket} from "../../../../Lib/src/packets/smallEvents/SmallEventGobletsGamePacket"; diff --git a/Core/src/core/smallEvents/interfaces/Shop.ts b/Core/src/core/smallEvents/interfaces/Shop.ts index 29922bed9..34c7c611c 100644 --- a/Core/src/core/smallEvents/interfaces/Shop.ts +++ b/Core/src/core/smallEvents/interfaces/Shop.ts @@ -4,12 +4,12 @@ import {Maps} from "../../maps/Maps"; import {ExecuteSmallEventLike} from "../../../data/SmallEvent"; import {getItemValue, giveItemToPlayer} from "../../utils/ItemUtils"; import {EndCallback, ReactionCollectorInstance} from "../../utils/ReactionsCollector"; -import {BlockingConstants} from "../../constants/BlockingConstants"; +import {BlockingConstants} from "../../../../../Lib/src/constants/BlockingConstants"; import {BlockingUtils} from "../../utils/BlockingUtils"; import {SmallEventAnyShopPacket} from "../../../../../Lib/src/packets/smallEvents/SmallEventAnyShopPacket"; import {InventorySlots} from "../../database/game/models/InventorySlot"; -import {SmallEventConstants} from "../../constants/SmallEventConstants"; -import {NumberChangeReason} from "../../constants/LogsConstants"; +import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; +import {NumberChangeReason} from "../../../../../Lib/src/constants/LogsConstants"; import {DraftBotPacket} from "../../../../../Lib/src/packets/DraftBotPacket"; import {ReactionCollectorMerchant, ReactionCollectorMerchantAcceptReaction} from "../../../../../Lib/src/packets/interaction/ReactionCollectorMerchant"; diff --git a/Core/src/core/smallEvents/shop.ts b/Core/src/core/smallEvents/shop.ts index e48ca39b0..a7da12af1 100644 --- a/Core/src/core/smallEvents/shop.ts +++ b/Core/src/core/smallEvents/shop.ts @@ -2,7 +2,7 @@ import {Shop} from "./interfaces/Shop"; import {SmallEventShopPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventShopPacket"; import {GenericItem} from "../../data/GenericItem"; import {RandomUtils} from "../utils/RandomUtils"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {generateRandomItem} from "../utils/ItemUtils"; import {ItemRarity} from "../../../../Lib/src/constants/ItemConstants"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; diff --git a/Core/src/core/smallEvents/winEnergy.ts b/Core/src/core/smallEvents/winEnergy.ts index 88916b909..420e1b311 100644 --- a/Core/src/core/smallEvents/winEnergy.ts +++ b/Core/src/core/smallEvents/winEnergy.ts @@ -1,7 +1,7 @@ import {SmallEventFuncs} from "../../data/SmallEvent"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; -import {MapConstants} from "../constants/MapConstants"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {MapConstants} from "../../../../Lib/src/constants/MapConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {SmallEventWinEnergyPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventWinEnergyPacket"; export const smallEventFuncs: SmallEventFuncs = { diff --git a/Core/src/core/smallEvents/winFightPoints.ts b/Core/src/core/smallEvents/winFightPoints.ts index 0a717320c..142eb83dd 100644 --- a/Core/src/core/smallEvents/winFightPoints.ts +++ b/Core/src/core/smallEvents/winFightPoints.ts @@ -1,7 +1,7 @@ import {SmallEventFuncs} from "../../data/SmallEvent"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {RandomUtils} from "../utils/RandomUtils"; -import {PVEConstants} from "../constants/PVEConstants"; +import {PVEConstants} from "../../../../Lib/src/constants/PVEConstants"; import {SmallEventWinFightPointsPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventWinFightPointsPacket"; import {Maps} from "../maps/Maps"; diff --git a/Core/src/core/smallEvents/winGuildXP.ts b/Core/src/core/smallEvents/winGuildXP.ts index 5a6afbee7..b13e01b7c 100644 --- a/Core/src/core/smallEvents/winGuildXP.ts +++ b/Core/src/core/smallEvents/winGuildXP.ts @@ -1,9 +1,9 @@ import {SmallEventFuncs} from "../../data/SmallEvent"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {RandomUtils} from "../utils/RandomUtils"; import {Guilds} from "../database/game/models/Guild"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {SmallEventWinGuildXPPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventWinGuildXPPacket"; import {Maps} from "../maps/Maps"; diff --git a/Core/src/core/smallEvents/winHealth.ts b/Core/src/core/smallEvents/winHealth.ts index 8be91131a..f9efa8954 100644 --- a/Core/src/core/smallEvents/winHealth.ts +++ b/Core/src/core/smallEvents/winHealth.ts @@ -1,8 +1,8 @@ import {SmallEventFuncs} from "../../data/SmallEvent"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {RandomUtils} from "../utils/RandomUtils"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {SmallEventWinHealthPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventWinHealthPacket"; import {Maps} from "../maps/Maps"; diff --git a/Core/src/core/smallEvents/winPersonalXP.ts b/Core/src/core/smallEvents/winPersonalXP.ts index ed8ee816b..08d591781 100644 --- a/Core/src/core/smallEvents/winPersonalXP.ts +++ b/Core/src/core/smallEvents/winPersonalXP.ts @@ -1,10 +1,10 @@ import {SmallEventFuncs} from "../../data/SmallEvent"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {makePacket} from "../../../../Lib/src/packets/DraftBotPacket"; import {RandomUtils} from "../utils/RandomUtils"; -import {NumberChangeReason} from "../constants/LogsConstants"; import {SmallEventWinPersonalXPPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventWinPersonalXPPacket"; import {Maps} from "../maps/Maps"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; export const smallEventFuncs: SmallEventFuncs = { canBeExecuted: Maps.isOnContinent, diff --git a/Core/src/core/smallEvents/witch.ts b/Core/src/core/smallEvents/witch.ts index 44ba33fa2..c89c7967f 100644 --- a/Core/src/core/smallEvents/witch.ts +++ b/Core/src/core/smallEvents/witch.ts @@ -3,10 +3,10 @@ import {Maps} from "../maps/Maps"; import {EndCallback, ReactionCollectorInstance} from "../utils/ReactionsCollector"; import {DraftBotPacket, makePacket, PacketContext} from "../../../../Lib/src/packets/DraftBotPacket"; import {WitchAction, WitchActionDataController, WitchActionOutcomeType} from "../../data/WitchAction"; -import {Constants} from "../Constants"; -import {SmallEventConstants} from "../constants/SmallEventConstants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; +import {SmallEventConstants} from "../../../../Lib/src/constants/SmallEventConstants"; import {BlockingUtils} from "../utils/BlockingUtils"; -import {BlockingConstants} from "../constants/BlockingConstants"; +import {BlockingConstants} from "../../../../Lib/src/constants/BlockingConstants"; import {RandomUtils} from "../utils/RandomUtils"; import {SmallEventWitchResultPacket} from "../../../../Lib/src/packets/smallEvents/SmallEventWitchPacket"; import {generateRandomItem, giveItemToPlayer} from "../utils/ItemUtils"; @@ -14,8 +14,8 @@ import {ItemCategory, ItemNature, ItemRarity} from "../../../../Lib/src/constant import Player from "../database/game/models/Player"; import {GenericItem} from "../../data/GenericItem"; import {InventorySlots} from "../database/game/models/InventorySlot"; -import {NumberChangeReason} from "../constants/LogsConstants"; import {ReactionCollectorWitch, ReactionCollectorWitchReaction} from "../../../../Lib/src/packets/interaction/ReactionCollectorWitch"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; type WitchEventSelection = { diff --git a/Core/src/core/utils/FoodUtils.ts b/Core/src/core/utils/FoodUtils.ts index 7b8b2ee8e..72bdd4d82 100644 --- a/Core/src/core/utils/FoodUtils.ts +++ b/Core/src/core/utils/FoodUtils.ts @@ -1,4 +1,4 @@ -import {Constants} from "../Constants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; /** * Get the corresponding index in the constants of a given pet food diff --git a/Core/src/core/utils/ItemUtils.ts b/Core/src/core/utils/ItemUtils.ts index 90958a790..92b945a27 100644 --- a/Core/src/core/utils/ItemUtils.ts +++ b/Core/src/core/utils/ItemUtils.ts @@ -1,8 +1,8 @@ import InventorySlot, {InventorySlots} from "../database/game/models/InventorySlot"; import {MissionsController} from "../missions/MissionsController"; import {RandomUtils} from "./RandomUtils"; -import {BlockingConstants} from "../constants/BlockingConstants"; -import {NumberChangeReason} from "../constants/LogsConstants"; +import {BlockingConstants} from "../../../../Lib/src/constants/BlockingConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import Player, {Players} from "../database/game/models/Player"; import {InventoryInfos} from "../database/game/models/InventoryInfo"; import {ItemCategory, ItemConstants, ItemNature, ItemRarity} from "../../../../Lib/src/constants/ItemConstants"; diff --git a/Core/src/core/utils/RandomUtils.ts b/Core/src/core/utils/RandomUtils.ts index 244d04125..d60df197e 100644 --- a/Core/src/core/utils/RandomUtils.ts +++ b/Core/src/core/utils/RandomUtils.ts @@ -1,5 +1,5 @@ import {Random} from "random-js"; -import {ConstantRange} from "../Constants"; +import {ConstantRange} from "../../../../Lib/src/constants/Constants"; /** * Functions concerning pseudo-randomness diff --git a/Core/src/core/utils/ReactionsCollector.ts b/Core/src/core/utils/ReactionsCollector.ts index 5bdf70777..e01dd07b3 100644 --- a/Core/src/core/utils/ReactionsCollector.ts +++ b/Core/src/core/utils/ReactionsCollector.ts @@ -10,7 +10,7 @@ import {DraftBotPacket, makePacket, PacketContext} from "../../../../Lib/src/pac import {BlockingUtils} from "./BlockingUtils"; import {sendPacketsToContext} from "../../../../Lib/src/packets/PacketUtils"; import {WebsocketClient} from "../../../../Lib/src/instances/WebsocketClient"; -import {Constants} from "../Constants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; type CollectCallback = (collector: ReactionCollectorInstance, reaction: ReactionCollectorReaction, keycloakId: string, response: DraftBotPacket[]) => void | Promise; diff --git a/Core/src/data/League.ts b/Core/src/data/League.ts index 681db225a..9d98af5ea 100644 --- a/Core/src/data/League.ts +++ b/Core/src/data/League.ts @@ -1,6 +1,6 @@ import {DataControllerNumber} from "./DataController"; import {Data} from "./Data"; -import {LeagueInfoConstants} from "../core/constants/LeagueInfoConstants"; +import {LeagueInfoConstants} from "../../../Lib/src/constants/LeagueInfoConstants"; import {GenericItem} from "./GenericItem"; import {generateRandomItem} from "../core/utils/ItemUtils"; diff --git a/Core/src/data/MainItem.ts b/Core/src/data/MainItem.ts index a4ef93afb..6a890b74c 100644 --- a/Core/src/data/MainItem.ts +++ b/Core/src/data/MainItem.ts @@ -1,7 +1,7 @@ import {GenericItem} from "./GenericItem"; -import {InventoryConstants} from "../core/constants/InventoryConstants"; import {MainItemDisplayPacket} from "../../../Lib/src/packets/commands/CommandInventoryPacket"; import {MaxStatsValues} from "../../../Lib/src/types/MaxStatsValues"; +import {InventoryConstants} from "../../../Lib/src/constants/InventoryConstants"; export abstract class MainItem extends GenericItem { diff --git a/Core/src/data/Monster.ts b/Core/src/data/Monster.ts index db37441fa..01f9edda0 100644 --- a/Core/src/data/Monster.ts +++ b/Core/src/data/Monster.ts @@ -1,7 +1,7 @@ import {DataControllerString} from "./DataController"; import {Data} from "./Data"; import {RandomUtils} from "../core/utils/RandomUtils"; -import {PVEConstants} from "../core/constants/PVEConstants"; +import {PVEConstants} from "../../../Lib/src/constants/PVEConstants"; export class Monster extends Data { public readonly emoji: string; diff --git a/Core/src/data/Pet.ts b/Core/src/data/Pet.ts index cc6ebf83d..8975b93f2 100644 --- a/Core/src/data/Pet.ts +++ b/Core/src/data/Pet.ts @@ -1,6 +1,6 @@ import {DataControllerNumber} from "./DataController"; import {Data} from "./Data"; -import {PetEntityConstants} from "../core/constants/PetEntityConstants"; +import {PetEntityConstants} from "../../../Lib/src/constants/PetEntityConstants"; import {RandomUtils} from "../core/utils/RandomUtils"; export class Pet extends Data { diff --git a/Core/src/data/WitchAction.ts b/Core/src/data/WitchAction.ts index 884c7aba5..0efb71e9e 100644 --- a/Core/src/data/WitchAction.ts +++ b/Core/src/data/WitchAction.ts @@ -3,11 +3,11 @@ import {Data} from "./Data"; import {readdirSync} from "fs"; import {RandomUtils} from "../core/utils/RandomUtils"; import Player from "../core/database/game/models/Player"; -import {SmallEventConstants} from "../core/constants/SmallEventConstants"; +import {SmallEventConstants} from "../../../Lib/src/constants/SmallEventConstants"; import {ItemNature, ItemRarity} from "../../../Lib/src/constants/ItemConstants"; import {DraftBotPacket} from "../../../Lib/src/packets/DraftBotPacket"; import {TravelTime} from "../core/maps/TravelTime"; -import {NumberChangeReason} from "../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../Lib/src/constants/LogsConstants"; import {EffectsConstants} from "../../../Lib/src/constants/EffectsConstants"; diff --git a/Core/src/data/events/PossibilityOutcome.ts b/Core/src/data/events/PossibilityOutcome.ts index c62d0c975..bdcdeba4e 100644 --- a/Core/src/data/events/PossibilityOutcome.ts +++ b/Core/src/data/events/PossibilityOutcome.ts @@ -1,8 +1,8 @@ import Player from "../../core/database/game/models/Player"; -import {NumberChangeReason} from "../../core/constants/LogsConstants"; +import {NumberChangeReason} from "../../../../Lib/src/constants/LogsConstants"; import {generateRandomItem, giveItemToPlayer} from "../../core/utils/ItemUtils"; import {RandomUtils} from "../../core/utils/RandomUtils"; -import {Constants} from "../../core/Constants"; +import {Constants} from "../../../../Lib/src/constants/Constants"; import {PlayerSmallEvents} from "../../core/database/game/models/PlayerSmallEvent"; import {Maps} from "../../core/maps/Maps"; import {PlayerMissionsInfos} from "../../core/database/game/models/PlayerMissionsInfo"; diff --git a/Discord/src/commands/admin/TestCommand.ts b/Discord/src/commands/admin/TestCommand.ts index 07b4e70e2..4abc510eb 100644 --- a/Discord/src/commands/admin/TestCommand.ts +++ b/Discord/src/commands/admin/TestCommand.ts @@ -7,8 +7,8 @@ import {SlashCommandBuilder} from "@discordjs/builders"; import {DiscordCache} from "../../bot/DiscordCache"; import {DraftBotEmbed} from "../../messages/DraftBotEmbed"; import {HexColorString} from "discord.js"; -import {Constants} from "../../../../Lib/src/constants/Constants"; import {KeycloakUser} from "../../../../Lib/src/keycloak/KeycloakUser"; +import { ColorConstants } from "../../../../Lib/src/constants/ColorConstants"; async function getPacket(interaction: DraftbotInteraction, user: KeycloakUser): Promise { const commandName = interaction.options.get("command"); @@ -38,7 +38,7 @@ export async function handleCommandTestPacketRes(packet: CommandTestPacketRes, c iconURL: interaction.user.displayAvatarURL() }) .setDescription(packet.result) - .setColor( Constants.MESSAGES.COLORS.SUCCESSFUL); + .setColor( ColorConstants.SUCCESSFUL); await interaction.editReply({embeds: [embedTestSuccessful]}); } diff --git a/Lang/en/discordBuilder.json b/Lang/en/discordBuilder.json index 63fe67efb..5c3019770 100644 --- a/Lang/en/discordBuilder.json +++ b/Lang/en/discordBuilder.json @@ -29,6 +29,24 @@ "description": "Displays the ping of the bot and allow the player to check if the bot is online.", "name": "ping" }, + "guild": { + "description": "Displays information about a guild.", + "name": "guild", + "options": { + "rank": { + "description": "The rank of the player whose guild you want to display.", + "name": "rank" + }, + "user": { + "description": "The user whose guild should be displayed.", + "name": "user" + }, + "guildName": { + "description": "The name of the guild that should be displayed.", + "name": "guild" + } + } + }, "profile": { "description": "Displays the profile of a player.", "name": "profile", diff --git a/Lang/fr/discordBuilder.json b/Lang/fr/discordBuilder.json index 646a0a4dc..e2ccd0e48 100644 --- a/Lang/fr/discordBuilder.json +++ b/Lang/fr/discordBuilder.json @@ -29,6 +29,24 @@ "description": "Affiche la latence du bot et permet au joueur de vérifier si le bot est en ligne.", "name": "ping" }, + "guild": { + "description": "Affiche des informations sur une guilde.", + "name": "guilde", + "options": { + "rank": { + "description": "Le classement du joueur dont la guilde doit être affichée.", + "name": "classement" + }, + "user": { + "description": "L'utilisateur dont la guilde doit être affichée.", + "name": "utilisateur" + }, + "guildName": { + "description": "Le nom de la guilde dont les informations doivent être affichées.", + "name": "guilde" + } + } + }, "profile": { "description": "Afficher le profil d'un joueur.", "name": "profil", diff --git a/Lib/src/Constants.ts b/Lib/src/Constants.ts deleted file mode 100644 index d54d010fb..000000000 --- a/Lib/src/Constants.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const Constants = { - LOGS: { - MAX_LOGS_COUNT: 50000, - BASE_PATH: "./logs" - } -}; - -export type ConstantRange = { MIN: number, MAX: number }; diff --git a/Lib/src/constants/ClassInfoConstants.ts b/Lib/src/constants/ClassInfoConstants.ts index 11e9046bc..eb9b8ab96 100644 --- a/Lib/src/constants/ClassInfoConstants.ts +++ b/Lib/src/constants/ClassInfoConstants.ts @@ -1,4 +1,4 @@ -import {Constants} from "../Constants"; +import {Constants} from "./Constants"; export abstract class ClassInfoConstants { static readonly LIST_EMOTE = "\uD83D\uDD16"; diff --git a/Lib/src/constants/Constants.ts b/Lib/src/constants/Constants.ts index c1691f3bb..6ec2342ae 100644 --- a/Lib/src/constants/Constants.ts +++ b/Lib/src/constants/Constants.ts @@ -92,7 +92,8 @@ export class Constants { }; static readonly LOGS = { - LOG_COUNT_LINE_LIMIT: 50000 + LOG_COUNT_LINE_LIMIT: 50000, + BASE_PATH: "./logs" }; static readonly MISSION_SHOP = { @@ -290,4 +291,6 @@ export class Constants { }; static readonly DEFAULT_HEALED_EFFECT = ":hospital:"; -} \ No newline at end of file +} + +export type ConstantRange = { MIN: number, MAX: number }; \ No newline at end of file diff --git a/Lib/src/constants/LogsConstants.ts b/Lib/src/constants/LogsConstants.ts index b2370b5fd..f9a4038ab 100644 --- a/Lib/src/constants/LogsConstants.ts +++ b/Lib/src/constants/LogsConstants.ts @@ -1,6 +1,3 @@ -import {CreateOptions, Model} from "sequelize"; -import GuildPet from "../database/game/models/GuildPet"; - export enum NumberChangeReason { // Default value. Used to detect missing parameters in functions NULL, @@ -71,13 +68,3 @@ export enum ShopItemType { GUILD_XP, ENERGY_HEAL } - -export type ModelType = { create: (values?: unknown, options?: CreateOptions) => Promise> }; - -export type GuildLikeType = { - id: number, - name: string, - creationDate: Date, - chiefId: number, - guildPets: GuildPet[] -} diff --git a/Lib/src/constants/PlayersConstants.ts b/Lib/src/constants/PlayersConstants.ts index b761ecc89..447dfaf01 100644 --- a/Lib/src/constants/PlayersConstants.ts +++ b/Lib/src/constants/PlayersConstants.ts @@ -1,5 +1,5 @@ -import {EffectsConstants} from "../../../../Lib/src/constants/EffectsConstants"; -import {NotificationsConstants} from "../../../../Lib/src/constants/NotificationsConstants"; +import {EffectsConstants} from "./EffectsConstants"; +import {NotificationsConstants} from "./NotificationsConstants"; export abstract class PlayersConstants { static readonly PLAYER_DEFAULT_VALUES = { diff --git a/Lib/src/constants/SmallEventConstants.ts b/Lib/src/constants/SmallEventConstants.ts index c369e8229..ea9aa4d38 100644 --- a/Lib/src/constants/SmallEventConstants.ts +++ b/Lib/src/constants/SmallEventConstants.ts @@ -1,5 +1,5 @@ -import {Constants} from "../Constants"; -import {ItemRarity} from "../../../../Lib/src/constants/ItemConstants"; +import {Constants} from "./Constants"; +import {ItemRarity} from "./ItemConstants"; export abstract class SmallEventConstants { static readonly HEALTH = { diff --git a/Lib/src/instances/Logger.ts b/Lib/src/instances/Logger.ts index 2421c0dcb..87874b1ec 100644 --- a/Lib/src/instances/Logger.ts +++ b/Lib/src/instances/Logger.ts @@ -1,6 +1,6 @@ import * as fs from "fs"; import {WriteStream} from "fs"; -import {Constants} from "../Constants"; +import {Constants} from "../constants/Constants"; enum LogWritingState { BUILDING, @@ -53,7 +53,7 @@ export class Logger { return; } this.lineCount++; - if (this.lineCount > Constants.LOGS.MAX_LOGS_COUNT) { + if (this.lineCount > Constants.LOGS.LOG_COUNT_LINE_LIMIT) { this.lineCount = 0; process.removeListener("uncaughtException", this.currentListener!); this.fileStream!.end(); diff --git a/Lib/src/utils/StringUtils.ts b/Lib/src/utils/StringUtils.ts index 9737d3987..6b30171be 100644 --- a/Lib/src/utils/StringUtils.ts +++ b/Lib/src/utils/StringUtils.ts @@ -1,5 +1,5 @@ import {StringConstants} from "../constants/StringConstants"; -import {ConstantRange} from "../Constants"; +import {ConstantRange} from "../constants/Constants"; /** * Remove discord formatting scrap from usernames